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://<ExotelSid>:<ExotelToken>@api.exotel.com/v1/Accounts/<ExotelSid>/SMS/Messages/<SmsSid> 

    where 

             ExotelSid is your Exotel Sid 

             ExotelToken is the token <--- You can get this from the Settings page

             SmsSid is the "Sid" (unique id) of the SMS that you got in response to your send request

   

    Ex: curl "https://Exotel:abcdefgh@api.exotel.com/v1/Accounts/Exotel/SMS/Messages/4dd44cc0f7010ee43ca256126f3efc88"


 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