POST
/
v1
/
phoneCalls
curl --request POST \
  --url https://api.aicaller.io/v1/phoneCalls \
  --header 'Content-Type: application/json' \
  --header 'aicaller-api-key: <api-key>' \
  --data '{
  "teamId": "363573667364666473667332",
  "phoneNumberId": "363573667364666473667332",
  "callTemplateId": "363573667364666473667332",
  "nameOfHuman": "John",
  "fromPhoneNumber": "+1234567890",
  "toPhoneNumber": "+1234567890",
  "toEmailAddress": "[email protected]",
  "status": "queued",
  "telephonyProvider": "twilio",
  "promptVariableValues": [
    {
      "key": "customer_name",
      "value": "John"
    }
  ],
  "record": false,
  "callDelayedUntil": "2023-10-12T09:08:00.387Z",
  "phoneCallWebhooks": [
    {
      "url": "https://hooks.abc.com/",
      "subscribedEvent": "phoneCall.completed",
      "secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
    }
  ]
}'
{
  "data": {
    "teamId": "363573667364666473667332",
    "phoneNumberId": "363573667364666473667332",
    "callTemplateId": "363573667364666473667332",
    "nameOfHuman": "John",
    "fromPhoneNumber": "+1234567890",
    "toPhoneNumber": "+1234567890",
    "toEmailAddress": "[email protected]",
    "status": "queued",
    "telephonyProvider": "twilio",
    "promptVariableValues": [
      {
        "key": "customer_name",
        "value": "John"
      }
    ],
    "record": false,
    "callDelayedUntil": "2023-10-12T09:08:00.387Z",
    "phoneCallWebhooks": [
      {
        "url": "https://hooks.abc.com/",
        "subscribedEvent": "phoneCall.completed",
        "secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
      }
    ],
    "_id": "12345678901234567890",
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
}

Authorizations

aicaller-api-key
string
header
required

Body

application/json

Response

200
application/json

Phone call successfully created.

The response is of type object.