Docs
OverviewPlatformPlatform APIA2P Messaging API
AI & MCP
Open dashboard
OverviewPlatformPlatform APIA2P Messaging API
AI & MCP
  • Overview
  • Create an account
  • Choose your API
  • AI & MCP
Channels
    • Senders
    • Coverage
    • Destination countries
    • Wildcard route
    • Agents
HTTP
  • Quickstart
  • Bulk sending
  • Authentication
  • Rate limits
  • Errors
  • DLRs
  • Traffic metrics
  • Full API Reference
SMPP
  • Authentication
  • Integration
SDKs
  • Node.js
  • PHP
  • Python
  • Ruby
  • Java
Legacy API
  • Overview
  • Authentication
  • Full API Reference
DashboardSupportinstasent.com

A2P Messaging API · HTTP

Receiving DLRs

Delivery reports (DLRs) are POSTed to a webhook URL configured per API token. Each call describes one status transition — sent, delivered, failed, inbound — with a machine-readable status and code.

On this page▾
  • Configuring the webhook
  • Payload shape
  • Status list
  • Code list
  • Idempotency
  • What's next

A DLR (Delivery Receipt) is how carriers tell you what happened to a message after it left Instasent. We aggregate the updates from every hop in the chain and forward each transition to a webhook you control. If two-way messaging is enabled on your account, inbound messages arrive on the same endpoint.

Configuring the webhook

Webhooks are configured per api_sms token in the dashboard. Point it at a public HTTPS endpoint that returns 2xx quickly — we consider any non-2xx a failure and retry with exponential backoff.

Respond in under 5 seconds with a 2xx and process the payload asynchronously. Long-running handlers trigger timeouts, retries and duplicate deliveries.

Payload shape

Every call is a POST with a JSON body:

{
  "id": "sms-id",
  "clientId": "custom-id",
  "status": "delivered",
  "code": 0,
  "eventAt": "2026-04-21T10:15:00Z"
}
FieldDescription
idThe Instasent message id. Matches the id returned when the SMS was created.
clientIdThe clientId you supplied when creating the message, if any — useful for correlation against your own records.
statusMachine-readable status. See the list below.
codeNumeric code that narrows down the reason for error/failed statuses.
eventAtISO-8601 timestamp of the event.

When two-way is enabled on the account, the payload also carries a message field with the inbound text.

Status list

StatusMeaning
sentMessage was sent to the device.
acceptedMessage was accepted by the carrier.
bufferedMessage is buffered by the carrier, waiting to be delivered.
deliveredMessage was delivered to the handset.
errorMessage could not be sent to the device.
failedMessage could not be delivered.
expiredMessage expired before delivery was possible.
canceledMessage was canceled.
rejectedMessage was rejected by the carrier.
unknownAn unknown error occurred.
stopAn opt-out inbound message was received from the handset.
inboundAn inbound message was received (two-way only).

Code list

Codes narrow down the reason for non-delivery. 0 is the happy path; everything else describes a specific failure class.

CodeMeaning
0OK
1Unknown
2Absent temporarily
3Absent permanently
4Blocked subscriber
5Portability error
6Antispam reject
7Line busy
8Network error
9Illegal number
10Invalid message
11Unroutable
12Unreachable
13Age restriction
14Blocked carrier
15Insufficient funds
16Flooded
99Unknown error
100Reject

Idempotency

The same message may generate multiple DLRs — typically sent → buffered → delivered. Use id as the primary key and treat each DLR as a status transition, not as the final state.

Persist the latest status and eventAt per id rather than appending every event. If your pipeline needs the full audit trail, log the raw payload to a separate store.

If what you need from DLRs is counts rather than per-message state (how many were delivered or failed per day, country, network or token), SMS traffic metrics returns them already aggregated.

What's next

  • Errors — for failures that happen before the message even leaves the API.
  • SMS traffic metrics — the same outcomes counted for you per UTC day or month (delivered, failed, messages without a report…), by country, network and token, without storing every DLR.
  • API Reference — retrieve the current status of a message on demand.

Product and pricing

  • SMS API
  • SMS and RCS pricing

Last updated October 5, 2026

PreviousErrorsNextTraffic metrics
  • Configuring the webhook
  • Payload shape
  • Status list
  • Code list
  • Idempotency
  • What's next

© 2026 Instasent

Privacy PolicyTerms & ConditionsCookie PolicyLegal Notice
All systems operational