---
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`

## 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.

---

[API](https://skmtc.net/fazer-ai/apis/fazer-ai-baileys-api.md) · [All operations](https://skmtc.net/fazer-ai/apis/fazer-ai-baileys-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fazer-ai/fazer-ai-baileys-api/revisions/5299037901a9/schema)
