curl --request POST \
--url https://api.aicaller.io/v1/phoneCalls/batch \
--header 'Content-Type: application/json' \
--header 'aicaller-api-key: <api-key>' \
--data '
{
"phoneCalls": [
{
"teamId": "363573667364666473667332",
"callTemplateId": "363573667364666473667332",
"nameOfHuman": "John",
"toPhoneNumber": "+1234567890",
"promptVariableValues": [
{
"key": "customer_name",
"value": "John"
}
],
"phoneNumberId": "363573667364666473667332",
"fromPhoneNumber": "+1234567890",
"toEmailAddress": "[email protected]",
"status": "queued",
"telephonyProvider": "twilio",
"record": false,
"callDelayedUntil": "2023-10-12T09:08:00.387Z",
"phoneCallWebhooks": [
{
"url": "https://hooks.abc.com/",
"subscribedEvent": "phoneCall.completed",
"secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
}
]
}
]
}
'{
"data": [
{
"teamId": "363573667364666473667332",
"callTemplateId": "363573667364666473667332",
"nameOfHuman": "John",
"toPhoneNumber": "+1234567890",
"promptVariableValues": [
{
"key": "customer_name",
"value": "John"
}
],
"_id": "12345678901234567890",
"createdAt": "<string>",
"updatedAt": "<string>",
"phoneNumberId": "363573667364666473667332",
"fromPhoneNumber": "+1234567890",
"toEmailAddress": "[email protected]",
"status": "queued",
"telephonyProvider": "twilio",
"record": false,
"callDelayedUntil": "2023-10-12T09:08:00.387Z",
"phoneCallWebhooks": [
{
"url": "https://hooks.abc.com/",
"subscribedEvent": "phoneCall.completed",
"secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
}
]
}
]
}Create multiple PhoneCalls in one request
curl --request POST \
--url https://api.aicaller.io/v1/phoneCalls/batch \
--header 'Content-Type: application/json' \
--header 'aicaller-api-key: <api-key>' \
--data '
{
"phoneCalls": [
{
"teamId": "363573667364666473667332",
"callTemplateId": "363573667364666473667332",
"nameOfHuman": "John",
"toPhoneNumber": "+1234567890",
"promptVariableValues": [
{
"key": "customer_name",
"value": "John"
}
],
"phoneNumberId": "363573667364666473667332",
"fromPhoneNumber": "+1234567890",
"toEmailAddress": "[email protected]",
"status": "queued",
"telephonyProvider": "twilio",
"record": false,
"callDelayedUntil": "2023-10-12T09:08:00.387Z",
"phoneCallWebhooks": [
{
"url": "https://hooks.abc.com/",
"subscribedEvent": "phoneCall.completed",
"secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
}
]
}
]
}
'{
"data": [
{
"teamId": "363573667364666473667332",
"callTemplateId": "363573667364666473667332",
"nameOfHuman": "John",
"toPhoneNumber": "+1234567890",
"promptVariableValues": [
{
"key": "customer_name",
"value": "John"
}
],
"_id": "12345678901234567890",
"createdAt": "<string>",
"updatedAt": "<string>",
"phoneNumberId": "363573667364666473667332",
"fromPhoneNumber": "+1234567890",
"toEmailAddress": "[email protected]",
"status": "queued",
"telephonyProvider": "twilio",
"record": false,
"callDelayedUntil": "2023-10-12T09:08:00.387Z",
"phoneCallWebhooks": [
{
"url": "https://hooks.abc.com/",
"subscribedEvent": "phoneCall.completed",
"secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
}
]
}
]
}Array of phone calls used in the call (maximum 20 items).
20Show child attributes
The unique ID of the Team, phoneCall associated with.
"363573667364666473667332"
The ID of the call template used for the call.
"363573667364666473667332"
The name of the human making the call to.
"John"
The phone number the call is made to.
"+1234567890"
The ID of the phone number associated with the call.
"363573667364666473667332"
The optional phone number the call should be made from. If not provided AI will use a number from twilio settings.
"+1234567890"
The email of the person, the call is made to.
The status of the phone call. Possible values: "queued", "ringing", "inProgress", "busy", "noAnswer", "canceled", "failed", "completed".
queued, ringing, inProgress, busy, failed, noAnswer, cancelled, completed "queued"
The telephony provider to be used for the phone call. Possible values: "twilio", "plivo", "telnyx".
twilio, plivo, telnyx "twilio"
Flag indicating whether recording is enabled for the specific phone call.
false
Can be used to schedule a call for the future. Must be ISO Date as a string with UTC timezone.
"2023-10-12T09:08:00.387Z"
Array of webhooks to be notified for this call.
Phone calls successfully created.
Show child attributes
The unique ID of the Team, phoneCall associated with.
"363573667364666473667332"
The ID of the call template used for the call.
"363573667364666473667332"
The name of the human making the call to.
"John"
The phone number the call is made to.
"+1234567890"
Unique identifier for the phoneCall
"12345678901234567890"
The ID of the phone number associated with the call.
"363573667364666473667332"
The optional phone number the call should be made from. If not provided AI will use a number from twilio settings.
"+1234567890"
The email of the person, the call is made to.
The status of the phone call. Possible values: "queued", "ringing", "inProgress", "busy", "noAnswer", "canceled", "failed", "completed".
queued, ringing, inProgress, busy, failed, noAnswer, cancelled, completed "queued"
The telephony provider to be used for the phone call. Possible values: "twilio", "plivo", "telnyx".
twilio, plivo, telnyx "twilio"
Flag indicating whether recording is enabled for the specific phone call.
false
Can be used to schedule a call for the future. Must be ISO Date as a string with UTC timezone.
"2023-10-12T09:08:00.387Z"
Array of webhooks to be notified for this call.