Outbound SMS errors and status codes#
Use this reference to look up the errors and status values of outbound SMS. The API returns HTTP errors immediately when it rejects a request. Processing results and delivery statuses arrive later in callbacks.
Result |
Where it appears |
Values |
|---|---|---|
The API response |
HTTP status codes, such as |
|
The message status callback |
|
|
The DLR event callback |
|
HTTP and API errors#
If your API request is malformed or unauthorized, the API returns an
immediate error response. Each error response contains an errors array
in the JSON:API error format with the
title, detail, code, and status fields.
Returned when the request payload does not follow JSON:API or the request attributes are invalid. For example, a required attribute
is missing or empty, destination starts with +, a bulk request
has more than 1000 numbers, or the request has neither source nor
campaign_id. When the resource type is wrong, detail is
type is invalid.
1{
2 "errors": [
3 {
4 "title": "Bad Request",
5 "detail": "Invalid request",
6 "code": "400",
7 "status": "400"
8 }
9 ]
10}
Returned when the Authorization header is missing or invalid, or
when the request comes from an IP address that the trunk does not
allow. See Authentication.
1{
2 "errors": [
3 {
4 "title": "Unauthorized",
5 "detail": "Authorization failed",
6 "code": "401",
7 "status": "401"
8 }
9 ]
10}
Returned when the Content-Type header is not
application/vnd.api+json. See Request headers.
1{
2 "errors": [
3 {
4 "title": "Unsupported Media Type",
5 "detail": "Unsupported Media Type",
6 "code": "415",
7 "status": "415"
8 }
9 ]
10}
Returned when the request rate exceeds the rate limit.
1{
2 "errors": [
3 {
4 "title": "Too many requests",
5 "detail": "too many requests in a given amount of time",
6 "code": "429",
7 "status": "429"
8 }
9 ]
10}
Message processing status and codes#
The message status callback reports how DIDWW processed each message.
|
Description |
|---|---|
|
The message was sent successfully. |
|
DIDWW could not route the message, for example because the trunk
cannot use the sender. The message is not sent, and
|
|
The message failed. |
The code_id attribute provides specific details about a message failure.
|
Description |
|---|---|
|
Message was sent successfully |
|
No routes found |
|
No rate found |
|
Internal error |
|
SMS trunk is blocked |
|
Origination account is blocked |
|
SMS source address is not allowed |
|
SMS destination address is not allowed |
|
Sender ID Verification not found |
|
Sender ID Verification is blocked |
|
No balance was available during the message’s TTL |
|
All delivery attempts failed within the TTL |
|
No encoding available |
|
Max balance attempts reached |
|
Message defragmentation failed |
|
Routing failed |
For the retry schedule of callbacks that your endpoint does not accept, see Delivery behavior and constraints.
Delivery receipt status values#
When DLR events are enabled, the DLR event callback reports the final
delivery status that the destination carrier returns in its status
attribute.
The value depends on the carrier. Carriers can use different values,
spellings, and formats. For example, one carrier can return DELIVERED and
another DELIVERD for a delivered message. DIDWW does not guarantee that
the value matches a predefined list, so do not rely on a fixed set of values
in your application.
Outbound SMS logs#
The Outbound SMS logs show the Status and
Reason of each sent message. The Reason describes the message’s
code_id in words. For example, a message with
code_id 8 has the Status ROUTING ERROR and the Reason SMS
source address is not allowed.