---
updatedAt: 2026-10-05T21:36:56.000Z
---

# Handle outbound message for agent

Queues an outbound message for sending via the RCS channel. The agent must exist and not be suspended, and the caller must have permission to send messages for the agent.

Two optional correlation fields behave differently — note the asymmetry:

- `correlateId` (max 128 chars) tracks outbound campaigns through delivery reports and inbound replies. It is **not sticky**: omitting it on a subsequent send **clears** any existing value on the conversation.
- `conversationMetadata` (JSON object, max 2048 chars serialized) attaches business context that persists on the conversation and is echoed back on inbound replies. It **is sticky**: omitting it does **not** clear an existing value.

Both are returned on the matching `EndUserWebhookPayload` callbacks as `correlateId` and `conversationMetadata`.

## Note!&#x20;

messageContent needs to match the messageType. Example, if using messageType of TEXT, the messageContent should be TextContent.

# 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": "Messaging",
      "description": "Endpoints you call to send messages through your RCS agent."
    },
    {
      "name": "Callbacks",
      "description": "Payloads Enrich POSTs to the webhook URL you host. You implement these; Enrich is the client."
    }
  ],
  "paths": {
    "/fobm/messaging/outbound/{agent-id}": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Handle outbound message for agent",
        "description": "Queues an outbound message for sending via the RCS channel. The agent must exist and not be suspended, and the caller must have permission to send messages for the agent.\n\nTwo optional correlation fields behave differently — note the asymmetry:\n\n- `correlateId` (max 128 chars) tracks outbound campaigns through delivery reports and inbound replies. It is **not sticky**: omitting it on a subsequent send **clears** any existing value on the conversation.\n- `conversationMetadata` (JSON object, max 2048 chars serialized) attaches business context that persists on the conversation and is echoed back on inbound replies. It **is sticky**: omitting it does **not** clear an existing value.\n\nBoth are returned on the matching `EndUserWebhookPayload` callbacks as `correlateId` and `conversationMetadata`.",
        "operationId": "outbound",
        "parameters": [
          {
            "name": "agent-id",
            "in": "path",
            "description": "Unique identifier for the agent",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "abc123xzy456"
          }
        ],
        "requestBody": {
          "description": "Outbound message request payload",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OutboundMessageRequest"
              },
              "examples": {
                "text": {
                  "summary": "RCS text message",
                  "value": {
                    "number": "+14155552671",
                    "messageType": "TEXT",
                    "messageContent": {
                      "text": "Hello world"
                    },
                    "correlateId": "campaign-12345",
                    "conversationMetadata": {
                      "campaign": "summer-sale",
                      "source": "hubspot-workflow"
                    }
                  }
                },
                "media": {
                  "summary": "RCS media message",
                  "value": {
                    "number": "+14155552671",
                    "messageType": "MEDIA",
                    "messageContent": {
                      "url": "https://www.your-cdn.com/your_file"
                    },
                    "correlateId": "campaign-12345",
                    "conversationMetadata": {
                      "campaign": "summer-sale",
                      "source": "hubspot-workflow"
                    }
                  }
                },
                "choice": {
                  "summary": "RCS choice message (all six choice types)",
                  "value": {
                    "number": "+14155552671",
                    "messageType": "CHOICE",
                    "messageContent": {
                      "promptText": "It's time to choose...",
                      "choices": [
                        {
                          "choiceType": "TEXT_CHOICE",
                          "text": "Option 1",
                          "postbackData": "option_1"
                        },
                        {
                          "choiceType": "CALL_CHOICE",
                          "title": "Call Support",
                          "phoneNumber": "+15553334444",
                          "postbackData": "call_support_12345"
                        },
                        {
                          "choiceType": "URL_CHOICE",
                          "title": "Visit Site",
                          "url": "https://www.company-website.com",
                          "postbackData": "visit_website_12345"
                        },
                        {
                          "choiceType": "CALENDAR_CHOICE",
                          "title": "Add to Calendar",
                          "eventStart": 1893456000,
                          "eventEnd": 1893459600,
                          "eventTitle": "Consultation Appointment",
                          "fallbackUrl": "https://www.company-website.com/calendar-event",
                          "eventDescription": "Please arrive 10 minutes early.",
                          "postbackData": "calendar_event_12345"
                        }
                      ]
                    },
                    "correlateId": "campaign-12345",
                    "conversationMetadata": {
                      "campaign": "summer-sale",
                      "source": "hubspot-workflow"
                    }
                  }
                },
                "card": {
                  "summary": "RCS card message",
                  "value": {
                    "number": "+14155552671",
                    "messageType": "CARD",
                    "messageContent": {
                      "title": "The Card Title",
                      "description": "The Card Description",
                      "cardHeight": "SHORT",
                      "media": {
                        "url": "https://www.cdn.com/image_file.png"
                      },
                      "choices": [
                        {
                          "choiceType": "TEXT_CHOICE",
                          "text": "Option 1",
                          "postbackData": "option_1"
                        },
                        {
                          "choiceType": "TEXT_CHOICE",
                          "text": "Option 2",
                          "postbackData": "option_2"
                        }
                      ]
                    },
                    "correlateId": "campaign-12345",
                    "conversationMetadata": {
                      "campaign": "summer-sale",
                      "source": "hubspot-workflow"
                    }
                  }
                },
                "carousel": {
                  "summary": "RCS carousel message",
                  "value": {
                    "number": "+14155552671",
                    "messageType": "CAROUSEL",
                    "messageContent": {
                      "cards": [
                        {
                          "title": "Here is a card message",
                          "description": "RCS Carousel messages card",
                          "cardHeight": "SHORT",
                          "media": {
                            "url": "https://www.content-hosting.net/media_file"
                          },
                          "choices": [
                            {
                              "choiceType": "TEXT_CHOICE",
                              "text": "Option 1",
                              "postbackData": "option_1"
                            },
                            {
                              "choiceType": "TEXT_CHOICE",
                              "text": "Option 2",
                              "postbackData": "option_2"
                            }
                          ]
                        },
                        {
                          "title": "Another card within the carousel",
                          "description": "RCS Carousel messages card, again",
                          "cardHeight": "MEDIUM",
                          "media": {
                            "url": "https://www.content-hosting.net/another_media_file"
                          },
                          "choices": [
                            {
                              "choiceType": "TEXT_CHOICE",
                              "text": "Option 3",
                              "postbackData": "option_3"
                            },
                            {
                              "choiceType": "TEXT_CHOICE",
                              "text": "Option 4",
                              "postbackData": "option_4"
                            }
                          ]
                        }
                      ],
                      "choices": [
                        {
                          "choiceType": "TEXT_CHOICE",
                          "text": "Option 5",
                          "postbackData": "option_5"
                        },
                        {
                          "choiceType": "TEXT_CHOICE",
                          "text": "Option 6",
                          "postbackData": "option_6"
                        }
                      ]
                    },
                    "correlateId": "campaign-12345",
                    "conversationMetadata": {
                      "campaign": "summer-sale",
                      "source": "hubspot-workflow"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message successfully queued for sending",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "inboundTextMessage": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "inboundTextMessage",
        "summary": "Inbound TEXT message from end user",
        "description": "Sent when the end user replies to your agent with a plain text message. `eventType` is `MESSAGE` and `messageContent.messageType` is `TEXT`.\n\nText messages are also evaluated for opt-out / opt-in / help keywords. When the message matches an opt-out keyword (e.g. `STOP`, `UNSUBSCRIBE`, `CANCEL`, `PARAR`, ...), `isOptOut` is `true`.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "text": {
                  "summary": "Inbound text message",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "MESSAGE",
                    "messageContent": {
                      "messageType": "TEXT",
                      "text": "Hi! I need help with my order."
                    },
                    "notificationType": null,
                    "outboundId": "9f1c2a5e-4b0d-4e2a-9a1b-1234567890ab",
                    "isOptOut": false,
                    "correlateId": "correlation-id-1",
                    "conversationMetadata": {
                      "orderId": "ORD-5589"
                    }
                  }
                },
                "optOut": {
                  "summary": "Inbound text message that triggers opt-out",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "MESSAGE",
                    "messageContent": {
                      "messageType": "TEXT",
                      "text": "STOP"
                    },
                    "notificationType": null,
                    "outboundId": null,
                    "isOptOut": true,
                    "correlateId": null
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "inboundMediaMessage": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "inboundMediaMessage",
        "summary": "Inbound MEDIA message from end user",
        "description": "Sent when the end user replies with a media attachment (image, video, file). `eventType` is `MESSAGE` and `messageContent.messageType` is `MEDIA`. `messageContent.url` is a link to the hosted media file.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "media": {
                  "summary": "Inbound media message",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "MESSAGE",
                    "messageContent": {
                      "messageType": "MEDIA",
                      "url": "https://media.example.com/rcs/inbound/abc123.jpg"
                    },
                    "notificationType": null,
                    "outboundId": null,
                    "isOptOut": false,
                    "correlateId": null,
                    "conversationMetadata": {
                      "orderId": "ORD-5589"
                    }
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "inboundChoiceResponse": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "inboundChoiceResponse",
        "summary": "Inbound CHOICE (suggested reply / action postback) from end user",
        "description": "Sent when the end user taps a suggested reply or suggested action from a previous RCS message. `eventType` is `MESSAGE` and `messageContent.messageType` is `CHOICE`.\n\n- `messageContent.postbackData` is the postback payload attached to the suggestion the user selected — the same `postbackData` you set on the outbound choice.\n- `messageContent.originalMessageId` is the message id of the RCS message that presented the choice.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "choice": {
                  "summary": "Inbound choice response",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "MESSAGE",
                    "messageContent": {
                      "messageType": "CHOICE",
                      "originalMessageId": "01EQBC1A3BEK731GY4YXEN0C2R",
                      "postbackData": "track_my_order"
                    },
                    "notificationType": null,
                    "outboundId": "9f1c2a5e-4b0d-4e2a-9a1b-1234567890ab",
                    "isOptOut": false,
                    "correlateId": null,
                    "conversationMetadata": {
                      "orderId": "ORD-5589"
                    }
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "inboundLocationMessage": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "inboundLocationMessage",
        "summary": "Inbound LOCATION message from end user",
        "description": "Sent when the end user shares a location — typically in response to a `REQUEST_LOCATION_CHOICE`. `eventType` is `MESSAGE` and `messageContent.messageType` is `LOCATION`.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "location": {
                  "summary": "Inbound location message",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "MESSAGE",
                    "messageContent": {
                      "messageType": "LOCATION",
                      "title": "Acme Warehouse",
                      "latitude": 34.746483,
                      "longitude": -92.289597
                    },
                    "notificationType": null,
                    "outboundId": null,
                    "isOptOut": false,
                    "correlateId": null,
                    "conversationMetadata": {
                      "orderId": "ORD-5589"
                    }
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "typingNotification": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "typingNotification",
        "summary": "TYPING notification (end user is composing)",
        "description": "Sent when the end user starts composing a message (a \"composing\"/typing indicator from the channel). `eventType` is `NOTIFICATION` and `notificationType` is `TYPING`. No `messageContent` is included. RCS only.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "typing": {
                  "summary": "Typing indicator",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "NOTIFICATION",
                    "messageContent": null,
                    "notificationType": "TYPING",
                    "outboundId": null,
                    "isOptOut": false,
                    "correlateId": null
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "deliveredNotification": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "deliveredNotification",
        "summary": "DELIVERED notification for an outbound message",
        "description": "Sent when a message you sent was delivered to the end user's device. `eventType` is `NOTIFICATION` and `notificationType` is `DELIVERED`. `outboundId` correlates back to the outbound send request when available.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "delivered": {
                  "summary": "Delivery receipt",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "NOTIFICATION",
                    "messageContent": null,
                    "notificationType": "DELIVERED",
                    "outboundId": "9f1c2a5e-4b0d-4e2a-9a1b-1234567890ab",
                    "isOptOut": false,
                    "correlateId": "correlation-id-1"
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "readNotification": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "readNotification",
        "summary": "READ notification for an outbound message",
        "description": "Sent when the end user read a message you sent. `eventType` is `NOTIFICATION` and `notificationType` is `READ`. RCS only.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "read": {
                  "summary": "Read receipt",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "NOTIFICATION",
                    "messageContent": null,
                    "notificationType": "READ",
                    "outboundId": "9f1c2a5e-4b0d-4e2a-9a1b-1234567890ab",
                    "isOptOut": false,
                    "correlateId": "correlation-id-1"
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "failedNotification": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "failedNotification",
        "summary": "FAILED notification for an outbound message",
        "description": "Sent when a message you sent failed to be delivered by the channel. `eventType` is `NOTIFICATION` and `notificationType` is `FAILED`.\n\nThe callback carries the `FAILED` status and the correlating `outboundId` so you can identify which message could not be delivered. This is distinct from `outboundFailureNotification`, which fires when Enrich could not submit the message to the channel at all.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "failed": {
                  "summary": "Delivery failure",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "NOTIFICATION",
                    "messageContent": null,
                    "notificationType": "FAILED",
                    "outboundId": "9f1c2a5e-4b0d-4e2a-9a1b-1234567890ab",
                    "isOptOut": false,
                    "correlateId": "correlation-id-1"
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "channelSwitchedNotification": {
      "post": {
        "tags": [
          "Callbacks"
        ],
        "operationId": "channelSwitchedNotification",
        "summary": "CHANNEL_SWITCHED notification for an outbound message",
        "description": "Sent when the channel used to reach the end user switched — for example, a message could not be delivered over RCS and the platform fell back to another channel. `eventType` is `NOTIFICATION` and `notificationType` is `CHANNEL_SWITCHED`.",
        "security": [
          {
            "enrichCallbackJwt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserWebhookPayload"
              },
              "examples": {
                "channelSwitched": {
                  "summary": "Channel switched",
                  "value": {
                    "agentId": "abc123xyz456",
                    "agentDisplayName": "Acme Support",
                    "contactNumber": "+12345678901",
                    "eventType": "NOTIFICATION",
                    "messageContent": null,
                    "notificationType": "CHANNEL_SWITCHED",
                    "outboundId": "9f1c2a5e-4b0d-4e2a-9a1b-1234567890ab",
                    "isOptOut": false,
                    "correlateId": "correlation-id-1"
                  }
                }
              }
            }
          }
        },
        "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."
          }
        }
      }
    },
    "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"
        ]
      },
      "RcsChoiceType": {
        "type": "string",
        "description": "Discriminator for the reply/action choice variants.",
        "enum": [
          "TEXT_CHOICE",
          "CALL_CHOICE",
          "URL_CHOICE",
          "CALENDAR_CHOICE",
          "REQUEST_LOCATION_CHOICE"
        ]
      },
      "ConversationMetadata": {
        "type": "object",
        "description": "Arbitrary JSON metadata attached to the conversation. Set on an outbound send, persisted on the conversation, and echoed back on inbound callbacks. Sticky: omitting it on a later send does not clear it. Max 2048 characters serialized.",
        "additionalProperties": true,
        "example": {
          "campaign": "summer-2025",
          "source": "crm"
        }
      },
      "OutboundMessageRequest": {
        "type": "object",
        "description": "Payload for queueing an outbound message on an agent.",
        "required": [
          "number",
          "messageType",
          "messageContent"
        ],
        "properties": {
          "number": {
            "type": "string",
            "description": "Recipient phone number in E.164 format. The pattern currently accepts US/NANP `+1` numbers only.",
            "example": "+14155552671",
            "minLength": 1,
            "pattern": "^\\+1[2-9][0-9]{2}[2-9][0-9]{6}$"
          },
          "messageType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsMessageType"
              }
            ],
            "description": "Message type. Must match the shape of `messageContent`.",
            "example": "TEXT"
          },
          "messageContent": {
            "description": "Message content matching `messageType`.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TextContent"
              },
              {
                "$ref": "#/components/schemas/MediaContent"
              },
              {
                "$ref": "#/components/schemas/CardContent"
              },
              {
                "$ref": "#/components/schemas/CarouselContent"
              },
              {
                "$ref": "#/components/schemas/ChoiceContent"
              }
            ]
          },
          "correlateId": {
            "type": "string",
            "description": "Optional correlation ID for tracking outbound campaigns through delivery reports and inbound replies. Returned as `correlateId` on callbacks. Not sticky — sending without this field clears any existing value on the conversation.",
            "example": "campaign-abc-123",
            "maxLength": 128,
            "minLength": 0
          },
          "conversationMetadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ConversationMetadata"
              }
            ],
            "description": "Optional business context to persist on the conversation. Returned as `conversationMetadata` on inbound callbacks. Sticky — omitting it does NOT clear an existing value."
          }
        }
      },
      "TextContent": {
        "type": "object",
        "description": "Outbound text message content.",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "description": "Text message body",
            "example": "Hello world",
            "maxLength": 2000,
            "minLength": 1
          }
        }
      },
      "MediaContent": {
        "type": "object",
        "description": "Outbound media message content.",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "Link to hosted media content",
            "example": "https://www.cdn.com/file",
            "maxLength": 255,
            "minLength": 0,
            "pattern": "^https://[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}(/\\S*)?$"
          }
        }
      },
      "CardContent": {
        "type": "object",
        "description": "Outbound card message content.",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "Card message title",
            "example": "Card Title",
            "maxLength": 50,
            "minLength": 0
          },
          "description": {
            "type": "string",
            "description": "Optional card message description",
            "example": "Description of card",
            "maxLength": 100,
            "minLength": 0
          },
          "cardHeight": {
            "type": "string",
            "description": "Optional card height selection",
            "enum": [
              "SHORT",
              "MEDIUM",
              "TALL"
            ],
            "example": "SHORT"
          },
          "choices": {
            "type": "array",
            "description": "Optional list of reply/action choices provided with the card.",
            "items": {
              "$ref": "#/components/schemas/RcsChoice"
            },
            "maxItems": 4,
            "minItems": 1
          },
          "media": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MediaContent"
              }
            ],
            "description": "Optional media content provided with the card.",
            "example": {
              "url": "https://www.your-cdn.com/image.jpeg"
            }
          }
        }
      },
      "CarouselContent": {
        "type": "object",
        "description": "Outbound carousel message content.",
        "required": [
          "cards"
        ],
        "properties": {
          "cards": {
            "type": "array",
            "description": "List of cards to appear in the carousel.",
            "items": {
              "$ref": "#/components/schemas/CardContent"
            },
            "maxItems": 10,
            "minItems": 1
          },
          "choices": {
            "type": "array",
            "description": "Optional list of up to 3 reply/action choices provided with the carousel.",
            "items": {
              "$ref": "#/components/schemas/RcsChoice"
            },
            "maxItems": 3,
            "minItems": 1
          }
        }
      },
      "ChoiceContent": {
        "type": "object",
        "description": "Outbound choice message content — a prompt plus reply/action choices.",
        "required": [
          "promptText",
          "choices"
        ],
        "properties": {
          "promptText": {
            "type": "string",
            "description": "Prompt message that appears with the provided choices",
            "example": "Please confirm or cancel your appointment...",
            "maxLength": 200,
            "minLength": 0
          },
          "choices": {
            "type": "array",
            "description": "List of reply/action choices provided with the message.",
            "items": {
              "$ref": "#/components/schemas/RcsChoice"
            },
            "maxItems": 10,
            "minItems": 1
          }
        }
      },
      "RcsChoice": {
        "description": "A reply or action choice. The concrete shape is selected by the `choiceType` discriminator.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RcsChoiceTextMessage"
          },
          {
            "$ref": "#/components/schemas/RcsChoiceCallMessage"
          },
          {
            "$ref": "#/components/schemas/RcsChoiceUrlMessage"
          },
          {
            "$ref": "#/components/schemas/RcsChoiceLocationMessage"
          },
          {
            "$ref": "#/components/schemas/RcsChoiceCalendarMessage"
          },
          {
            "$ref": "#/components/schemas/RcsChoiceRequestLocationMessage"
          }
        ],
        "discriminator": {
          "propertyName": "choiceType",
          "mapping": {
            "TEXT_CHOICE": "#/components/schemas/RcsChoiceTextMessage",
            "CALL_CHOICE": "#/components/schemas/RcsChoiceCallMessage",
            "URL_CHOICE": "#/components/schemas/RcsChoiceUrlMessage",
            "LOCATION_CHOICE": "#/components/schemas/RcsChoiceLocationMessage",
            "CALENDAR_CHOICE": "#/components/schemas/RcsChoiceCalendarMessage",
            "REQUEST_LOCATION_CHOICE": "#/components/schemas/RcsChoiceRequestLocationMessage"
          }
        }
      },
      "RcsChoiceMessageOption": {
        "type": "object",
        "description": "Fields common to every choice variant.",
        "required": [
          "choiceType"
        ],
        "properties": {
          "choiceType": {
            "$ref": "#/components/schemas/RcsChoiceType"
          },
          "postbackData": {
            "type": "string",
            "description": "Optional value returned on the `CHOICE` callback when the choice is selected. Defaults to `{message_id}_{title/text}`.",
            "maxLength": 255,
            "minLength": 0
          }
        }
      },
      "RcsChoiceTextMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RcsChoiceMessageOption"
          },
          {
            "type": "object",
            "required": [
              "choiceType",
              "text"
            ],
            "properties": {
              "choiceType": {
                "const": "TEXT_CHOICE",
                "description": "Always `TEXT_CHOICE`."
              },
              "text": {
                "type": "string",
                "description": "Text response choice option",
                "example": "Send more information",
                "maxLength": 25,
                "minLength": 0
              },
              "postbackData": {
                "type": "string",
                "example": "more_information_12345",
                "maxLength": 255,
                "minLength": 0
              }
            }
          }
        ],
        "description": "A suggested reply. Tapping it sends `text` back as the user's reply and delivers `postbackData` on the `CHOICE` callback."
      },
      "RcsChoiceCallMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RcsChoiceMessageOption"
          },
          {
            "type": "object",
            "required": [
              "choiceType",
              "title",
              "phoneNumber"
            ],
            "properties": {
              "choiceType": {
                "const": "CALL_CHOICE",
                "description": "Always `CALL_CHOICE`."
              },
              "title": {
                "type": "string",
                "description": "Title for the phone number choice",
                "example": "Call Support",
                "maxLength": 25,
                "minLength": 0
              },
              "phoneNumber": {
                "type": "string",
                "description": "Phone number the choice will dial",
                "example": "+15551231234",
                "minLength": 1,
                "pattern": "^\\+1[2-9][0-9]{2}[2-9][0-9]{6}$"
              },
              "postbackData": {
                "type": "string",
                "example": "call_support_12345",
                "maxLength": 255,
                "minLength": 0
              }
            }
          }
        ],
        "description": "A dial action."
      },
      "RcsChoiceUrlMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RcsChoiceMessageOption"
          },
          {
            "type": "object",
            "required": [
              "choiceType",
              "title",
              "url"
            ],
            "properties": {
              "choiceType": {
                "const": "URL_CHOICE",
                "description": "Always `URL_CHOICE`."
              },
              "title": {
                "type": "string",
                "description": "Title for the URL choice",
                "example": "Company Website",
                "maxLength": 25,
                "minLength": 0
              },
              "url": {
                "type": "string",
                "description": "URL the choice will navigate to",
                "example": "https://www.company-website.com",
                "maxLength": 255,
                "minLength": 0,
                "pattern": "^https://[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}(/\\S*)?$"
              },
              "postbackData": {
                "type": "string",
                "example": "visit_website_12345",
                "maxLength": 255,
                "minLength": 0
              }
            }
          }
        ],
        "description": "An open-URL action."
      },
      "RcsChoiceLocationMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RcsChoiceMessageOption"
          },
          {
            "type": "object",
            "required": [
              "choiceType",
              "title",
              "latitude",
              "longitude"
            ],
            "properties": {
              "choiceType": {
                "const": "LOCATION_CHOICE",
                "description": "Always `LOCATION_CHOICE`."
              },
              "title": {
                "type": "string",
                "description": "Title for the location choice",
                "example": "Main Office",
                "maxLength": 25,
                "minLength": 0
              },
              "label": {
                "type": "string",
                "description": "Optional label shown on the device's map UI",
                "example": "Main Office Parking Lot",
                "maxLength": 50,
                "minLength": 0
              },
              "latitude": {
                "type": "number",
                "format": "double",
                "example": 45.523064,
                "maximum": 90,
                "minimum": -90
              },
              "longitude": {
                "type": "number",
                "format": "double",
                "example": -122.676483,
                "maximum": 180,
                "minimum": -180
              },
              "postbackData": {
                "type": "string",
                "example": "location_12345",
                "maxLength": 255,
                "minLength": 0
              }
            }
          }
        ],
        "description": "A show-location-on-map action."
      },
      "RcsChoiceCalendarMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RcsChoiceMessageOption"
          },
          {
            "type": "object",
            "required": [
              "choiceType",
              "title",
              "eventStart",
              "eventEnd",
              "eventTitle",
              "fallbackUrl"
            ],
            "properties": {
              "choiceType": {
                "const": "CALENDAR_CHOICE",
                "description": "Always `CALENDAR_CHOICE`."
              },
              "title": {
                "type": "string",
                "description": "Title shown for the calendar choice",
                "example": "Add to calendar",
                "maxLength": 25,
                "minLength": 0
              },
              "eventStart": {
                "type": "integer",
                "format": "int64",
                "description": "Start time of the event as a Unix timestamp (seconds)",
                "example": 1764496800
              },
              "eventEnd": {
                "type": "integer",
                "format": "int64",
                "description": "End time of the event as a Unix timestamp (seconds)",
                "example": 1764500400
              },
              "eventTitle": {
                "type": "string",
                "description": "Title of the calendar event",
                "example": "Consultation Appointment",
                "maxLength": 50,
                "minLength": 0
              },
              "fallbackUrl": {
                "type": "string",
                "description": "Fallback URL opened if the device cannot create the calendar event directly",
                "example": "https://www.company-website.com/calendar-event",
                "maxLength": 255,
                "minLength": 0,
                "pattern": "^https://[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}(/\\S*)?$"
              },
              "eventDescription": {
                "type": "string",
                "description": "Optional description of the calendar event",
                "example": "Your scheduled appointment. Please arrive 10 minutes early.",
                "maxLength": 100,
                "minLength": 0
              },
              "postbackData": {
                "type": "string",
                "example": "calendar_event_12345",
                "maxLength": 255,
                "minLength": 0
              }
            }
          }
        ],
        "description": "A create-calendar-event action."
      },
      "RcsChoiceRequestLocationMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RcsChoiceMessageOption"
          },
          {
            "type": "object",
            "required": [
              "choiceType",
              "title",
              "fallbackUrl"
            ],
            "properties": {
              "choiceType": {
                "const": "REQUEST_LOCATION_CHOICE",
                "description": "Always `REQUEST_LOCATION_CHOICE`."
              },
              "title": {
                "type": "string",
                "description": "Title shown for the request-location choice",
                "example": "Share location",
                "maxLength": 25,
                "minLength": 0
              },
              "fallbackUrl": {
                "type": "string",
                "description": "Fallback URL opened if the device or channel cannot request location directly",
                "example": "https://www.company-website.com/share-location",
                "maxLength": 255,
                "minLength": 0,
                "pattern": "^https://[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}(/\\S*)?$"
              },
              "postbackData": {
                "type": "string",
                "example": "share_location_12345",
                "maxLength": 255,
                "minLength": 0
              }
            }
          }
        ],
        "description": "A request-the-user's-location action. The user's response arrives as an inbound `LOCATION` message."
      },
      "EndUserResponseType": {
        "type": "string",
        "description": "Discriminates whether the callback payload is an inbound message or a notification.",
        "enum": [
          "MESSAGE",
          "NOTIFICATION"
        ]
      },
      "EndUserNotificationType": {
        "type": "string",
        "description": "The kind of notification. Present (non-null) only when `eventType` is `NOTIFICATION`.",
        "enum": [
          "READ",
          "TYPING",
          "DELIVERED",
          "FAILED",
          "CHANNEL_SWITCHED"
        ]
      },
      "InboundMessageContent": {
        "description": "Polymorphic inbound message content. The concrete shape is selected by the `messageType` discriminator. Present (non-null) only when `eventType` is `MESSAGE`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextMessageContent"
          },
          {
            "$ref": "#/components/schemas/MediaMessageContent"
          },
          {
            "$ref": "#/components/schemas/ChoiceResponseContent"
          },
          {
            "$ref": "#/components/schemas/LocationMessageContent"
          }
        ],
        "discriminator": {
          "propertyName": "messageType",
          "mapping": {
            "TEXT": "#/components/schemas/TextMessageContent",
            "MEDIA": "#/components/schemas/MediaMessageContent",
            "CHOICE": "#/components/schemas/ChoiceResponseContent",
            "LOCATION": "#/components/schemas/LocationMessageContent"
          }
        }
      },
      "TextMessageContent": {
        "type": "object",
        "description": "Content for an inbound TEXT message.",
        "required": [
          "messageType",
          "text"
        ],
        "properties": {
          "messageType": {
            "const": "TEXT",
            "description": "Always `TEXT`."
          },
          "text": {
            "type": "string",
            "description": "The text the end user sent.",
            "example": "Hi! I need help with my order."
          }
        }
      },
      "MediaMessageContent": {
        "type": "object",
        "description": "Content for an inbound MEDIA message.",
        "required": [
          "messageType",
          "url"
        ],
        "properties": {
          "messageType": {
            "const": "MEDIA",
            "description": "Always `MEDIA`."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Link to the hosted media file.",
            "example": "https://media.example.com/rcs/inbound/abc123.jpg"
          }
        }
      },
      "ChoiceResponseContent": {
        "type": "object",
        "description": "Content for an inbound CHOICE (suggested reply / action) response.",
        "required": [
          "messageType",
          "originalMessageId",
          "postbackData"
        ],
        "properties": {
          "messageType": {
            "const": "CHOICE",
            "description": "Always `CHOICE`."
          },
          "originalMessageId": {
            "type": "string",
            "description": "Message id of the RCS message that presented the choice.",
            "example": "01EQBC1A3BEK731GY4YXEN0C2R"
          },
          "postbackData": {
            "type": "string",
            "description": "Postback payload attached to the selected suggestion.",
            "example": "track_my_order"
          }
        }
      },
      "LocationMessageContent": {
        "type": "object",
        "description": "Content for an inbound LOCATION message.",
        "required": [
          "messageType",
          "title",
          "latitude",
          "longitude"
        ],
        "properties": {
          "messageType": {
            "const": "LOCATION",
            "description": "Always `LOCATION`."
          },
          "title": {
            "type": "string",
            "description": "Human-readable label for the shared location.",
            "example": "Acme Warehouse"
          },
          "latitude": {
            "type": "number",
            "format": "double",
            "example": 34.746483
          },
          "longitude": {
            "type": "number",
            "format": "double",
            "example": -92.289597
          }
        }
      },
      "EndUserWebhookPayload": {
        "type": "object",
        "description": "The envelope for all inbound message and notification callbacks.\n\n- When `eventType` is `MESSAGE`, `messageContent` is populated and `notificationType` is `null`.\n- When `eventType` is `NOTIFICATION`, `notificationType` is populated and `messageContent` is `null`.",
        "required": [
          "agentId",
          "agentDisplayName",
          "contactNumber",
          "eventType",
          "isOptOut"
        ],
        "properties": {
          "agentId": {
            "type": "string",
            "description": "The RCS agent id the event is associated with.",
            "example": "abc123xyz456"
          },
          "agentDisplayName": {
            "type": "string",
            "description": "The display name of the RCS agent.",
            "example": "Acme Support"
          },
          "contactNumber": {
            "type": "string",
            "description": "The end user's phone number in E.164 format. This is the raw, unhashed number.",
            "example": "+12345678901"
          },
          "eventType": {
            "$ref": "#/components/schemas/EndUserResponseType"
          },
          "messageContent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InboundMessageContent"
              },
              {
                "type": "null"
              }
            ],
            "description": "The inbound message content. Present only for `MESSAGE` events; `null` for `NOTIFICATION` events."
          },
          "notificationType": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EndUserNotificationType"
              },
              {
                "type": "null"
              }
            ],
            "description": "The notification kind. Present only for `NOTIFICATION` events; `null` for `MESSAGE` events."
          },
          "outboundId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Correlates the event back to the originating outbound message (extracted from the outbound message metadata). `null` when not applicable, such as unsolicited inbound messages.",
            "example": "9f1c2a5e-4b0d-4e2a-9a1b-1234567890ab"
          },
          "isOptOut": {
            "type": "boolean",
            "default": false,
            "description": "`true` when an inbound TEXT message matched an opt-out keyword (e.g. `STOP`, `UNSUBSCRIBE`, `CANCEL`). Always `false` for notifications and non-opt-out messages."
          },
          "correlateId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `correlateId` value supplied on the originating send request, if any. `null` when not provided.",
            "example": "correlation-id-1"
          },
          "conversationMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConversationMetadata"
              },
              {
                "type": "null"
              }
            ],
            "description": "Metadata echoed from the conversation when present. Omitted from the payload entirely when there is none.",
            "example": {
              "orderId": "ORD-5589"
            }
          }
        }
      },
      "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
  }
}
```