---
updatedAt: 2026-08-21T17:25:35.000Z
---

# Outbound send failure

Sent when Enrich encountered an unexpected error while attempting to send an outbound message you requested — distinct from a channel `FAILED` delivery report. This payload uses the `OutboundFailureWebhookPayload` shape and does **not** include an `eventType` field.

- `messageType` is the RCS message type that was being sent (`TEXT`, `MEDIA`, `CARD`, `CAROUSEL`, `CHOICE`, `LOCATION`).
- `messageContent` is the original message content, serialized as a JSON string for reference.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "First Orion Enrich Branded Messaging API",
    "version": "2026-09-01.0.rc-0",
    "description": "# First Orion Enrich Branded Messaging\n\nThis document describes the complete Enrich Branded Messaging integration surface:\n\n- **`paths`** — the REST endpoints **you call** on First Orion: queueing outbound RCS messages, and fetching the JWKS used to verify callbacks.\n- **`webhooks`** — the callbacks **Enrich calls on you**. You implement an HTTPS endpoint and register it against an RCS agent; Enrich `POST`s every inbound message, notification, and outbound send failure to that URL.\n\n## Event catalog\n\nEnrich sends two families of payloads to your webhook:\n\n1. **`EndUserWebhookPayload`** — every inbound message and notification. `eventType` is either `MESSAGE` or `NOTIFICATION`.\n   - `MESSAGE` events carry a `messageContent` object whose shape is selected by `messageContent.messageType` (`TEXT`, `MEDIA`, `CHOICE`, `LOCATION`).\n   - `NOTIFICATION` events carry a `notificationType` (`TYPING`, `DELIVERED`, `READ`, `FAILED`, `CHANNEL_SWITCHED`).\n2. **`OutboundFailureWebhookPayload`** — Enrich failed to send an outbound message you requested. Flatter shape, no `eventType` field.\n\nAll callbacks are delivered to the **same** webhook URL. They are listed separately here to document every distinct payload variant your endpoint must handle.\n\n## Channels\n\nEnd users may respond over RCS or SMS. Both are delivered to your webhook using the same payloads — **there is no channel field**, so an SMS reply and an RCS reply are structurally identical.\n\n- **SMS** replies arrive only as `MESSAGE` events with `messageContent.messageType` = `TEXT`. Delivery outcomes for messages you send over SMS may also arrive as `DELIVERED` / `FAILED` notifications.\n- **RCS** supports the full set of events. The richer variants — `MEDIA`, `CHOICE` and `LOCATION` messages, and the `TYPING` and `READ` notifications — are only produced for RCS conversations.\n\nDesign your handler to treat `TEXT` messages and delivery notifications as channel-agnostic, and to simply not expect the RCS-only variants for SMS conversations.\n\n## Callback delivery mechanics\n\n- **Method / content type:** `POST` with `Content-Type: application/json`.\n- **Endpoint:** the webhook URL you configured for the agent.\n- **Expected response:** return a `2xx` status code to acknowledge receipt.\n  - A `4xx` response is treated as permanent — Enrich will **not** retry.\n  - A `5xx` response (or a network/connection error) is retried up to **4 attempts** with a **5 second** delay between attempts. After retries are exhausted the event is dropped.\n- **Ordering:** events are processed per contact, but delivery ordering is not guaranteed across event types.\n\n## Callback authentication\n\nEvery callback carries an `Authorization: Bearer <JWT>` header — a `PS256`-signed token produced by First Orion (KMS-backed asymmetric signing). See the `enrichCallbackJwt` security scheme for the claim set, and `GET /.well-known/jwks.json` for the verification keys.\n\n## Schema naming\n\n- **Outbound** (things you send) content types are named `*Content`: `TextContent`, `MediaContent`, `CardContent`, `CarouselContent`, `ChoiceContent`.\n- **Inbound** (things you receive) content types are grouped under `InboundMessageContent`: `TextMessageContent`, `MediaMessageContent`, `ChoiceResponseContent`, `LocationMessageContent`.\n",
    "contact": {
      "name": "First Orion Enrich",
      "url": "https://firstorion.com"
    }
  },
  "servers": [
    {
      "url": "https://api.firstorion.com",
      "description": "Production. Applies to the endpoints under `paths` only — callbacks under `webhooks` are delivered to the URL you configure for your agent."
    }
  ],
  "tags": [
    {
      "name": "Callbacks",
      "description": "Payloads Enrich POSTs to the webhook URL you host. You implement these; Enrich is the client."
    }
  ],
  "webhooks": {
    "outboundFailureNotification": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "outboundFailureNotification",
        "summary": "Outbound send failure",
        "description": "Sent when Enrich encountered an unexpected error while attempting to send an outbound message you requested — distinct from a channel `FAILED` delivery report. This payload uses the `OutboundFailureWebhookPayload` shape and does **not** include an `eventType` field.\n\n- `messageType` is the RCS message type that was being sent (`TEXT`, `MEDIA`, `CARD`, `CAROUSEL`, `CHOICE`, `LOCATION`).\n- `messageContent` is the original message content, serialized as a JSON string for reference.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OutboundFailureWebhookPayload"
              },
              "examples": {
                "outboundFailure": {
                  "summary": "Outbound message send failure",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "messageType": "TEXT",
                    "messageContent": "{\"text\":\"Your order has shipped!\"}",
                    "failureReason": "An unexpected error occurred when sending the message"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Callback acknowledged."
          },
          "4XX": {
            "description": "Permanent failure. Enrich will not retry."
          },
          "5XX": {
            "description": "Transient failure. Enrich retries up to 4 times, 5s apart."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "enrichCallbackJwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "A per-request `PS256`-signed JWT issued by First Orion (KMS-backed), sent on every callback in the `Authorization: Bearer <token>` header. Verify it against `GET /.well-known/jwks.json`.\n\nClaims:\n- `iss` = `firstorion.com`\n- `aud` = your configured webhook URL\n- `sub` = `First Orion Enrich Branded Messaging Webhook`\n- `jti` = unique id per delivery\n- `iat` / `exp` = issued-at and expiry (5 minute lifetime)\n- `pbh` = `base64url(SHA-256(rawRequestBody))`, binding the token to the exact request body. Verify this to detect body tampering."
      }
    },
    "schemas": {
      "RcsMessageType": {
        "type": "string",
        "description": "The RCS message type.",
        "enum": [
          "TEXT",
          "MEDIA",
          "CARD",
          "CAROUSEL",
          "CHOICE"
        ]
      },
      "OutboundFailureWebhookPayload": {
        "type": "object",
        "description": "Sent when Enrich failed to send an outbound message you requested. A distinct payload shape with no `eventType` field.",
        "required": [
          "agentId",
          "agentDisplayName",
          "contactNumber",
          "messageType",
          "messageContent",
          "failureReason"
        ],
        "properties": {
          "agentId": {
            "type": "string",
            "description": "The RCS agent id the outbound message was sent from.",
            "example": "abc123xyz456"
          },
          "agentDisplayName": {
            "type": "string",
            "description": "The display name of the RCS agent.",
            "example": "Acme Support"
          },
          "contactNumber": {
            "type": "string",
            "description": "The intended recipient's phone number in E.164 format.",
            "example": "+12345678901"
          },
          "messageType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsMessageType"
              }
            ],
            "description": "The RCS message type that was being sent.",
            "example": "TEXT"
          },
          "messageContent": {
            "type": "string",
            "description": "The original outbound message content, serialized as a JSON string for reference.",
            "example": "{\"text\":\"Your order has shipped!\"}"
          },
          "failureReason": {
            "type": "string",
            "description": "Human-readable reason the send failed.",
            "example": "An unexpected error occurred when sending the message"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```