×
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>/v1/Accounts/<your_sid>/Sms/send

This API will send an SMS to the specified To number. To send an SMS through our API, you will need to make a HTTP POST request

Parameter
Name
Value
Description
* From
formData

Specify one of your ExoPhone or Sender ID (header) linked to it.

ExoPhone: From = ‘080XXXXXX’
Transactional Sender ID: From = ‘EXOTEL’ (If linked to your ExoPhone)
Promotional Numeric Sender ID: From = ‘600XXX’ (If linked to your ExoPhone)

* To
formData

Mobile number to which SMS has to be sent. Preferably in E.164 format. If not set, our system will try to match it with a country and route the SMS

* Body
formData

Content of your SMS; Max Length of the body cannot exceed 2000 characters
To avoid SMS failure, make sure this exactly matches with SMS template added on Exotel Dashboard and is registered with operator DLT portal in case of India.

* EncodingType
formData

Message type of SMS; plain or unicode

* ShortenUrl
formData

Whether to shorten the URLs present in the SMS. Can be: “true” or “false”.
Please note that it is a chargeable feature and you can refer to Support article to understand more and get it enabled for your account.

* ShortenUrlParams [CustomDomain]
formData

Whether you want the short URL to start with default domain- exo.tl or you want to provide a custom domain of your own choice.

     If custom domain is not present or empty, we will use the default domain(exo.tl)

     If custom domain is given in the request it will be used to form the short URL

Note : Clients will have to route the traffic on their custom domain to exo.tl domain, this is a change on your domain management system

* ShortenUrlParams[Tracking]
formData

Whether to track the URLs present in the SMS. Can be: “true” or “false”. “ShortenUrl” needs to be “true” for Tracking to work.

This feature is currently available to select customers. For early access, please fill this form. 

* ShortenUrlParams[ClickTrackingCallbackUrl]
formData

Once someone clicks on the shortened URL,  Exotel will do a POST callback to your end point if the URL is set as a parameter in the API. 

Below are the parameters: 

sid – The Sid (unique id) of the shortened URL  

short_url – The complete shortened URL

short_code – Key of the shortened URL 

long_url – Original URL which is shortened

Tracking – Whether to track the URLs present in the SMS

custom_field – custom field passed in SMS API request String value

Expires_at –  Date Time in ISO format when link will expire

Created_time – Date Time in ISO format when URL is created

Last_viewed –  Date Time in ISO format when link was visited last

Total_clicks  – count of total views of short url

Account_sid –  Exotel’s unique Account SID

Country_code – Country code of the customer who received the SMS

Date_created – Date Time in ISO format when link was created 

Sms_sid – The Sid (unique id) of the SMS, this SID can be used to track the SMS

To –  Contact number of the customer who clicked on the URL

city – City where the shorten URL is clicked

Country – Country code where shorten URL is clicked

IP – IP address where shorten URL is clicked

Postal code – Postal code where shorten URL is clicked 

Region – Region where shorten URL is clicked

Accuracy radius – Aproximate accuracy radius where shorten URL is clicked 

OS_version – OS version of the customer who clicked the shorten URL 

OS_name – OS name of the customer who clicked the shorten URL 

Device_name – Device name of the customer who clicked the shorten URL 

Platform type – Platform where shorten URL is clicked 

 

* StatusCallback
formData

Once SMS reaches terminal state (sent/failed/failed_dnd), Exotel will do a POST callback to your end point if the URL is set as a parameter in the API. Content-type for the POST callback is application/x-www-form-urlencoded

Below are the parameters:

SmsSid – The Sid (unique id) of the SMS that you got in response to your request

To – Mobile number to which SMS was sent

Status – One of: queued, sending, submitted, sent, failed_dnd, failed

SmsUnits – The number of  SMS units being sent

DetailedStatus – Human readable word that explains what happened to the message 

DetailedStatusCode – Exotel’s Detailed Status code corresponding to the DetailedStatus 

DateSent – Time in format YYYY-MM-DD HH:mm:ss; The time when the SMS was delivered to the recipient.

CustomField – The custom field that was set in the POST request. (Will be returned only if it was set)

 

 
* DltEntityId
formData

Applicable only for SMS sent by Indian businesses to Indian destination numbers.

