> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a Connect message

> Send a message into a lane on behalf of a participant — the server-side path for headless UIs and system notices. Translation and safety run before delivery.

Send a message into a lane on behalf of a participant. This is the headless path — apps using the drop-in component send through their [participant token](/api-reference/connect/create-token) instead.

Every message passes through the Supervisor's pipeline before delivery: safety masking, then translation into each recipient's language. Sending into a `locked` thread returns `409`.

## Path

<ParamField path="thread_id" type="string" required>
  Thread ID (`th_…`) or your `reference`.
</ParamField>

## Request

<ParamField body="participant_id" type="string" required>
  Sender — participant ID (`prt_…`) or their `external_id`. Use `"system"` for order-event notices ("Your order was picked up"), rendered as system chips, not chat bubbles.
</ParamField>

<ParamField body="lane" type="string" required>
  `customer_merchant`, `customer_courier`, or `merchant_courier`. The sender's role must belong to the lane.
</ParamField>

<ParamField body="text" type="string">
  Message text. Required unless `attachments` is present.
</ParamField>

<ParamField body="attachments" type="array">
  Files by URL: `[{ "url": "https://…", "content_type": "image/jpeg" }]`.
</ParamField>

## Response

<ResponseField name="message" type="object">
  The created message, including `translations` keyed by language and the post-masking `text`.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"dark"}
  curl -X POST https://api.open.cx/connect/threads/order_84421/messages \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "participant_id": "mrc_204",
      "lane": "customer_merchant",
      "text": "Out of garlic sauce — swap for tahini or refund the item?"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={"dark"}
  {
    "message": {
      "id": "msg_4t1a",
      "lane": "customer_merchant",
      "sender": { "participant_id": "prt_m32", "role": "merchant" },
      "text": "Out of garlic sauce — swap for tahini or refund the item?",
      "translations": {
        "ar": "نفدت صلصة الثوم — نستبدلها بالطحينة أم نسترد قيمة الصنف؟"
      },
      "created_at": "2026-07-30T14:12:40Z"
    }
  }
  ```
</ResponseExample>
