# Delivery reports and webhooks

https://docs.sendsms.to/en/guides/delivery-reports/

How to learn what became of a message: status on request, batch reconciliation and where webhooks stand.

## Status of one message

After a 202 answer keep the `messageId` and ask [GET /v1/messages/{id}](https://docs.sendsms.to/en/api/message-status/). The answer carries the current state, a customer-facing interpretation and the `poll_after_seconds` hint: how many seconds to wait before asking again.

```bash
curl --max-time 30 --request GET \
  --url 'https://api.sendsms.to/v1/messages/MESSAGE_ID' \
  --header "X-API-Key: $SENDSMS_API_KEY"
```

Response 200:

```json
{
  "id": "00000000-0000-0000-0000-000000000002",
  "status": "sent",
  "status_info": {
    "outcome": "pending",
    "poll_after_seconds": 5
  }
}
```

## Many messages at once

To reconcile a list use [POST /v1/messages/statuses](https://docs.sendsms.to/en/api/message-statuses/): up to 100 identifiers per request, answered in the same order.

```bash
curl --max-time 30 --request POST \
  --url 'https://api.sendsms.to/v1/messages/statuses' \
  --header "X-API-Key: $SENDSMS_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "ids": [
    "MESSAGE_ID"
  ]
}'
```

Response 200:

```json
{
  "results": [
    {
      "id": "00000000-0000-0000-0000-000000000002",
      "found": true,
      "message": {
        "id": "00000000-0000-0000-0000-000000000002",
        "channel": "sms",
        "destination": "+994000000000",
        "status": "sent",
        "created_at": "2026-10-28T10:00:00Z",
        "updated_at": "2026-10-28T10:00:01Z",
        "status_info": {
          "known": true,
          "outcome": "pending",
          "poll_after_seconds": 5,
          "resubmit_safe": false
        },
        "transport": {
          "attempt": 1,
          "status": "submitted",
          "started_at": "2026-10-28T10:00:00Z",
          "resolved_at": "2026-10-28T10:00:01Z",
          "next_attempt_at": null,
          "submitted_segments": 1,
          "total_segments": 1
        }
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000003",
      "found": false,
      "error": "message_not_found"
    }
  ]
}
```

## How often to ask

- Follow `poll_after_seconds`; do not poll more often.
- Final states do not change any more — you can stop polling such a message.
- An uncertain state is a reason to wait and ask again, not to send the SMS again. Repeat a send only with the same `Idempotency-Key`.

## Webhooks

Delivery notifications by subscription (webhooks) are not open in the API yet — they are on the list of resources being prepared for publication. Today the status is read on request as described above. SMPP clients receive delivery receipts (deliver_sm) in the same session — see [SMPP](https://docs.sendsms.to/en/guides/smpp/).

> The response fields and their values are in the reference: [Message status](https://docs.sendsms.to/en/api/message-status/); the general rules are in [Response fields, identifiers & time](https://docs.sendsms.to/en/guides/response-fields/).
