For an SMS sent via Exotel SMS API, you can find out the delivery Status of the SMS via two means:
A. PULL: You can pull the status by querying Exotel for the specific SMS that you sent.
For this you need to make a GET request to
https://<your_api_key>:<your_api_token>@<subdomain>/v1/Accounts/<ExotelSid>/SMS/Messages/<SmsSid>
- 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
B. PUSH: You can have Exotel push the SMS status to you after the SMS reaches any terminal state (ie, "sent", "failed" or "failed-dnd").
For this, you need to pass an additional parameter "StatusCallback" along with your other parameters (like 'From', 'To' and 'Body').
=> This parameter should be a URL that is hosted by you. Ex: http://example.com/
=> Exotel will make a POST request to the above URL with the following parameters:
- SmsSid : The 'Sid' of the SMS
- Status : The Status of the SMS. For a detailed description of these Statues, See Exotel SMS status codes
- DateUpdated : The time when the SMS was last updated