Your Entity Id as registered on DLT (Distributed Ledger Technology) portal of operators in India. This is mandatory to be passed in API or configured on Dashboard for SMSes towards Indian destination  (Learn More about DLT)

* DltTemplateId
formData

Applicable only for SMS sent by Indian businesses to Indian destination numbers.

Content Template Id against the SMS body registered with DLT (Distributed Ledger Technology) portal of operators in India. (Learn More about DLT)

* SmsType
formData

This optional parameter can be used to skip template addition on Exotel Dashboard and configure SMS type based on the template registered on DLT in India. 

Possible values-

transactional (OTP or Service Implicit content)

transactional_opt_in (Service Explicit content)

promotional (Promotional content with numeric header)

If not set or incorrectly passed, Exotel will look up if content matches Templates added on Exotel for fetching SMS Type and DLT details.

* CustomField
formData

Set a Custom Field relevant to your use case while sending an SMS. E.g Order ID, Payment ID, Login Attempt etc

* Priority
formData

Priority of the SMS; normal or high. Priority=high parameter should only be used for OTP SMSes (Bank or Delivery). Using it for any other SMS may impact your delivery

Response Content Type

GET

https://<your_api_key>:<your_api_token><subdomain>/v1/Accounts/<your_sid>/SMS/Messages/<SmsSid>

To get the details of a SMS (including Status, Direction, etc.), you will need to make a HTTP GET request

Parameter
Name
Value
Description
* SmsSid
path

SmsSid is the Sid of the SMS.

Response Content Type

POST

https://<your_api_key>:<your_api_token><subdomain>/v1/Accounts/<your_sid>/Sms/send

Parameter
Name
Value
Description
* From
formData
  • Specify one of your ExoPhone

  • For transactional SMSes, the SenderID (When you buy an ExoPhone, you will be asked to enter a 6-letter sender ID from which your SMSes will be sent. For Eg: LM-EXOTEL or LM-WEBDEV etc.) will be the one that corresponds to the ExoPhone

  • For promotional SMSes, the SenderID will anyways be a generic numeric one (Ex: LM-123456)

