Calls can be requested via our API. Requests use HTTPS and responses return in standard JSON.
To place a call, make sure your account is free of moderation, or the audio files you are sending have already been moderated.
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
phone | string(11) | The number of the called subscriber | Yes, if there’s no “phones” | The request must contain either the number of the called subscriber (phone), or an array of numbers (phones) |
phones | array | An array of numbers of the called subscribers | Yes, if there’s no “phones” | The request must contain either the number of the called subscriber (phone), or an array of numbers (phones) |
outgoingPhone | string(11) | The caller’s number | Yes, if there’s no “duty phone” or it equals 0 | The number must be added and confirmed in the personal account |
dutyPhone | 0 or 1 | The caller’s number, randomly selected from the list of work numbers | Yes, if there’s no “outgoing call” | |
plannedAt | date_format:U | The date of the scheduled message | No | |
needRecording | 0 or 1 | Call recording or no call recording | No | The call is not recorded by default. Audio recording is available at recordPath (call’s details) |
webhookUrl | string(255) | The web address to receive the call’s details, if the status of the call is changed | No | This web address will receive a POST-request with data in JSON format from 209.97.136.240 address, the data format can be seen after a request in “Call’s details request” section. The request will be sent up until 3 times every minute or until HTTP-code 200 is received |
record | object | |||
record.id | integer | Audio recording’s ID | Yes, if there’s no “text” | Audio recording can be added in the personal account. Its ID can be seen in “Audio recordings” section |
record.text | string(1024) | The text for generating an audio file | Yes, if there’s no “id” | For calls with generated voice the cancellation of call moderation is needed |
record.gender | 0 или 1 | Defines the gender of the voice for the generated text | Yes | 0 – female, 1 – male, 0 – be default |
ivrs | array | The list of processors for pressed digits | No | |
ivrs.*.digit | integer(0-9) | The processed digit | No | If the digit is not pressed, “stay on the line” protocol (for when no other actions are chosen) will be activated |
ivrs.*.keyWords | string | The keyword list with “I” separator | No | |
ivrs.*.needBlock | integer(0-1) | Adding to the blocked list when clicked | No | |
ivrs.*.record.id | integer | Audio recording’s ID | No | |
ivrs.*.managerPhone | string(11) | The number to forward to when clicked | No | |
ivrs.*.smsText | string(70) | SMS text to send to the subscriber | No | |
ivrs*.webhookUrl | string | By this action, a POST request in JSON format will be sent to the specified web address from the 209.97.136.240 address, into which the parameters you specified (the webhookParameters field) and default parameters will be added. Default parameters: call - an object containing information about the call, it contains the following fields: phone - a line containing the phone number of the called subscriber, answer - a number or a line containing the subscriber's answer (for example, 1 - if the subscriber pressed «1», or «yes» if the subscriber answered yes) For example of the request body: {"call": {"phone": "10000000000", "answer": 1}, "user_parameter1": "value1", "user_parameter2": "value2"} | No | |
ivrs*.webhookParameters | string | A JSON line, parameters from this line will be added to the request. For example:{"user_parameter1": "value1", "user_parameter2": "value2"} | No | |
isManagerDeliveryPhone | integer(0-1) | use the sender's number when contacting the manager | No | |
lang | string(5) | Language code in «en-US» format | No | By default you have your partner’s default language. To get the list of all possible languages send a GET-request (see paragraph 7) |
Sample request using a loaded audio clip and IVR <?php if( $curl = curl_init() ) { $jsonstr = '{"apiKey": "nWvGmHIvkj1tM323tsEgfdRYkagGi********", "phone":"99999999999", "outgoingPhone":"99999999999", "record":{"id":1}, "ivrs":[{"digit": 1,"needBlock": 0,"record": {"id": 1342}}, {"digit": 2,"needBlock": 0,"managerPhone": "99999999998"}]}'; curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/create'); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonstr); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json')); $out = curl_exec($curl); echo $out; curl_close($curl); } ?> Sample request using a loaded audio clip and IVR <?php if( $curl = curl_init() ) { $jsonstr = '{"apiKey": "nWvGmHIvkj1tM323tsEgfdRYkagGi********", "phone":"99999999999", "outgoingPhone":"99999999997", "record":{"text":"Text for generating the audio file"},"ivrs":[{"digit": 1,"needBlock": 0,"smsText": "Message text"}]}'; curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/create'); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonstr); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json')); $out = curl_exec($curl); echo $out; curl_close($curl); } ?> Sample request using voice recognition technology <?php if( $curl = curl_init() ) { $jsonstr = '{"apiKey": "nWvGmHIvkj1tM323tsEgfdRYkagGi********", "phone":"99999999999", "outgoingPhone":"99999999997", "record":{"text":"Text for generating the audio file"}, "ivrs":[{"keyWords":"Yes|No|don’t know","smsText": "Message text", "record": {"text": "Text of the audio file"}}, {"record": { "text": "Text of the audio file"}}]}'; curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/create'); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonstr); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json')); $out = curl_exec($curl); echo $out; curl_close($curl); } ?>
{
"id":<the call’s ID>,
"createdAt":<creation time, UNIX timestamp>
"plannedAt": <the call's scheduled date, UNIX timestamp>,
"needrecording": <the need to record the call>,
"phone": <phone number>,
"recordCost": <the total cost of the audio files, created in the current request>
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
apiCallIdList | array | The list of the calls’ ID | Yes |
<?php
$requestArray = array(
'apiKey' => '*******....' //Your API key
);
$json = json_encode($requestArray);
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/get?apiCallIdList[]=1');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json'));
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
?>
{
"id":<the call’s ID>,
"createdAt":<the time of creation, UNIX timestamp>,
"needRecording":<is call recording on or off>,
"plannedAt":<the scheduled call date, UNIX timestamp>,
"webhookUrl":<URL, which will be receiving the call details if its status changes>,
"webhookSent":<was the webhook submitted after the call ended>,
"amoscriptId":<the atmoscript’s id>,
"webhookParameters":<webhook’s parameters after the call ended>,
"webhookTry":<the number of the webhook sending attempt>,
"recognitionGroupId":<the ID from the generation direction table>,
"generateGroupId":<the ID from the generation recognition table>,
"calls":[{
"phone":<phone number>,
"ivrDigit":<pressed digit>,
"startedAt":<dial time, UNIX timestamp>,
"answeredAt":<response time , UNIX timestamp>,
"managerStartedAt":<start time of dialing the manager, UNIX timestamp>,
"managerAnsweredAt":<the time of manager’s response, UNIX timestamp>,
"finishedAt":<end time, UNIX timestamp>,
"toBlock":<blocked or not blocked>,
"status":<call status>,
"hangupCause": <end of the call code>,
"managerStatus":<the status of the call to the manager>,
"recordFilePath":<the link for the audio file>,
"cost":<the cost of the call, usd.>,
"createdAt":<the time of creation, UNIX timestamp>,
"updatedAt":<update time, UNIX timestamp>,
"label": <label, client’s ip by default>,
"ivrAnswers":<ivr answers, separated by |>
"ivrIdList":<ID of the actions made by users>,
"comment":<comments>,
}]
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
name | string | The audio file name | Yes | |
source | 'text' or 'file' | The audio file source type | Yes | |
file | file | Audio file | Yes, if source='file' | |
text | string | The text for generating a video | Yes, if source='text' |
<?php
$requestArray = array(
'apiKey' => '*******....', //Your API key
'source' => 'text', //Type of the audio file
'text' => 'Hello world' //Text of the audio file
'name' => 'TestRecord' //Name of the audio file
);
$json = json_encode($requestArray);
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/createRecord');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json'));
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
?>
{
"id":<the audio file’s id>,
"createdAt":<creation time, UNIX timestamp>,
"needModeration":<is the moderation on or off>,
"moderatorComment":<the moderator's comment>,
"name":<the name of the audio file>,
"path":<the status of the audio file>,
"status":<the status of the audio file>,
"recordText":<the text for generating an audio file>,
"cost":<the cost of the audio file>
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
idList | array | Audio file ID | Yes |
<?php
$requestArray = array(
'apiKey' => '*******....', //Your API key
'idList' => [123], //Identifier list
);
$json = json_encode($requestArray);
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/removeRecord');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json'));
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
?>
{
"id":<the call’s ID>,
"createdAt":<the time of creation, UNIX timestamp>
"name":<the name of the audio file>,
"path":<the status of the audio file>,
"moderatorComment": <the moderator's comment>
"needModeration": <is the moderation on or off>,
"status": <the status of the call>,
"deletedAt": <the time of the removal, UNIX timestamp>
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
<?php
$requestArray = array(
'apiKey' => '*******....', //Your API key
);
$json = json_encode($requestArray);
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/userInfo');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json'));
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
?>
{
"id":<the user’s ID>,
"balance":<the current balance>
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
all | boolean | true or false | No | 'false' by default |
<?php
$requestArray = array(
'apiKey' => '*******....', //Your API key
'all' => true
);
$json = json_encode($requestArray);
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/getPhones');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json'));
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
?>
{
"status": success,
"data": [{"id": <the number’s id>,
"phone": <phone number>,
"isSystem": <true or false>,
"overall": <if the number is shared - 1, if personal - 0>}]
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
<?php
$requestArray = array(
'apiKey' => '*******....', //Your API key
);
$json = json_encode($requestArray);
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/getAvailableLanguages');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json'));
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
?>
{
"status": success,
"data": [{"id": <language ID>,
"name": <language name>,
"defaultLangCode": <language code>}]
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
phone | string(11) | The number of the called subscriber | Yes | The request must contain either the number of the called subscriber (phone), or an array of numbers (phones) |
pin | integer | The last 4 digits of the number from which the verification call will be made | Yes | These 4 digits will be the code |
<?php
$requestArray = array(
'apiKey' => '*******....', //Your API key
'phone' => '99999999999',
'pin' => '1234',
);
$json = json_encode($requestArray);
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiVerificationPhones/confirmPhone');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json'));
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
?>
{
"status": success,
"data": done
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
callList | array | List of calls to transfer | Yes | |
callList.*.id | integer | Scheduled call ID | Yes | |
callList.*.replannedAt | date_format:U | Different time for a call | Yes |
<?php
if ($curl = curl_init()) {
$requestArray = array(
'apiKey' => '*******....', // Your API key
'callList' => array(
array(
'id' => 123, // ID of the first call
'replannedAt' => 12345 // Unix timestamp amount of seconds
),
array(
'id' => 321, // ID of the second call
'replannedAt' => 54321 // Unix timestamp amount of seconds
)
),
);
$json = json_encode($requestArray);
curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/update');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json'));
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
?>
{
"status": success,
"data": { // list of updated clip ID
"callIdList": [
123,
321
]
}
}
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
idList | array | Audio file ID | Yes |
Example of request to delete bulk API call<?php if ($curl = curl_init()) { $requestArray = array( 'apiKey' => '*******....', // Your API key 'idList' => array(123, 321), // Caller ID list ); $json = json_encode($requestArray); curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/remove'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $json); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json')); curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); $out = curl_exec($curl); echo $out; curl_close($curl); } ?>
Example of request to delete single API call<?php if ($curl = curl_init()) { $requestArray = array( 'apiKey' => '*******....', // Your API key 'id' => 123, // Caller ID ); $json = json_encode($requestArray); curl_setopt($curl, CURLOPT_URL, 'https://in.effebot.com/apiCalls/remove'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $json); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'accept: application/json')); curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); $out = curl_exec($curl); echo $out; curl_close($curl); } ?>
Response of removing bulk API calls{ "status": success, "data": { // list of deleted call ID "callIdList": [ 123, 321 ] } }
Response of removing single API call{ "status": success, "data": [] }
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
onlyModerated | boolean | 0 - is for all templates, 1 - is for moderated ones only | No | Display only moderated templates or not |
Name | Type | Value | Mandatory | Note |
---|---|---|---|---|
apiKey | string | API key | Yes | API key can be received from your manager or partner |
phone | string(11) | The number of the called subscriber | Yes, if there’s no “phones” | The request must contain either the number of the called subscriber (phone), or an array of numbers (phones) |
phones | array | An array of numbers of the called subscribers | Yes, if there’s no “phones” | The request must contain either the number of the called subscriber (phone), or an array of numbers (phones) |
templateId | integer | template id | Yes | Template can be added in your personal account, its id will be shown in the «API templates» section |
outgoingPhone | string(11) | The caller’s number | Yes, if there’s no “duty phone” or it equals 0 | The number must be added and confirmed in the personal account |
dutyPhone | 0 or 1 | The caller’s number, randomly selected from the list of work numbers | Yes, if there’s no “outgoing call” | |
plannedAt | date_format:U | The date of the scheduled message | No |