1. Home
  2. Docs
  3. Gateway
  4. HTTP Api
  5. Delivery reports

Delivery reports

To get delivery reports, you have two options: The much more efficient and faster method is a callback directly to your server. As soon as a new status is available, your desired URL is automatically called up. The alternative method is to directly query the status of an SMS via a request to the Api. If there is no status yet, you might have to query again later. We recommend to use the callback variant. Both variants can also be combined, e.g. if the callback failed.

Status reports via callback

As an alternative to a manual query, you can set a URL in your login under Account > Settings > HTTP API, to which our server automatically sends an HTTP GET request as soon as a new status is available. In order to conserve resources and to get the current status as fast as possible, this method is preferable to the manual query.

To your URL, which can also be called via SSL, then the Get parameters msg_id and status for the Msg ID and the current delivery report are appended.
Please note that no second call will be made if your server isn’t reachable. If you have large amounts of delivery reports, a cumulated minute-by-minute transmission of delivery reports is possible. For this please send us a message.

Example

Do you have e.g. the following URL specified as status URL
https://www.yourserver.com/status.php

Then we send the request e.g. so to your server:
https://www.yourserver.com/status.php?msg_id=1234567&status=DELIVERED

Query delivery reports

You can use the following script to manually query the delivery report of an SMS:

https://gateway.sms77.io/api/status

ParameterDescription
msg_idThe msg ID of the SMS. This you obtain e.g. automatically when you send SMS via the Api.

If no errors occurs you will get the delivery report followed by a line break and the UNIX timestamp as response in mime type text/plain.

Example

Request:
https://gateway.sms77.io/api/status?p=api-key&msg_id=12345678900

Response:
DELIVERED
1396355161

Possible delivery reports

Delivery reportDescription
DELIVEREDThe SMS was successfully delivered.
NOTDELIVEREDSMS could not be delivered. Please check the recipient number if necessary.
BUFFEREDSMS was sent successfully, but was cached by the SMSC because the recipient isn’t reachable.
TRANSMITTEDSMS was sent by the SMSC and should arrive soon.
ACCEPTEDSMS was accepted by the SMSC.
EXPIREDSMS was not received before the end of validity.
REJECTEDSMS was rejected by the carrier.
FAILEDError while sending SMS
UNKNOWNUnknown status report
Was this article helpful to you? Yes No
Menu