Campaigns
Methods
appendToCampaign
Append contacts to the existing campaign. It is possible to add a maximum of 100 entries in one request.
Parameters
domain:
string
Your account name
access_token:
string
Your api token
campaign_id:
integer
Campaign ID. The ID can be retrieved via the searchCampaigns method
rows:
string
Data to append in JSON format.
Example:[{"phone": "+79101234567", "UTC": "Europe/Moscow", "custom_field": "custom_value"}]
Returns
Contacts are successfully added to the campaign
default:
Command execution error
deleteCampaign
Delete the specified campaign. The method only works for the campaigns with the ‘draft’ status.
Parameters
id:
integer
Campaign ID. The ID can be retrieved via the searchCampaigns method
domain:
string
Your account name
access_token:
string
Your api token
Returns
Campaign is successfully deleted
default:
Command execution error
downloadStatReport
Download report file (.xlsx or .csv).
Parameters
report_id:
integer
Report ID. The ID can be retrieved via the exportStatReport method
domain:
string
Your account name
access_token:
string
Your api token
Returns
200:
Report file (.xlsx or .csv).
default:
Command execution error
exportStatReport
Start processing the stats of the specified campaign. To check if the processing is over, use the getStatReportStatus method; use the downloadStatReport method to get the download link.
Parameters
campaign_id:
integer
Campaign ID. The ID can be retrieved via the searchCampaigns method
format:
string
OptionalReport format. The following values are possible: csv, xlsx
locale:
string
Document language (example: 'en' or 'ru')
from:
string
OptionalStart date (example: 'YYYY-MM-DD HH:mm:ss')
to:
string
OptionalEnd date (example: 'YYYY-MM-DD HH:mm:ss')
domain:
string
Your account name
access_token:
string
Your api token
Returns
Stat report is successfully retrieved
default:
Command execution error
getStatReportStatus
Get info about stats processing. If the response parameter "processed" is True, the stats can be downloaded via the downloadStatReport method.
Parameters
report_id:
integer
Report ID. The ID can be retrieved via the exportStatReport method
domain:
string
Your account name
access_token:
string
Your api token
Returns
Stat report status is successfully retrieved
default:
Command execution error
initCampaign
Create a new campaign for automatic calls and start campaign. Use the appendToCampaign method to added contacts.
Parameters
domain:
string
Your account name
access_token:
string
Your api token
request:
Create a new campaign for automatic calls and start campaign. Use the appendToCampaign method to added contacts.
Returns
Campaign is successfully created
default:
Command execution error
pauseCampaign
Pause the specified campaign. You can make the campaign active again via the resumeCampaign method.
Parameters
id:
integer
Campaign ID. The ID can be retrieved via the searchCampaigns method
domain:
string
Your account name
access_token:
string
Your api token
Returns
Campaign is successfully paused
default:
Command execution error
resumeCampaign
Resume the specified campaign which was paused via the pauseCampaign method.
Parameters
id:
integer
Campaign ID. The ID can be retrieved via the searchCampaigns method
domain:
string
Your account name
access_token:
string
Your api token
Returns
Campaign is successfully resumed
default:
Command execution error
searchAttempts
Search for the call attempts. The method without specifying the parameters returns the last 20 call attempts performed.
Parameters
id:
integer
Attempt ID. The ID can be retrieved via the searchAttempts method
campaign_id:
integer
Campaign ID. The ID can be retrieved via the searchCampaigns method
datetime_start:
string
Start date. The format is 24-h ‘YYYY-MM-DD HH:mm:ss’
datetime_end:
string
End date. The format is 24-h ‘YYYY-MM-DD HH:mm:ss’
fields:
string
List of the returned fields (comma separated). If it’s not specified, the response will contain the full list of fields.
IMPORTANT: the parameter can be used only in GET requestssort:
string
Sorting data by field(s), add '-' to DESC sort, (example: ‘sort=id’ or ‘sort=-id’).
IMPORTANT: the parameter can be used only in GET requestspage:
integer
Page to show as a response: the first one, second, etc. API methods return 20 records (one page) by default.
IMPORTANT: the parameter can be used only in GET requestsper-page:
integer
Number of records per page (default value is 20, min = 1, max = 50).
IMPORTANT: the parameter can be used only in GET requestsdomain:
string
Your account name
access_token:
string
Your api token
Returns
Search request is successfully performed
default:
Command execution error
searchCampaigns
Search for the campaigns. The method without specifying the parameters returns the last 20 campaigns created.
Parameters
id:
integer
Campaign ID. The ID can be retrieved via the searchCampaigns method
status:
string
Campaign status. The possible values are draft, error, processing, ready, canceled, completed, paused, started
date_start:
string
Start date. The format is 24-h ‘YYYY-MM-DD HH:mm:ss’
date_end:
string
End date. The format is 24-h ‘YYYY-MM-DD HH:mm:ss’
date_create:
string
Date of the campaign creation. The format is 24-h ‘YYYY-MM-DD HH:mm:ss’
title:
string
Title of the campaign
fields:
string
List of the return fields (comma separated). If it’s not specified the response will contain the full list of fields.
IMPORTANT: the parameter can be used only in GET requestssort:
string
Sorting data by field(s), add '-' to DESC sort, (example: ‘sort=id’ or ‘sort=-datetime_start’).
IMPORTANT: the parameter can be used only in GET requestspage:
integer
Page to show as a response: the first one, second, etc. API methods return 20 records (one page) by default.
IMPORTANT: the parameter can be used only in GET requestsper-page:
integer
Number of records per page (default value is 20, min = 1, max = 50).
IMPORTANT: the parameter can be used only in GET requestsdomain:
string
Your account name
access_token:
string
Your api token
Returns
Search request is successfully performed
default:
Command execution error
stat
Get the statistics of the specified campaign(s). Campaign_ids is a JSON array with the campaign ID(s). ID(s) can be retrieved via the searchCampaigns method (example: [1,2,3]
).
Parameters
domain:
string
Your account name
access_token:
string
Your api token
request:
Get the statistics of the specified campaign(s). Campaign_ids is a JSON array with the campaign ID(s). ID(s) can be retrieved via the searchCampaigns method (example:
[1,2,3]
).
Returns
Stats are successfully retrieved
default:
Command execution error