POST: https://twin-ai.com/cis/api/v1/telephony/autoCallCandidate/single
Authorization type: BEARER
The method allows you to create a call task, add a candidate to it and run the task to call the added candidate.
Before running the method, you should create a call job template and set the default setting for using this template. To learn more about creating and setting the default template, see the article Template Management.
The method creates one call task per day for each participating bot. Using the method repeatedly within one day after the job creation will add new candidates to the already created job. All settings of the created call task, except for the bot script, are taken from the default template in your personal cabinet.
The bot script to be used in the calls is specified in the body of the request in the
botSettingsIdfield.
curl --request POST \
--url https://twin-ai.com/cis/api/v1/telephony/autoCallCandidate/single \
--header 'accept: application/json' \
--header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJpYXQiOjE3NDQ2NTUyNzIsImV4cCI6MTc0NTI2MDA3MiwidmVyc2lvbiI6NCwic3ViIjoiMTAwNzMiLCJjb21wYW55X2lkIjo3MTR9.lrIB9I2P6G5evhfY9AVywR_h1hD1QMFBcOlBqslIizXSw0g_ydq66pRbfCwXfJdSRsBcHzul_oLz2E6z-3jXboWzEEM7toVuthC8NwNw4uX2vGfYdJAhTJ-cLYcP4CGKffFrnlCJKy17AtAEeFKy0PZOOPm5PmBUrPVnT7ZVhQioT_9uG0aowGRzfcBDKsLcNgF4jhfCpgzAOq-vZsx-HC81CyUYhqhC0Bij7XepP0Qg1LTBrZAobV-bD0tK3p6gmbguILZLm_AOud6dT5qXNAovGJD9Y2zv84hyAFODeI4OWAKI3uvvXFDVXwcU7TPxVOa1RVcXc_u2hq6V2V1IDV0ILtJkwu2Ks684aWFp9QUi0yqlvVUWy8l6BPXCyuyz2QOusHlJfCYRe21zKVmekZZQBHh3AJINesL76Ph2Gse1i9G5MtRgiW18y8cIC3PfiuvviKegL4lSrAKK_VkNQJla1uLfIcDOPOLi0uE5TaWaxqYcwAZapF-I1BmQVavHe1Pu5xRsRp7U1KCXSPvgwF8jmtcrBHZc4ZpM64Zuue-Ybf7JT6Qbh8SUJY-h_LrzWXRRs4v51CvU0_TOeWnvMdh4z5ayc8oKb7WWYYPOfrNu_sY80X56VXLE4ERQABD0CchR2YgEpkLgv8MZmH4MKul-Glu-mpxkoGXvW_DGH1E' \
--header 'content-type: application/json' \
--data '
{
"callbackData": {
"test": "123"
},
"phone": [
"88005553535"
],
"botSettingsId": "2656622a-57b2-478f-acf9-6167120d18bf",
"variables": [
"testVariable": "123"
],
"timezone": 16800
}
'
{
"callbackData": {
"test": "123"
},
"variables": {
"testVariable": "123"
},
"phone": [
"79991234567"
],
"botSettingsId": "2656622a-57b2-478f-acf9-6167120d18bf",
"timezone": 16800
}
| Name | Type | Mandatory | Description |
|---|---|---|---|
phone |
List[string] | Yes | A list of candidate phone numbers to which the call will be launched. |
botSettingsId |
String | Yes | The identifier of the bot script to be run in the call. |
variables |
Object | Not | Object with custom variables by candidate. |
timezone |
Int | Not | Time zone of the candidate. Specified as a deviation from UTC+0 in seconds. The maximum value is 43200 and the minimum value is -43200. |
callbackData |
Object | Not | An object with information fields on a candidate. Information is returned in unchanged form in hooks about the result of the call and about the result of candidate processing. For example: client ID or phone number ID. |
{
"id": {
"identity": "bce7d22e-dde6-4427-b391-ebbdfda44de6"
}
}
Response fields description:
| Name | Type | Mandatory | Description |
|---|---|---|---|
id |
object | Yes | An object containing the ID of the candidate added to the call job created by the method. |
identity |
string | Yes | The identifier of the added candidate for the call. |
{
"timestamp": 1544098870,
"type": "MyNamespace\\MyClass",
"error": "string",
"details": {}
}
Response fields description:
| Name | Type | Mandatory | Description |
|---|---|---|---|
timestamp |
integer | Yes | Current time. |
type |
string | Yes | Exception Class. |
error |
string | Yes | Error message. |
details |
object | null | Not | Additional information about the bug. |