---
title: "POST /connections/{phoneNumber}/send-message"
method: POST
path: "/connections/{phoneNumber}/send-message"
tags: ["Connections"]
---

# POST /connections/{phoneNumber}/send-message

`POST /connections/{phoneNumber}/send-message`

## Request

- Base URL: `http://localhost:3025`
- URL: `http://localhost:3025/connections/{phoneNumber}/send-message`
- Auth: API key in header `x-api-key`

## Path parameters

- `phoneNumber` string, required

## Request body

- object
  - `jid` string, required: WhatsApp JID
  - `messageContent` union, required
    - object
      - `text` string, required: Text message
      - `mentions` string[]
      - `quotedMessage` object: Message to reply to. Both key and message are required for the quoted message preview to appear correctly.
        - `key` object, required
          - `id` string, required: Message ID
          - `remoteJid` string
          - `fromMe` boolean
          - `participant` string
        - `message` object, required: Original message content. This is required for the quoted message preview to appear correctly. Use the message object from the original messages.upsert webhook payload.
    - object
      - `image` string, required: Base64 encoded image data
      - `caption` string
      - `mimetype` string
      - `quotedMessage` object: Message to reply to. Both key and message are required for the quoted message preview to appear correctly.
        - `key` object, required
          - `id` string, required: Message ID
          - `remoteJid` string
          - `fromMe` boolean
          - `participant` string
        - `message` object, required: Original message content. This is required for the quoted message preview to appear correctly. Use the message object from the original messages.upsert webhook payload.
    - object
      - `video` string, required: Base64 encoded video data
      - `caption` string
      - `mimetype` string
      - `quotedMessage` object: Message to reply to. Both key and message are required for the quoted message preview to appear correctly.
        - `key` object, required
          - `id` string, required: Message ID
          - `remoteJid` string
          - `fromMe` boolean
          - `participant` string
        - `message` object, required: Original message content. This is required for the quoted message preview to appear correctly. Use the message object from the original messages.upsert webhook payload.
    - object
      - `document` string, required: Base64 encoded document data
      - `fileName` string
      - `mimetype` string
      - `caption` string
      - `quotedMessage` object: Message to reply to. Both key and message are required for the quoted message preview to appear correctly.
        - `key` object, required
          - `id` string, required: Message ID
          - `remoteJid` string
          - `fromMe` boolean
          - `participant` string
        - `message` object, required: Original message content. This is required for the quoted message preview to appear correctly. Use the message object from the original messages.upsert webhook payload.
    - object
      - `audio` string, required: Base64 encoded audio data
      - `ptt` boolean
      - `mimetype` string
      - `quotedMessage` object: Message to reply to. Both key and message are required for the quoted message preview to appear correctly.
        - `key` object, required
          - `id` string, required: Message ID
          - `remoteJid` string
          - `fromMe` boolean
          - `participant` string
        - `message` object, required: Original message content. This is required for the quoted message preview to appear correctly. Use the message object from the original messages.upsert webhook payload.
    - object
      - `react` object, required
        - `key` object, required
          - `id` string
          - `remoteJid` string
          - `fromMe` boolean
          - `participant` string
        - `text` string, required: Emoji to react with
  - `chatwootMessageId` string
  - `messageId` string

## Response `200`

Message sent successfully

- object
  - `data` object, required
    - `key` object, required
      - `id` string
      - `remoteJid` string
      - `fromMe` boolean
      - `participant` string
    - `messageTimestamp` string, required

## Other responses

- `403`: Forbidden — the API key does not own this connection. Returned when a connection is bound to a different API key.
- `404`: Phone number not connected
- `409`: Message is already being processed, or a previous send timed out with an unknown outcome. `x-baileys-idempotency-state` tells them apart: `processing` vs `indeterminate`. `indeterminate` is not resolved by retrying, under any id or under a new `chatwootMessageId`, because the timed-out attempt reserved no WhatsApp message id and may still be delivered.
- `421`: Misdirected Request — in cluster mode, this instance does not own the connection. The owning instance id is in the x-baileys-owner header; a proxy re-routes the request there. Not returned for the explicit-takeover routes: POST /connections/{phoneNumber}, /import-session and /restart.
- `500`: Message not sent
- `503`: Connection is not accepting sends. Returned when the circuit breaker is open (send stall detected) and when a keystore transaction gives up waiting for its mutex; in the second case the message was definitively not sent. Carries `x-baileys-send-state: stalled`, which is what tells this apart from an ordinary 503 (outage, draining proxy): the connection is up and must NOT be marked down.
- `504`: Send timed out; outcome unknown. Carries `retry-after` only when a retry cannot duplicate the message — i.e. a `messageId` or a `chatwootMessageId` was supplied. Otherwise it carries `x-baileys-idempotency-state: unprotected` and no `retry-after`: nothing would stop a retry from sending a second message.

## Changes

- **2026-08-23** `5299037901a9`: 2 info
  - added the non-success response with the status `503`
  - added the non-success response with the status `504`
- **2026-08-15** `533b3360e2e4`: 1 breaking, 47 warning, 1 info
  - removed the success response with the status `202`
  - the optional response header `x-baileys-owner` removed for the status `409`
  - removed the optional property `address` from the response with the `200` status
  - removed the optional property `addressingMode` from the response with the `200` status
  - …45 more
- **2026-08-15** `80b5396ef493`: 5 info
  - added the new optional request property `messageId` (media type: application/json)
  - added the new optional request property `messageId` (media type: multipart/form-data)
  - added the new optional request property `messageId` (media type: text/plain)
  - added the non-success response with the status `422`
  - …1 more
- **2026-06-16** `da89554d2e38`: 16 info
  - added the new optional request property `chatwootMessageId` (media type: application/json)
  - added the new optional request property `chatwootMessageId` (media type: multipart/form-data)
  - added the new optional request property `chatwootMessageId` (media type: text/plain)
  - added the non-success response with the status `409`
  - …12 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api/changes/connections/:phoneNumber/send-message/post.md)

---

[API](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api.md) - [All operations](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api/revisions/322af11b310e?raw)
