v1

latestOpenAPI 3.1.02026-07-1413113265.9 KB
message

send a text message to a chat

Send a text message to a chat. The chatId format varies depending on the chat type:

  • Individual chat: {phone_number}@c.us (e.g. 50664083362@c.us)
  • Group chat: {group_id}@g.us (e.g. 123456789-123456789@g.us)
  • Channel/Newsletter: {channel_id}@newsletter (e.g. 123456789@newsletter)
post/instances/{id}/client/action/send-message

Path parameters

idinteger required

Instance ID

Request body

chatIdstring required

Chat ID <countrycode_short><usernumber>@c.us or @g.us for groups

messagestring required

Text message to send. Can include @123456789 for group chats.

mentionsstring[]

Optional array of contact IDs to mention. Only works in group chats. Make sure to include @123456789 in the message text.

replyToMessageIdstring

Optional message ID to reply to. Format: {fromMe}{chatId}{messageId}

previewLinkboolean

Whether to show link previews in the message. Defaults to true.

firedandforgetboolean

Set to true to process the request asynchronously. Returns a reference UUID for polling via GET /instances/{id}/request/{reference}. Alias: faf

Example request

{
  "chatId": "50664083362@c.us",
  "message": "Hello @50664083362, how are you?",
  "mentions": [
    "50664083362@c.us"
  ],
  "replyToMessageId": "true_491234567890@c.us_3EB0123456789ABCDEF",
  "previewLink": true
}

Response

Message sent successfully

status'success' | 'error'
instanceIdstring

Example response

{
  "status": "success",
  "instanceId": "1",
  "data": {
    "_data": {
      "id": {
        "fromMe": true,
        "remote": "1234567890@c.us",
        "id": "3EB0123456789ABCDEF",
        "_serialized": "true_1234567890@c.us_3EB0123456789ABCDEF"
      },
      "body": "Hello @1234567890, how are you?",
      "type": "chat",
      "t": 1733207534,
      "from": {
        "server": "c.us",
        "user": "987654321",
        "_serialized": "987654321@c.us"
      },
      "to": {
        "server": "c.us",
        "user": "1234567890",
        "_serialized": "1234567890@c.us"
      },
      "ack": 0
    }
  }
}