Message Response Handling
This page is a lookup for the responses POST /v3/messages returns: the success/data/error envelope, per-recipient message IDs, and the error payloads for validation, authentication, and rate-limit failures. For production retry patterns, refer to Error Handling. For inbound messages and RCS suggestion-chip taps, refer to Two-Way Conversations.
Response Structure
All API responses follow a consistent structure:
{
"success": boolean,
"data": object | null,
"error": object | null,
"meta": {
"request_id": string,
"timestamp": string,
"version": "v3"
}
}| Field | Type | Description |
|---|---|---|
success | boolean | true for 2xx responses, false for errors |
data | object | null | Response payload (null on error) |
error | object | null | Error details (null on success) |
meta | object | Request metadata including request_id for support |
Success Response (202 Accepted)
When a message is successfully accepted:
{
"success": true,
"data": {
"status": "QUEUED",
"template_id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
"template_name": "order_confirmation",
"recipients": [
{
"message_id": "8ba7b830-9dad-11d1-80b4-00c04fd430c8",
"to": "+14155551234",
"channel": "sms"
}
]
},
"error": null,
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-04T11:28:25.2096416+00:00",
"version": "v3"
}
}Multi-Channel Response
When sending to multiple channels, you get one recipient entry per (recipient, channel) pair:
{
"success": true,
"data": {
"status": "QUEUED",
"template_id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
"template_name": "order_confirmation",
"recipients": [
{
"message_id": "msg-uuid-1",
"to": "+14155551234",
"channel": "whatsapp"
},
{
"message_id": "msg-uuid-2",
"to": "+14155551234",
"channel": "sms"
}
]
},
"error": null,
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-04T11:28:25.2096416+00:00",
"version": "v3"
}
}Error Responses
400 Bad Request (Validation Error)
{
"success": false,
"status": 400,
"error": {
"code": "VALIDATION_004",
"message": "Request validation failed",
"details": {
"to": ["'to' must contain at least one recipient"],
"template": ["'template' is required"]
},
"doc_url": "https://docs.sent.dm/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-04T11:28:25.2096416+00:00",
"version": "v3"
}
}401 Unauthorized
Invalid or missing API key:
{
"success": false,
"status": 401,
"error": {
"code": "AUTH_001",
"message": "Invalid API key",
"doc_url": "https://docs.sent.dm/reference/api/authentication"
}
}404 Not Found
Template not found:
{
"success": false,
"status": 404,
"error": {
"code": "RESOURCE_002",
"message": "Template not found",
"doc_url": "https://docs.sent.dm/reference/api/error-catalog"
}
}429 Rate Limit
Too many requests:
{
"success": false,
"status": 429,
"error": {
"code": "BUSINESS_002",
"message": "Rate limit exceeded. Retry after 60 seconds",
"details": {
"retry_after": 60,
"limit": 200,
"window": "60s"
},
"doc_url": "https://docs.sent.dm/reference/api/rate-limits"
}
}Insufficient Balance (Asynchronous)
POST /v3/messages does not return a synchronous payment error. Sends are accepted with 202 even when your balance is too low; each affected message is then finalized as BLOCKED and fires a message.blocked webhook event. Refer to Queue for Later in the Error Handling guide for the recovery pattern, and to BUSINESS_003 in the Error Catalog for the legacy v2 behavior.
Error Code Reference
The preceding examples show the response shapes your handler parses. For the complete enumeration of error codes with causes and remediation steps, refer to the Error Catalog.
Handling Errors in Production
The Error Handling guide owns production error handling: classifying retryable failures, exponential backoff with jitter, circuit breakers, and channel fallbacks. For safe re-sends with idempotency keys, refer to How to retry Sent API requests safely.
Related Guides
Sending Messages
Core message sending guide with all SDK examples
Best Practices
Message ID storage, idempotency, and cost optimization
Error Handling
Comprehensive error handling patterns
Two-Way Conversations
Inbound messages, opt-out keywords, and RCS suggestion chips
Message Best Practices
Harden your Sent send path for production: store per-recipient message IDs, make critical sends idempotent, apply RCS send rules, and estimate bulk costs.
SMS Length, Segments & Cost
How Sent counts SMS segments, how segments map to billing, and practical tips to keep messages short and predictable