Messaging Error Codes
Messages with a delivery receipt indicating a failure will be tagged with a code indicating the cause of the failure. You can use this to identify when messages haven't gone through and understand why.
In the v1 API, the status of these messages may be any of failed
, gw_reject
, or gw_timeout
.
In the v2 API, the status of these messages may be any of delivery_failed
or expired
.
A code and title in the table below will be included on the Message Detail Record (MDR) sent to a webhook or requested via the API in the errors
field.
Code | Title | Description |
40001 | Not routable | The destination number is either a landline or a non-routable wireless number. |
40002 | Blocked as spam - temporary | The message was flagged by a SPAM filter and was not delivered. This is a temporary condition. |
40003 | Blocked as spam - permanent | The message was flagged by a SPAM filter and was not delivered. The originating phone number is permanently blocked. |
40004 | Rejected by destination | The recipient server is rejecting the message for an unknown reason. |
40005 | Message expired during transmission | The message expired before it could be fully delivered to the recipient. This error occured after the message left Telnyx and was en route to the destination. |
40006 | Recipient server unavailable | The recipient server is unavailable or not responding. This may be a temporary issue. |
40007 | Loop detected | Infinite loop detected. |
40008 | Undeliverable | The recipient carrier did not accept the message. This is a general purpose undeliverable message. |
40009 | Invalid message body | The message body was invalid. The rules Telnyx uses to allow messages may not align with all carriers at all times. If the destination carrier uses more stringent rules, they may reject messages. |
40011 | Too many requests | Exceeded upstream rate limit. As a result the message was flagged by a SPAM filter and was not delivered. This is a temporary condition. |
40012 | Invalid messaging destination number | The destination phone number was deemed invalid by the carrier. |
40013 | Invalid messaging source number | The source phone number was deemed invalid by the carrier. |
40014 | Message expired in queue | The message expired in the queue. This error occured before Telnyx attempted to relay your message, and you were not billed. |