Programmable Messaging | Jul. 10, 2024
Updates to the error code dictionary to clarify number validation errors
We are committed to enhancing your integration experience and ensuring our customers can successfully send messages. However, we understand that sometimes errors occur, and we aim to provide you with the quickest guidance to resolve them. That is why we are updating the error code dictionary to improve clarity and usability.
Previously, some error codes lacked clear explanations for message failures or covered too many possible causes to be useful. As a result, we have introduced new, more specific error codes derived from existing ones to enhance visibility and enable better self-service capabilities.
We now return more specific error codes for SMS messages. Previously, these conditions were grouped under general codes such as 21211, 21212, 21606, and 21614. For clarity, we have created new error codes for the following cases where messages cannot be sent:
Sending to a Short Code
Sending a message to itself
Sending a message from an Alphanumeric Sender ID on trial accounts
Sending a message to Premium or Information Service numbers
Sending a message to a landline number
Sending a message from a non-Twilio number
Sending a message from a number not associated with your account
Sending a message from a non-SMS capable number
Note: Since error code causes and solutions can change, we recommend avoiding writing programmatic logic based on error code fields as we are constantly making adjustments.