POST: https://twin24.ai/cis/api/v1/telephony/autoCallCandidate/single/batch
This method allows you to create a new call task using the parameters from the specified template and immediately start calling the candidates provided when the task was created.
curl --location 'https://twin24.ai/cis/api/v1/telephony/autoCallCandidate/single/batch' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Bearer TOKEN' \
--data '{
"batch": [
{
"callbackData": {
"id_client": "123456"
},
"phone": [
"79876543210",
"79876543211"
],
"botSettingsId": "a8c57dfe-...850d2e",
"variables": {
"Name": "John",
"LastName": "Doe"
},
"clientExternalId": "123",
"autoCallTemplateId": "bb973460-....9d2d12196",
"timezone": 25200,
"checkPhone": true
},
{
"callbackData": {
"id_client": "78910"
},
"phone": [
"79876543222",
"79876543233"
],
"botSettingsId": "b3c33ffe-...012d25",
"variables": {
"Name": "John",
"LastName": "Doe"
},
"clientExternalId": "321",
"autoCallTemplateId": "aa973370-....1c2d321312",
"timezone": 25200,
"checkPhone": false
}
]
}
'
{
"batch": [
{
"callbackData": {
"id_client": "123456"
},
"phone": [
"79876543210",
"79876543211"
],
"botSettingsId": "a8c57dfe-...850d2e",
"variables": {
"Name": "John",
"LastName": "Doe"
},
"clientExternalId": "123",
"autoCallTemplateId": "bb973460-....9d2d12196",
"timezone": 25200,
"checkPhone": true
},
{
"callbackData": {
"id_client": "78910"
},
"phone": [
"79876543222",
"79876543233"
],
"botSettingsId": "b3c33ffe-...012d25",
"variables": {
"Name": "John",
"LastName": "Doe"
},
"clientExternalId": "321",
"autoCallTemplateId": "aa973370-....1c2d321312",
"timezone": 25200,
"checkPhone": false
}
]
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone | array of strings | Required | Candidate's phone numbers for calling. |
| variables | array of strings | Optional | Object containing variables for the candidate. There are no limits on the number; the example above lists 3 variables. |
| clientExternalId | string | Optional | External client identifier |
| botSettingsId | string | Optional | Scenario identifier for the call being created. If not specified, the scenario specified in the template is used. |
| autoCallTemplateId | string | Optional | Template ID for the call campaign being created. If not specified, the “default” template set in the TWIN interface is selected |
| timezone | integer | Optional | Time zone for the call. Specified in seconds from -43200 to 43200 If not specified, the time zone is selected automatically based on the candidate's number. |
| callbackData | object | Optional | An object containing fields with candidate information that must be returned unchanged in the call result webhook and the candidate processing result webhook. For example: client ID or lead ID. |
| checkPhone | boolean | Optional | Checks phone numbers for validity. |
[
[
{
"autoCallId": {
"identity": "6c1b8040-aa75-.........-а741ad34d69d"
},
"autoCallCandidateId": {
"identity": "019c8e5e-1ааа-.........-5аf94939f9f0"
}
}
]
]
Response fields:
| Field | Type | Description |
|---|---|---|
| autoCallCandidateId | Object | - |
| identity | string | Candidate identifier |
| autoCallId | Object | - |
| identity | string | Call task identifier |