v1/telephony/autoCallThis method allows you to create a new auto-call task. Upon successful request execution, the identifier of the created task will be returned.
The task start time depends on the
startTypeparameter.
curl --location 'https://twin-ai.com/cis/api/v1/telephony/autoCall' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"additionalOptions": {
"allowCallTimeFrom": 35976,
"allowCallTimeTo": 75636,
"detectRobot": false,
"detectRobotMode": null,
"detectRobotGreeting": null,
"fullListMethod": "reject",
"fullListTime": 0,
"providerId": null,
"recordCall": true,
"recTrimLeft": 0,
"useTr": false,
"fz230": false
},
"callStrategy": "STEP_2_STEP",
"lifetime":600,
"cidData": "8a5932f6-fbc0-4667-b91c-2ddd1b46aed0",
"cidType": "gornum",
"cps": 1,
"defaultExec": "robot",
"defaultExecData": "c5bea15e-2c00-4e06-a4df-204c67009944",
"name": "autoCallName",
"redialStrategyOptions": {
"answerMash": {
"count": 0,
"redial": false,
"time": 0
},
"answerNoList": {
"count": 0,
"redial": false,
"time": 0
},
"busy": {
"count": 0,
"redial": false,
"time": 0
},
"congestion": {
"count": 0,
"redial": false,
"time": 0
},
"noAnswer": {
"count": 0,
"redial": false,
"time": 0
},
"candidateLimit": {
"count": 0,
"redial": false
},
"numberLimit": {
"count": 0,
"redial": false
},
"redialStrategyEn": false
},
"secondExec": "end",
"secondExecData": "",
"startMoment": "",
"startType": "manual",
"taskComment": "",
"webhookUrls": [],
"checkPhone": true,
"phoneNormalization": null,
"normalizationErrorAction": null,
"sendReportAfterFinish": false,
"scheduleId": null
}
{
"name": "test_autocall",
"defaultExec": "robot",
"defaultExecData": "228cc4fa-92f2-4709-94e3-7344a96a5903",
"secondExec": "ch",
"secondExecData": "48a77bd7-8762-4e0f-a277-4ef77e36c41b",
"cidType": "gornum",
"cidData": "9a67dee5-398e-4570-9426-fbb3f067b270",
"startType": "time",
"startMoment": "2023-06-02 10:00",
"cps": 1.03,
"lifetime": 600,
"taskComment": "Test task for API demonstration",
"webhookUrls": [
"https://webhook.site/6f44...2aa287f",
"https://typedwebhook.tools/webhook/4c6d9...8720ab39"
],
"additionalOptions": {
"fullListMethod": "reject",
"fullListTime": 0,
"useTr": false,
"allowCallTimeFrom": 0,
"allowCallTimeTo": 86399,
"recordCall": true,
"recTrimLeft": 0,
"detectRobot": true,
"detectRobotMode": "back",
"providerId": null
},
"redialStrategyOptions": {
"redialStrategyEn": false,
"candidateLimit": {
"redial": false,
"count": 0
},
"numberLimit": {
"redial": false,
"count": 0
},
"busy": {
"redial": false,
"time": 1,
"count": 1
},
"noAnswer": {
"redial": false,
"time": 1,
"count": 1
},
"answerMash": {
"redial": false,
"time": 1,
"count": 1
},
"congestion": {
"redial": false,
"time": 1,
"count": 1
},
"answerNoList": {
"redial": false,
"time": 1,
"count": 1
}
}
}
| Name | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Task name. |
defaultExec |
string | Yes | Always takes the value robot. |
defaultExecData |
string | Yes | UUID of the call scenario. |
secondExec |
string | Yes | Action on call forwarding (end (End), ignore (Do nothing), ch (Forward to a channel)). |
secondExecData |
string | Yes, if secondExec = ch |
UUID of the forwarding channel. |
cidType |
string | Yes | Caller ID type (default (Default for the trunk), gornum (Single number), pool (Group of numbers)). |
cidData |
string | Yes, if cidType = gornum or pool |
ID of the entity in cidType. |
startType |
string | Yes | Launch mode (manual (Manually), time (At a specified time)). |
startMoment |
string | Yes, if startType = time |
Start date and time of the auto-call (YYYY-MM-DD HH:MM). |
cps |
float | Yes | Call intensity. Calculated as 1 + N / 100 for N calls per second (example: N = 3, then CPS = 1.03), or as 1 - N / 100 for 1 call per N seconds (example: N = 60, then CPS = 0.4). |
lifetime |
integer | Not | The duration of the task in seconds. After this time has elapsed, the task is set to HALTED status. If the field is not filled in, the task can be executed indefinitely. |
{
"id": {
"identity": "bce7d22e-dde6-4427-b391-ebbdfda44de6"
}
}
Response field descriptions:
| Name | Type | Required | Description |
|---|---|---|---|
id |
object | Yes | Task identifier. |
identity |
string | Yes | Unique call task ID. |
{
"timestamp": 1544098870,
"type": "MyNamespace\\MyClass",
"error": "string",
"details": {}
}
Response field descriptions:
| Name | Type | Required | Description |
|---|---|---|---|
timestamp |
integer | Yes | Current time. |
type |
string | Yes | Exception class. |
error |
string | Yes | Error message. |
details |
object | null | No | Additional error details. |
{
"timestamp": 1544098870,
"type": "MyNamespace\\MyClass",
"error": "string",
"details": {}
}
Response field descriptions:
| Name | Type | Required | Description |
|---|---|---|---|
timestamp |
integer | Yes | Current time. |
type |
string | Yes | Exception class. |
error |
string | Yes | Error message. |
details |
object | null | No | Additional error details. |