Campaign

Campaign feature is intended to send a single message text to multiple destination numbers via a single API request. The Campaign API supports sending messages up to 10 000 destination numbers with one campaign.

Messages to all recipients may not be delivered instantly. Messages are dequeued for delivery based on the rate limits configured for the account.

Campaign endpoints are meant to send and monitor campaigns scheduled by the account.

Method: Read

-no description-

URL /v1/campaigns/{id}
Method Type GET
Authorization API Key
Request Content-Type JSON
Response Content-Type JSON

Headers

Name Type Description Status
X-Dexatel-Key string API key Required

Request Body

-empty-

Response Parameters

Name Type Description Status
data array

Details

(see data object below)
Optional
data object
Name Type Description Status
id string Unique identifier of the campaign Optional
account_id string Unique identifier of the account Optional
template_id string Unique identifier of the template Optional
audience_id string Unique identifier of the audience Optional
name string Unique name of the campaign Optional
status string Status of the campaign.
Possible values:
• scheduled
• in_progress
• completed
• failed
• canceled
Optional
schedule string Scheduled date if there is any Optional
create_date string Creation date of the campaign in UTC, formatted as yyyyMM-dd HH:mm:ss Optional
update_date string Update date of the campaign in UTC, formatted as yyyyMM-dd HH:mm:ss Optional
messages object

Details

(see messages object below)
Optional
messages object
Name Type Description Status
total integer Total count of all messages Optional
delivered integer Count of delivered messages Optional
failed integer Count of failed messages Optional

Example of request body

GET: /v1/campaigns/48e200b7-be98-4360-b5c7-5dfac16b06f9
X-Dexatel-Key: 94d2f2f2884848bca861264ad86d8ace

Example of response body

status - 200

                
                        

Error Codes

The following error codes are returned in response to a user’s request which contains bad syntax or cannot be fulfilled.

Code Description
1601 Campaign is not found
1602 Invalid campaign identifier
1603 'data.sender' is required
1604 'data.sender' is invalid
1605 'data.audience' is required
1606 'data.audience' is invalid
1607 'data.template' is required
1608 'data.template' is invalid
1609 'data.schedule' is invalid
1611 'data.status' can not be changed
1612 Campaign cannot be deleted
1613 Campaign audience and template do not match