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://twin24.ai/cis/api/v1/telephony/autoCall' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer TOKEN' \
--data '{
"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,
"taskComment": "Test API call task",
"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": "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,
"taskComment": "Test API call task",
"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 | Bot script ID to use in the call. |
secondExec |
string | Yes | Action on forwarding: (end (End call), ignore (Do nothing), ch (Forward to channel)). |
secondExecData |
string | Yes, if secondExec = ch |
Channel ID for transfer. |
cidType |
string | Yes | Identifiable number: (default (Default for trunk), gornum (Single number), pool (Group of numbers)). |
cidData |
string | Yes, if cidType = gornum or pool |
Entity ID in cidType. |
startType |
string | Yes | Start mode: (manual (Manual), time (At a specified time)). |
startMoment |
string | Yes, if startType = time |
Start date and time of the call task (YYYY-MM-DD HH:MM). |
cps |
float | Yes | Call task 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 every N seconds (example: N = 60, then CPS = 0.4). |
taskComment |
string | No | Comment on the task. |
webhookUrls |
Array[string] | No | URLs to which the webhook will be sent. |
lifetime |
integer | No | Task lifetime in seconds. After this time expires, the task is set to HALTED status. If this field is left blank, the task can run indefinitely. |
additionalOptions |
Object | Yes | Additional call parameters. |
→ fullListMethod |
string | Yes | Whether to consider the call successful. Always takes the value reject. |
→ fullListTime |
int | Yes | The number of seconds after which a call is considered successful. |
→ useTr |
boolean | No | Whether to take the recipient's time into account |
→ allowCallTimeFrom |
int | Yes, if useTr = true |
Start of the call-available interval. Specified in seconds. |
→ allowCallTimeTo |
int | Yes, if useTr = true |
End of the call-available interval. Specified in seconds. |
→ recordCall |
boolean | Yes | Whether or not to record calls. |
→ recTrimLeft |
int | Yes, if recordCall = true |
How much to trim from the beginning of the recording. Set in seconds. |
→ detectRobot |
boolean | No | Enable human/robot detection system. |
→ detectRobotMode |
string | Yes, if detectRobot = true |
Human/robot detection mode: (back (Background), block (Blocking)). |
→ providerId |
string | No | Trunk UUID. Relevant only when using a custom trunk. |
phoneNormalization |
string | No | Determines whether normalization is enabled: (null (disabled), RU (normalization to RU phone number format)). |
normalizationErrorAction |
string | No | Specifies the action to take when a normalization error occurs: (IGNORE_NORMALIZATION_ERROR (skip the number that caused the error), SET_NORMALIZATION_ERROR_FLAG (add the number, marking it as unnormalizable)) . Normalization must be enabled for this parameter. Detailed information about normalization is provided below. |
redialStrategyOptions |
Object | Yes | Redial rule settings. |
→ redialStrategyEn |
boolean | Yes | Whether to use redial rules. |
→ candidateLimit |
Object | No | Maximum number of calls to a candidate. |
→ numberLimit |
Object | No | Maximum number of calls per number. |
→ → redial |
boolean | Yes | Whether to enable the limit on the maximum number of calls. |
→ → count |
int | Yes, if redial = true |
Maximum number of calls. |
→ busy |
Object | Yes | Redial rule when the status is Busy. |
→ noAnswer |
Object | Yes | Callback rule for the No Answer status. |
→ answerMash |
Object | Yes | Callback rule for the Answering Machine status. |
→ congestion |
Object | Yes | Redial rule for Call error status. |
→ answerNoList |
Object | Yes | Redial rule if call is unsuccessful. |
→ → redial |
boolean | Yes | Whether to activate the redial rule. |
→ → time |
int | Yes, if redial = true |
Delay before redial. Specified in seconds. |
→ → count |
int | Yes, if redial = true |
Number of redials. |
{
"id": {
"identity": "bce7d22e-dde6-4427-b391-ebbdfda44de6"
}
}
Description of response fields:
| Name | Type | Required | Description |
|---|---|---|---|
id |
object | Yes | Task identifier. |
identity |
string | Yes | Unique call ID. |