> For the complete documentation index, see [llms.txt](https://docs.hollatags.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hollatags.com/sms/callback.md).

# Callback

## Callback

<mark style="color:green;">`POST`</mark> `https://your-callback-url.com/`

If you specify a **callback\_url** when sending your message, we will perform a http request to the provided url with the following message status data.

#### Request Body

| Name         | Type   | Description                                                                                           |
| ------------ | ------ | ----------------------------------------------------------------------------------------------------- |
| message\_id  | string | The unique message ID allocated to the message when originally submitted.                             |
| status       | string | The final status of the message, in all-caps, ie. DELIVRD, UNDELIV, EXPIRED etc                       |
| status\_code | string | The DLR status success or error code associated with the delivery status.                             |
| done\_date   | string | The date and time at which the sms message reached it's final state.                                  |
| operator     | string | The mobile network operator and country.                                                              |
| length       | string | Total number of characters for the sms.                                                               |
| page         | string | Number of pages for the message. The character limit for a single page SMS message is 160 characters. |
| cost         | string | The cost of sending this message.                                                                     |

{% tabs %}
{% tab title="200 We expect http status code 200, otherwise we'll do a maximum of 3 retries after every 5 mins." %}

```javascript
{"status": "ok"}
```

{% endtab %}
{% endtabs %}

### Sample Request Body

```javascript
{
   "message_id": "e70b1903-c877-4d9a-9ec0-ab73b9d7b1db",
   "status": "DELIVRD",
   "status_code": "000",
   "done_date": "2020-10-01 00:15:50",
   "operator": "Nigeria - 9MOBILE",
   "length": "157",
   "page": "1",
   "cost": "3.00"
}
```

{% hint style="success" %}
Using the callback url, you can also link a status update back to your internal application reference ID. A way to achieve this will be for you to include your internal reference ID as a path in your callback\_url. \
\
To illustrate, if you are sending sms and the sms have reference ID 8f0af1fbd432 within your application, the callback\_url can be <https://your-callback-url.com/8f0af1fbd432/>
{% endhint %}
