Skip to Content
SMS APIHow to Get Delivery Reports

How to Get Delivery Reports

Fetch the delivery report of an SMS by making a HTTP GET request with id of the recipient message using the endpoint below:

Endpoint

https://api.smsleopard.com/v1/delivery_reports/{unique_id_of_recipient_message}

Authorization

Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Code Examples

curl -u API_KEY:API_SECRET -X GET https://api.smsleopard.com/v1/delivery_reports/fb21dd7c-8df5-4aac-895a-6fec8eb29e8d
Example of a Successful Response

Status code: 200

{ "id": "fb21dd7c-8df5-4aac-895a-6fec8eb29e8d", "reason": "", "status": "DELIVRD", "time": 1626390000 }
id The unique identifier for each recipient message.
reason The cause of message delivery failure.
status The current status of the message in our system.
time The time message was delivered in unix timestamp.

Delivery Callback (status_url)

If you send an SMS with status_url, each delivery report is sent there as an HTTP POST with a JSON body with the same fields as above:

{ "id": "fb21dd7c-8df5-4aac-895a-6fec8eb29e8d", "reason": "", "status": "DELIVRD", "time": 1626390000 }

id is the recipient id from the send response. Your status_secret is added as the secret query parameter (https://your-status.url?secret=supersecret); check it before trusting the report. Use a status_url without a query string of its own.