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)