×
API authentication required
Need API Access?

Please use ‘Create Account’ to quickly register and start exploring our APIs

POST

https://<your_api_key>:<your_api_token><subdomain>/v2/accounts/<your_sid>/campaigns

Parameter
Name
Value
Description
* Body
Jsonbody

Replace <your_api_key> and <your_api_token> with the API key and token created by you.
Replace <your_sid> with your “Account sid”
Replace <subdomain> with the region of your account
<subdomain> of Singapore cluster is @api.exotel.com
<subdomain> of Mumbai cluster is @api.in.exotel.com

<your_api_key> , <your_api_token> and <your_sid> are available in the API settings page of your Exotel Dashboard

Response Content Type

GET

https://<your_api_key>:<your_api_token><subdomain>/v2/accounts/<your_sid>/campaigns/<id>

To get the details of a specific campaign in your account, make an HTTP GET request

Parameter
Name
Value
Description
* id
path
Response Content Type

PUT

https://<your_api_key>:<your_api_token><subdomain>/v2/accounts/<your_sid>/campaigns/<id>

While you can update all the parameters of a campaign that has not started

Parameter
Name
Value
Description
* ID
path
* Body
Jsonbody

string; Control a campaign. The below values can be passed:

pause – Stop calling more numbers as part of the campaign that is in progress.
resume -Resume calling numbers that were not called.

Response Content Type

DELETE

https://<your_api_key>:<your_api_token><subdomain>/v2/accounts/<your_sid>/campaigns/<id>

Replace <your_api_key> and <your_api_token> with the API key and token created by you. Similarly,

Parameter
Name
Value
Description
* ID
path

Replace <id> with the campaign id.

Response Content Type

PUT

https://<your_api_key>:<your_api_token><subdomain>/v2/accounts/<your_sid>/campaigns/<id>

This API allows you to update all the parameters of a campaign that has not started. Campaign details can be updated before send_at time is passed. Once send_at time is passed only action, status_callback, call_status_callback and call_schedule_callback can be updated.

Parameter
Name
Value
Description
* ID
path
* Body
Jsonbody

All Campaign parameters can be updated. Edit the parameter you want to update.

from– Comma seperated list of phone numbers that will be called. Preferably in E.164 format

lists– Array of listSid. Up to 5 listSid can be part of one single campaign.

caller_id– This is your ExoPhone

url– Call flow url (http://my.exotel.com/{your_sid}/exoml/start_voice/{app_id} where app_id is the identifier of the flow)

name– Name of the campaign

type– Value “trans’ for transactional.  As per regulations, we support only transactional type of campaigns

call_duplicate_numbers– Allowed Values: ‘true’ & ‘false’

retries– Object;Retry logic in case the calls are not successful.

      number_of_retries – The number of times a call to a phone number should be attempted. Default is 0 and        max is 3.

      interval_mins – The time interval between retries in mins. Mandatory when number_of_retries is                      specified

      mechanism – either “Linear” or “Exponential”. If the retry should be equally spaced or exponentially. 

on_status – Array; Determines when should a campaign treat a call as an unsuccessful attempt. Could be “busy”, “no-answer”, “failed”

schedule– Array; Determines when to start and end a campaign in RFC 3339 date-time

      send_at – Time when the campaign should start.

      end_at – Time when the campaign should end even if all calls are not attempted as part of the campaign. 

call_status_callback– When the call completes, an HTTP POST will be made to the provided URL 

call_schedule_callback– When all calls to a number were completed including retries, an HTTP POST will be made to the provided URL

status_callback– When the call campaign starts or ends, an HTTP POST will be made to the provided URL

custom_field– Any application specific value that will be passed back as a parameter while doing a GET request to the URL mentioned in your Passthru Applet or Greetings Applet.

Response Content Type

GET

https://<your_api_key>:<your_api_token><subdomain>/v2/accounts/<your_sid>/campaigns

To get the details of bulk campaign details in your account, make an HTTP GET request.

This API allows you to fetch bulk campaign details with sorting and searching capabilities. 
 

Parameter
Name
Value
Description
* offset
query

offset (optional)-  By specifying offset, you retrieve a subset of records starting with the offset value. Offset is zero-based i.e. the 10th record is at offset 9

* limit
query

limit(optional)- number of records on single page default:20 maximum=500

* name
query

name (optional)-Search on Campaign name 

* status
query

status (optional)- By default all records will be populated of all status. However, you can filter on set of status too. eg, status=in-progress, created

* sort_by
query

sort_by (optional)- This indicates in what order the campaign records are sorted in the API response. By default records are sorted by DateCreated in ascending order. However, you can override the same in following way for ascending order: Eg: date_created:asc or name:asc

* type
query

type (Optional)- It’s an optional parameter in the request but mandatory in the response. It’s allowed (and default) value is ‘trans’. If not passed in the request, we will create campaign as type ‘trans’ and pass this parameter in the API response. As per regulations, we support only transactional type of campaigns.

Response Content Type

GET

https://<your_api_key>:<your_api_token><subdomain>/v2/accounts/<your_sid>/campaign/ <campaign_id>/call-details

To get the call details of a specific campaign in your account, make an HTTP GET request

Parameter
Name
Value
Description
* id
path
Response Content Type