Skip to content

SMS final status

An SMS you sent through the SMS API v6 (/api/v6/sms/...) reached its final status: delivered, failed or blocked. It reaches you as the sms.final_status event, one per message, or in batches of up to 500 if you choose so.

4 min read

When it arrives

Once per message, when an SMS you sent through the SMS API v6 reaches its final status. A long SMS, which travels in several parts, brings a single notification once all of its parts are done. The type is always sms.final_status, with no variable part. It does not come for a message that the day closing, at 00:20 (Colombia time) on the fourth day after it was received, leaves in its final status without any of its parts having failed: the one the carrier received without confirming the phone (delivered_to_carrier) and the one that did not go out or the carrier did not accept within those 3 days (failed). The message query gives that status.

Only for API messages

It only arrives for messages you send through the SMS API v6; the ones sent through v5 or over SMPP do not bring it. Over SMPP, the final status reaches you in the delivery receipt on your connection, one per part.

Who receives it

It is received by an endpoint of your organization that names sms.final_status, or by one registered to receive every SMS event of your organization. If the endpoint names sms.final_status.batch, it receives it in batches of up to 500 notifications per request, and not one by one. No endpoint of another organization receives it. If you have no endpoint that receives it, the notification is discarded: it is not stored or delivered later.

To register your endpoint, follow Set up webhooks.

What it contains

The same body, indented for reading. What is signed is the exact text that arrives, without indentation.
{
  "id": "019a4f2c6d3e7a81b9c42e5f6a7b8c9d:final",
  "type": "sms.final_status",
  "data": {
    "id": "019a4f2c-6d3e-7a81-b9c4-2e5f6a7b8c9d",
    "status": "failed",
    "cause": "carrier_undeliv",
    "batchId": "bat_6f1d2c9e8b7a4f3e9d2c1b0a5e4f3d2c",
    "clientRef": "pedido-48213",
    "segments": 2,
    "deliveredSegments": 1,
    "receivedAt": "2026-11-04T09:15:02.481-05:00",
    "finalAt": "2026-11-04T09:15:09.112-05:00"
  }
}

The causes

The values Hablame produces today for cause in a message that was not delivered; some, as noted, do not arrive in a message from the API. Those starting with hablame_ are Hablame failures; those starting with carrier_, what the destination carrier answered. Store the value as it is: if one appears that is not in this table, treat it as a failure without detail.

The full notification

What your endpoint receives (example signed with the example secret)
POST /webhooks/hablame HTTP/1.1
Host: tu-dominio.com
Content-Type: application/json
User-Agent: Hablame-Webhooks/1
X-Hablame-Event-Type: sms.final_status
X-Hablame-Delivery-Id: wdl_01K97Y3M5Q8R2T6V9W4X1Z0ABC
X-Hablame-Timestamp: 1793801710
X-Hablame-Signature: sha256=77bcb2cf0a1823b7250f2b3c06ef609665ea9082f4ba699a7e124e002fc15708
Idempotency-Key: wdl_01K97Y3M5Q8R2T6V9W4X1Z0ABC

{"id":"019a4f2c6d3e7a81b9c42e5f6a7b8c9d:final","type":"sms.final_status","data":{"id":"019a4f2c-6d3e-7a81-b9c4-2e5f6a7b8c9d","status":"failed","cause":"carrier_undeliv","batchId":"bat_6f1d2c9e8b7a4f3e9d2c1b0a5e4f3d2c","clientRef":"pedido-48213","segments":2,"deliveredSegments":1,"receivedAt":"2026-11-04T09:15:02.481-05:00","finalAt":"2026-11-04T09:15:09.112-05:00"}}

Duplicates and several endpoints

  • The same notification can arrive more than once with the same X-Hablame-Delivery-Id. Drop it if you already have it.
  • If several of your endpoints receive it, each one carries its own X-Hablame-Delivery-Id, but the event id is the same for all of them. If those endpoints write to the same database, use the id to avoid storing the same status twice.

Receive them in batches

