# Message Failure Sources

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 `reason` field and also `failure` object. See the example below

```
"status": "delivery_failed",
 "reason": "details: unknown subscriber; reason: unknown_subscriber; code: 1",
 "direction": "outgoing",
 "details": "unknown_subscriber",
 "failure": {
   "code": 15005,
   "source": {
     "name": "sms-messagebird",
     "code": "1"
     }
```

{% hint style="info" %}
The above is a snippet of the actual entire message object will be retruend&#x20;
{% endhint %}

The `source` of the failure indicates where the issue impacting the message arose.

### pre-processing

It is expected when the message fails during processing (before being sent to a third-party platform)

### accounting

It is expected when a message fails specifically due to an accounting/billing service error (before being sent to a third-party platform)

### contact

It is expected when a message fails specifically due to an issue with the contacts service (before being sent to a third-party platform)

### touchpoint

It is expected when a message fails specifically due to an issue with the touchpoints/ templates service (before being sent to a third-party platform)

### sms-messagebird

It is expected when a message fails due to an error returned from the SMS platform. In such instance `failure.source.code`'s value will contain the specific errors returned from the SMS platform and/or a downstream SMS carrier.  Refer to [SMS Platform Extended Error Codes](https://docs.bird.com/api/channels-api/message-status-and-interactions/message-failure-sources/sms-platform-extended-error-codes) for platform-specific  extended errors

### email-messagebird

It is expected when a message fails due to an error returned from the email platform. In such instance `failure.source.code`'s value will contain the specific errors returned from the email platform.

### whatsapp

It is expected when a message fails due to an error returned from the whatsapp platform. In such instance  `failure.source.code`'s value will contain the specific errors returned from the whatsapp platform. Refer to [WhatsApp Cloud API error](https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes#error-codes) codes for platform-specific extended errors

### facebook

It is expected when a message fails due to an error returned from the facebook platform. In such instance  `failure.source.code`'s value will contain the specific errors returned from the facebook platform. Refer to [Messenger platform error codes](https://developers.facebook.com/docs/messenger-platform/error-codes) for platform-specific extended errors.

### line

It is expected when a message fails due to an error returned from the LINE platform. In such instance  `failure.source.code`'s value will contain the specific errors returned from the Line platform. Refer to [LINE error responses](https://developers.line.biz/en/reference/messaging-api/#error-messages) for platform-specific extended errors.

### apple-business-chat

It is expected when a message fails due to an error returned from the Apple Messages platform. In such instance  `failure.source.code`'s value will contain the specific errors returned from the line platform. Refer to  [Apple Messages response codes](https://register.apple.com/resources/messages/msp-rest-api/common-specs#response-code) for platform-specific extended errors.

### voice

It is expected when a message fails due to an error returned from the voice platform. In such instance  `failure.source.code`'s value will contain the specific errors returned from the voice platform.

### instagram

It is expected when a message fails due to an error returned from the Instagram platform. In such instance  `failure.source.code`'s value will contain the specific errors returned from the Instagram platform. Refer to [Messenger platform error codes](https://developers.facebook.com/docs/messenger-platform/error-codes) for platform-specific extended errors.
