Skip to main content
POST
/
api
/
v1
/
call
/
{widget_id}
Make a call
curl --request POST \
  --url 'https://api.example.com/api/v1/call/{widget_id}?api_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "<string>",
  "prompt_dynamic_variables": {}
}
'
{
  "message": "Data created successfully",
  "meta": {},
  "data": {
    "conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "widget_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "direction": "<string>",
    "from_number": "<string>",
    "to_number": "<string>",
    "telephony_provider": {
      "provider_name": "twilio",
      "call_id": "<string>",
      "response_body": {}
    },
    "prompt_dynamic_variables": {}
  }
}

Authorizations

api_key
string
query
required

Your API key for authentication. You can generate it from the Settings page. Format: starts with in-.

Path Parameters

widget_id
string<uuid>
required

Widget ID to be used for initiating the call. It must be connected to Twilio, Plivo or Telnyx.

Body

application/json

Payload containing the phone number and other details.

to
string
required

The phone number to call. Must be in E.164 format. Ex: 16501234567

prompt_dynamic_variables
Prompt Dynamic Variables · object

Dynamic variables to be used in the prompt. Ex: {'name': 'Bob', 'appointment_day': 'tomorrow', 'reason': 'for confirmation of appointment'}

Response

Call successfully initiated

message
string | null
default:Data created successfully
meta
Meta · object
data
Call · object