This type of callback allows you to automatically receive the status updates on messages you have sent on SMS.to.
SMS.to provides you this feature by allowing you to set the endpoint in your account settings on SMS.to. You will then receive the callback at the provided endpoint for each status update of messages sent from your account.
You can easily set up the endpoint by these simple steps:
- Navigate to your account settings.
- Click on the Webhook Management tab.
- Save the URL pointing to your endpoint in the Default Outbound Callback URL box. It should refer to the endpoint you've set up on your side for receiving outbound message status updates.
- Click on Save.
- From this point on, your account is ready to automatically receive status updates of each message to your configured endpoint.
We will send you these callbacks using the POST Method as Form Encoded. This means we post you the data as form_params. Below is the array of data that we post:
[ "trackingId": "185c9d63-dae2-4614-b0f4-48453e870dcf", "messageId": "e7745289-7236-497f-acf2-f9cfd6a86f16", "phone": "+35799999999999", "status": "SENT", "parts": 1, "price": 0.015 ]
Basic requirements for the endpoint configuration
To receive callbacks from us correctly, please make sure to:
- Return 200 HTTP Status code when processing of callbacks is done on your end.
- Reduce the processing time of callbacks to less than 3 seconds. We drop the connection after 3 seconds and retry sending after 1 hour.
When the first callback is received and doesn't return a 200 or took more than 3 seconds to respond back to us, we mark it as failed and save it to retry.
The retry policy goes as below:
- Afrer 1 hour we retry to send the callback.
- If previous retry fails, we retry in the next 2 hours from the time the previous failed retry happened.
- If previous retry fails again, we retry in the next 4 hours from the time the previous failed retry happened.
- If previous retry fails again, we retry in the next 24 hours from the time the previous failed retry happened.
- If previous retry fails again we discard it at this point.
Time until delivery
Please be informed that - unlike the SMS itself - callbacks are not sent instantly. If you receive a callback at a later time, that will not mean that the SMS was sent only at this time. The Message Log gives accurate timestamps of when exactly an SMS was sent. More information on this: Measuring delivery time
If you have any questions, please send an email to firstname.lastname@example.org