* To
formData_Csv
  • Download Sample CSV
  • Array of Mobile numbers to which SMS has to be sent. Preferably in E.164 format. If not set, our system will try to match it with a country and route the SMS

    * Body
    formData

    Content of your SMS; Max Length of the body cannot exceed 2000 characters

    * EncodingType
    formData

    Message type of SMS; plain or unicode

    * ShortenUrl
    formData

    Whether to shorten the URLs present in the SMS. Can be: “true” or “false”.
    Please note that it is a chargeable feature and you can refer to Support article to understand more and get it enabled for your account.

    * ShortenUrlParams [CustomDomain]
    formData

    Whether you want the short URL to start with default domain- exo.tl or you want to provide a custom domain of your own choice.

         If custom domain is not present or empty, we will use the default domain(exo.tl)

          If custom domain is given in the request it will be used to form the short URL

    Note : Clients will have to route the traffic on their custom domain to exo.tl domain, this is a change on your domain management system

    * ShortenUrlParams[Tracking]
    formData

    Whether to track the URLs present in the SMS. Can be: “true” or “false”. “ShortenUrl” needs to be “true” for Tracking to work.

    This feature is currently available to select customers. For early access, please fill this form. 

    * ShortenUrlParams[ClickTrackingCallbackUrl]
    formData

    Once someone clicks on the shortened URL,  Exotel will do a POST callback to your end point if the URL is set as a parameter in the API. 

    Below are the parameters: 

    sid – The Sid (unique id) of the shortened URL  

    short_url – The complete shortened URL

    short_code – Key of the shortened URL 

    long_url – Original URL which is shortened

    Tracking – Whether to track the URLs present in the SMS

    custom_field – custom field passed in SMS API request String value

    Expires_at –  Date Time in ISO format when link will expire

    Created_time – Date Time in ISO format when URL is created

    Last_viewed –  Date Time in ISO format when link was visited last

    Total_clicks  – count of total views of short url

    Account_sid –  Exotel’s unique Account SID

    Country_code – Country code of the customer who received the SMS

    Date_created – Date Time in ISO format when link was created 

    Sms_sid – The Sid (unique id) of the SMS, this SID can be used to track the SMS

    To –  Contact number of the customer who clicked on the URL

    city – City where the shorten URL is clicked

    Country – Country code where shorten URL is clicked

    IP – IP address where shorten URL is clicked

    Postal code – Postal code where shorten URL is clicked 

    Region – Region where shorten URL is clicked

    Accuracy radius – Aproximate accuracy radius where shorten URL is clicked 

    OS_version – OS version of the customer who clicked the shorten URL 

    OS_name – OS name of the customer who clicked the shorten URL 

    Device_name – Device name of the customer who clicked the shorten URL 

    Platform type – Platform where shorten URL is clicked 

    * StatusCallback
    formData

    After every SMS reaches terminal state (sent/failed/failed_dnd), Exotel will do a POST callback to your end point if the URL is set as a parameter in the API. Content-type for the POST callback is application/x-www-form-urlencoded Below are the parameters:

    • SmsSid – The Sid (unique id) of the SMS that you got in response to your request

    • To – Mobile number to which SMS was sent

    • Status – One of: queued, sending, submitted, sent, failed_dnd, failed

    • DetailedStatus – Human readable word that explains what happened to the message

    • DetailedStatusCode – Exotel’s Detailed Status code corresponding to the DetailedStatus 

    • DateSent – Time in format YYYY-MM-DD HH:mm:ss; The time when the SMS was delivered to the recipientSmsUnits

    • SmsUnits – The number of  SMS units being sent

    • CustomField – The custom field that was set in the POST request. (Will be returned only if it was set)

    * DltEntityId
    formData

    Applicable only for SMS sent by Indian businesses to Indian destination numbers.

    Your Entity Id as registered on DLT (Distributed Ledger Technology) portal of operators in India. (Learn More about DLT)

    * DltTemplateId
    path

    Applicable only for SMS sent by Indian businesses to Indian destination numbers.

    Content Template Id against the SMS body registered with DLT (Distributed Ledger Technology) portal of operators in India. (Learn More about DLT)

    * SmsType
    formData

    This optional parameter can be used to skip template addition on Exotel Dashboard and configure SMS type based on the template registered on DLT in India. 

    Possible values-

    transactional (OTP or Service Implicit content)

    transactional_opt_in (Service Explicit content)

    promotional (Promotional content with numeric header)

    If not set or incorrectly passed, Exotel will look up if content matches Templates added on Exotel for fetching SMS Type and DLT details.

    * CustomField
    formData

    Set a Custom Field relevant to your use case while sending an SMS. E.g Order ID, Payment ID, Login Attempt etc

    * Priority
    formData

    Priority of the SMS; normal or high. Priority=high parameter should only be used for OTP SMSes (Bank or Delivery). Using it for any other SMS may impact your delivery

    Response Content Type

    POST

    https://<your_api_key>:<your_api_token><subdomain>/v1/Accounts/<your_sid>/Sms/bulksend

    Parameter
    Name
    Value
    Description
    * From
    formData
    • Specify one of your ExoPhone

    • For transactional SMSes, the SenderID (When you buy an ExoPhone, you will be asked to enter a 6-letter sender ID from which your SMSes will be sent. For Eg: LM-EXOTEL or LM-WEBDEV etc.) will be the one that corresponds to the ExoPhone

    • For promotional SMSes, the SenderID will anyways be a generic numeric one (Ex: LM-123456)

    • Will be used in cases where From is missing in Messages object

    • If not set, default approved SENDER ID as per account will be used

    * Messages
    formData_Csv
  • Download Sample CSV
  • Array of message objects, wherein each object contains parameters about individual SMS:

    • To (Mandatory): Mobile number to which SMS has to be sent. Preferably in E.164 format. If not set, our system will try to match it with a country and route the SMS

    • Body (Mandatory): Content of your SMS; Max Length of the body cannot exceed 2000 characters

    • From (Optional): ExoPhone or approved SENDER ID. If not provided, will use outer From

    • SmsType (Optional): This optional parameter can be used to skip template addition on Exotel Dashboard and configure SMS type based on the template registered on DLT in India. 

      Possible values-

      transactional (OTP or Service Implicit content)

      transactional_opt_in (Service Explicit content)

      promotional (Promotional content with numeric header)

      If not set or incorrectly passed, Exotel will look up if content matches Templates added on Exotel for fetching SMS Type and DLT details.

    • DltTemplateId (Optional): Applicable only for SMS sent by Indian businesses to Indian destination numbers.

      Content Template Id against the SMS body registered with DLT (Distributed Ledger Technology) portal of operators in India. (Learn More about DLT)

    * EncodingType
    formData

    Message type of SMS; plain or unicode

    * ShortenUrl
    formData

    Whether to shorten the URLs present in the SMS. Can be: “true” or “false”.
    Please note that it is a chargeable feature and you can refer to Support article to understand more and get it enabled for your account.

     

    * ShortenUrlParams [CustomDomain]
    formData

    Whether you want the short URL to start with default domain- exo.tl or you want to provide a custom domain of your own choice.

         If custom domain is not present or empty, we will use the default domain(exo.tl)

          If custom domain is given in the request it will be used to form the short URL

    Note : Clients will have to route the traffic on their custom domain to exo.tl domain, this is a change on your domain management system

    * ShortenUrlParams[Tracking]
    formData

    Whether to track the URLs present in the SMS. Can be: “true” or “false”. “ShortenUrl” needs to be “true” for Tracking to work.

    This feature is currently available to select customers. For early access, please fill this form. 

    * ShortenUrlParams[ClickTrackingCallbackUrl]
    formData

    Once someone clicks on the shortened URL,  Exotel will do a POST callback to your end point if the URL is set as a parameter in the API. 

    Below are the parameters: 

    sid – The Sid (unique id) of the shortened URL  

    short_url – The complete shortened URL

    short_code – Key of the shortened URL 

    long_url – Original URL which is shortened

    Tracking – Whether to track the URLs present in the SMS

    custom_field – custom field passed in SMS API request String value

    Expires_at –  Date Time in ISO format when link will expire

    Created_time – Date Time in ISO format when URL is created

    Last_viewed –  Date Time in ISO format when link was visited last

    Total_clicks  – count of total views of short url

    Account_sid –  Exotel’s unique Account SID

    Country_code – Country code of the customer who received the SMS

    Date_created – Date Time in ISO format when link was created 

    Sms_sid – The Sid (unique id) of the SMS, this SID can be used to track the SMS

    To –  Contact number of the customer who clicked on the URL

    city – City where the shorten URL is clicked

    Country – Country code where shorten URL is clicked

    IP – IP address where shorten URL is clicked

    Postal code – Postal code where shorten URL is clicked 

    Region – Region where shorten URL is clicked

    Accuracy radius – Aproximate accuracy radius where shorten URL is clicked 

    OS_version – OS version of the customer who clicked the shorten URL 

    OS_name – OS name of the customer who clicked the shorten URL 

    Device_name – Device name of the customer who clicked the shorten URL 

    Platform type – Platform where shorten URL is clicked 

     

    * StatusCallback
    formData

    After every SMS reaches terminal state (sent/failed/failed_dnd), Exotel will do a POST callback to your end point if the URL is set as a parameter in the API. Content-type for the POST callback is application/x-www-form-urlencoded Below are the parameters:

    • SmsSid – The Sid (unique id) of the SMS that you got in response to your request

    • To – Mobile number to which SMS was sent

    • Status – one of: queued, sending, submitted, sent, failed_dnd, failed

    • DetailedStatus – Human readable word that explains what happened to the message 

    • DetailedStatusCode – Exotel’s Detailed Status code corresponding to the DetailedStatus 

    • DateSent – The date on which the message was sent

    • SmsUnits – the number of  SMS units being sent

    • CustomField – The custom field that was set in the POST request. (Will be returned only if it was set)

    * DltEntityId
    formData

    Applicable only for SMS sent by Indian businesses to Indian destination numbers.

    Your Entity Id as registered on DLT (Distributed Ledger Technology) portal of operators in India. (Learn More about DLT)

    * CustomField
    formData

    Set a Custom Field relevant to your use case while sending an SMS. E.g Order ID, Payment ID, Login Attempt etc

    * Priority
    formData

    Priority of the SMS; normal or high. Priority=high parameter should only be used for OTP SMSes (Bank or Delivery). Using it for any other SMS may impact your delivery

    Response Content Type