If you send many messages, you can receive their final statuses in batches: name sms.final_status.batch when you register your endpoint. That endpoint receives up to 500 notifications in a single request, and stops receiving them one by one even if it also names sms.final_status or receives every SMS event. Your other endpoints do not change.

  • The batch carries type equal to sms.final_status.batch, its own id (it starts with fsb_) and, in data.events, the notifications: each one with the same id, type and data it would have if it arrived alone. data.count says how many there are.
  • The headers and the signature are the usual ones, computed over the whole batch body. X-Hablame-Event-Type carries the batch type.
  • Respond 2xx once you have stored the whole batch. If you respond anything else, the whole batch is sent again.
  • The same notification can arrive in two different batches. Use the id of each notification, not the batch one, to avoid storing it twice.
a batch with two notifications
{
  "id": "fsb_3c9a1e7d5b2f4a6c8e0d1b3f5a7c9e2d",
  "type": "sms.final_status.batch",
  "data": {
    "count": 2,
    "events": [
      {
        "id": "019a4f2c6d3e7a81b9c42e5f6a7b8c9d:final",
        "type": "sms.final_status",
        "data": {
          "id": "019a4f2c-6d3e-7a81-b9c4-2e5f6a7b8c9d",
          "status": "failed",
          "cause": "carrier_undeliv",
          "batchId": "bat_6f1d2c9e8b7a4f3e9d2c1b0a5e4f3d2c",
          "clientRef": "pedido-48213",
          "segments": 2,
          "deliveredSegments": 1,
          "receivedAt": "2026-11-04T09:15:02.481-05:00",
          "finalAt": "2026-11-04T09:15:09.112-05:00"
        }
      },
      {
        "id": "019a4f2c71aa7c028d154b6e7f8091a2:final",
        "type": "sms.final_status",
        "data": {
          "id": "019a4f2c-71aa-7c02-8d15-4b6e7f8091a2",
          "status": "delivered",
          "batchId": "bat_6f1d2c9e8b7a4f3e9d2c1b0a5e4f3d2c",
          "clientRef": "pedido-48214",
          "segments": 1,
          "deliveredSegments": 1,
          "receivedAt": "2026-11-04T09:15:02.507-05:00",
          "finalAt": "2026-11-04T09:15:05.334-05:00"
        }
      }
    ]
  }
}

Query the message

The query can take a few seconds

After you receive the notification, the message query (GET /api/v6/sms/messages/{id}) can take a few seconds to show it: it may answer 202 with status: in_progress (it is still being recorded) or bring it still without its final status. It does not mean the notification is wrong. Wait a few seconds and query again with the same id.

With the API v6, the message query (GET /api/v6/sms/messages/{id}) brings a delivery block inside data with the three outside steps: when Hablame accepted it, when the carrier accepted it and when it was delivered, plus how many parts the carrier accepted and delivered.

  • It only comes once it has been decided how the message goes out or once it has a final status. If it does not come, the query only gives the status of the message at Hablame.
  • A step that has not happened yet does not come: an invented time never arrives. Read them by name and do not reject the response because one is missing.
  • If it cannot be read for a moment, the response arrives without delivery. Query again later.
{
  "delivery": {
    "acceptedByHablameAt": "2026-11-04T10:00:00.000-05:00",
    "acceptedByCarrierAt": "2026-11-04T10:00:01.250-05:00",
    "deliveredAt": "2026-11-04T10:00:07.900-05:00",
    "finalStatus": "delivered",
    "parts": 1,
    "acceptedParts": 1,
    "deliveredParts": 1
  }
}

Keep in mind

  • One arrives per message and never one per part. If the same notification arrives more than once, it carries the same X-Hablame-Delivery-Id.
  • A message that has not finished yet brings no notification: if the carrier never confirms a part, the notification can be late or never arrive.
  • Optional fields are left out when they have no value. Read them by name and do not reject a notification because one of them is missing.

Need help?

Was this page helpful?

See all support channels

Your cookie preferences

You decide what we measure. You can change your choice at any time. Rejecting takes no feature away from the documentation.

Privacy policy