Recommended message record
- Provider message ID and your request ID
- Recipient in normalized E.164 format
- Country, sender, route and template reference
- Segment count and submission timestamp
- Latest status, status time and failure category
Developer guide
Use this public guide to design authentication, sending, status tracking, retries and webhook processing. Your authenticated account documentation remains the source of truth for the exact base URL, endpoint paths, request fields, credentials and limits assigned to your account.
Quickstart architecture
Keep synchronous request handling short. Store the returned message identifier, then treat delivery reports as the final operational signal.
Request pattern
Never expose a secret API key in browser code, mobile applications, public repositories, screenshots or support messages.
curl -X POST "<BASE_URL><SEND_ENDPOINT>" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: YOUR_UNIQUE_REQUEST_ID" \
-d '{
"to": "+14155550123",
"message": "Your verification code is 482913"
}'
Response handling
Store enough context to trace a request through delivery, support and reconciliation without logging message content or secrets unnecessarily.
{
"messageId": "provider-message-id",
"status": "accepted"
}
Message lifecycle
| Stage | Meaning | Application behavior |
|---|---|---|
| Accepted | The platform accepted the request for processing. | Persist the message ID; do not mark the SMS delivered. |
| Queued / processing | The message is awaiting or undergoing route submission. | Keep the state non-final and monitor latency. |
| Sent / submitted | The message was submitted downstream. | Wait for a final delivery report where available. |
| Delivered | A final delivery signal reports successful handset delivery. | Record delivery time and calculate end-to-end latency. |
| Failed / rejected / expired | A final signal indicates non-delivery or rejection. | Store the reason, classify it and retry only when the failure is retryable. |
Reliability rules
Use explicit connection and response timeouts. An unknown client result does not prove the provider rejected the request.
Assign a unique request key and store it before submission so a retry cannot silently create a second user message.
Retry transient failures with exponential backoff and jitter. Cap attempts and send persistent errors to an operational queue.
Queue work, respect the assigned limit and reduce concurrency after throttling instead of immediately retrying every request.
Use separate keys by environment, restrict access, rotate keys and remove sensitive values from application logs.
Track request success, final delivery, p50/p95 latency, retry rate, webhook lag and failures by country and carrier.
Client behavior
Use the exact codes in your account reference. The categories below describe safe HTTP client behavior rather than claiming a platform-specific response contract.
| Response class | Typical interpretation | Recommended action |
|---|---|---|
| 2xx | Request accepted or processed according to the endpoint contract. | Parse and store the response; continue status tracking. |
| 400 / 422 | Invalid number, field, template or request shape. | Do not retry unchanged; validate and correct the request. |
| 401 / 403 | Credential, permission or policy problem. | Stop retries, protect the key and investigate access. |
| 429 | Assigned request rate exceeded. | Honor retry guidance, reduce concurrency and use backoff. |
| 5xx / network failure | Potential transient provider or network issue. | Retry with idempotency, backoff, jitter and a maximum attempt count. |
Webhooks
Release discipline
An integration is easier to operate when test traffic, production traffic and API changes are visible and independently controlled.
Use separate credentials, webhook endpoints, recipient allowlists and monitoring for development, staging and production. Never test failure handling by sending uncontrolled traffic from a production account.
Validate required response fields, status mappings and signature verification in automated tests. Preserve representative redacted payloads so a parser change can be tested without exposing recipient data or API secrets.
Track the documented API version and changelog, review deprecation notices, deploy compatible clients before a deadline and keep a rollback path. Do not infer compatibility from one successful request.
Use the authenticated account API reference. It should be treated as authoritative for your base URL, endpoint paths, authentication headers, request fields, responses and assigned limits.
No. A browser cannot safely keep a secret API key. Send requests from a trusted backend and expose only the minimum application endpoint your client needs.
Retry only transient network, throttling or server failures, using idempotency and bounded exponential backoff. Do not retry an unchanged validation or authorization failure.
Store the message identifier and process the documented delivery report or status-query result. A synchronous accepted response is not the final handset-delivery result.
Use this architecture guide for production safety, then copy the assigned endpoints and fields from your authenticated reference.