Message Failure Codes
Last updated
Last updated
When sending messages to the Channels API,/workspaces/:id/messages/:id
, a message can end up in a failed status. The possible failure statuses are
sending_failed
delivery_failed
Errors are captured in the message in the reason
and also failure
object. See the example below
The reason
is always a platform-specific error, e.g., why WhatsApp rejected the message or an SMS message was blocked.
The failure code groups errors encountered across different channel platforms into a more general grouping designed to be both service and channel-agnostic (meaning, for example, both a failed WhatsApp message and an SMS can have the same failure code). In addition to the delivery status report, the Failure code can be checked in each channel log inspection view.
Error codes are divided into three categories
12XXX: Service Errors that could happen in channels API but are not directly caused by the user
14XXX: Customer Error that could occur due to customers' actions
15XXX: Platform Errors that could happen due to platform issue
Errors that could happen in channels API but are not directly caused by the user. Examples include inter-system routing, template conversion, or no price for a destination. We reserve 12XXX for this kind of error.
DEPENDENCY_ERROR: 12001
It is expected when channels receive a generic internal error from dependencies.
UNSUPPORTED_TYPE: 12002
It is expected that attempting to convert a message into platform-specific messages results in an unsupported template by that platform.
UNSUPPORTED_DESTINATION: 12003
It is expected when the source number and destination combination are not allowed
UNKNOWN_PRODUCT: 12004
It is expected when trying to send a message to an unsupported product, we will receive this error.
UNKNOWN_ROUTING: 12005
It is expected when attempting to call an unknown API.
INVALID_MESSAGE: 12006
It is expected when a platform rejects a message due to the wrong json (could be either property or type that was not supported)
BILLING_FALIURE:12007
It is expected when charging of the message failed
Errors that could happen due to customers. Example: Invalid phone number, etc. We reserve 14XXX for this kind of error.
INVALID_BALANCE: 14001
It is expected when a workspace is out of balance.
INVALID_DESTINATION: 14002
It is expected when a destination number is not allowed to receive this type of message (for example a landline number that cannot receive SMS) .
INVALID_TEMPLATE: 14003
It is expected when a message's template is invalid.
UNSUPPORTED_MEDIA_TYPE: 14004
It is expected when an unsupported media type is sent to the platform.
INVALID_SESSION_WINDOW: 14005
It is expected when an end-user is out of the session window.
Errors could happen due to platform issues, such as being marked as spam, blocked by the platform, attempting to send unsupported content, etc. We reserve 15XXX for this kind of error.
UNKNOWN_FAILURE: 15001
It is expected when the platform worker receives an unrecognized error from the platforms.
INVALID_PERMISSION: 15002
It is expected when a customer (or sender or workspace) misses the required permissions to send messages to the receiver's country or destination.
FAILURE_ENTITY_PROCESSING: 15003
It is expected when the platform accepts a request body but can not be processed later due to internal errors/processing issues.
INVALID_PAYMENT: 15004
It is expected when a payment issue occurs.
UNKNOWN_SUBSCRIBER: 15005
It is expected when a platform does not recognize the receivers of a message as active or valid (for example a well-formed number not assigned to any user).
FAILURE_SUBSCRIBER: 15006
It is expected when a platform cannot send messages to a subscriber due to subscriber configuration/availability.
FAILURE_ROUTING: 15007
It is expected when a platform cannot route the message to the destination.
UNSUPPORTED_ACTION: 15008
It is expected when a customer tries to send a message using an unsupported action.
INVALID_SUBSCRIPTION: 15010
It is expected when a customer tries to send a message to an unsubscribed receiver.
INVALID_SPAM: 15011
It is expected when a platform marks the message as policy/spam/malicious activity.
INVALID_CAPACITY: 15012
It is expected when a platform blocks sending from/of a channel because it uses high capacity in a short period/ or reaches its limit quota.
FAILURE_MESSAGE_BOUNCED: 15013
It is expected when a platform bounces a message being sent to an end user, we will receive this error.
INVALID_BLOCKED_CHANNEL: 15014
It is expected when a platform blocks a channel to send any message to an end user.
FAILURE_POLICY: 15015
It is expected when a platform blocks a business/customer from sending a message to an end user due to a policy violation.
OPTEDOUT_RECEIVER: 15016
It is expected when a message is sent to a receiver who has previously opted out of a prior subscription.