📤 Chatting

post/api/forwardMessage

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/forwardMessage
  • Auth: API key in header X-Api-Key

Request body

chatIdstring required
idstring

Pre-generated message id

messageIdstring required
sessionstring required

Example request

{
  "chatId": "11111111111@c.us",
  "id": "BBBBBBBBBBBBBBBBB",
  "messageId": "false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA"
}

Response

idstring required

Message ID

timestampnumber required

Unix timestamp for when the message was created

fromstring required

ID for the Chat that this message was sent to, except if the message was sent by the current user

fromMeboolean required

Indicates if the message was sent by the current user

source'api' | 'app' required

The device that sent the message - either API or APP. Available in events (webhooks/websockets) only and only "fromMe: true" messages.

tostring required
  • ID for who this message is for.
  • If the message is sent by the current user, it will be the Chat to which the message is being sent.
  • If the message is sent by another user, it will be the ID for the current user.
participantstring required

For groups - participant who sent the message

bodystring required

Message content

hasMediaboolean required

Indicates if the message has media available for download

mediaUrlstring required

Use media.url instead! The URL for the media in the message if any

ack-1 | 0 | 1 | 2 | 3 | 4 required

ACK status for the message

ackNamestring required

ACK status name for the message

authorstring

If the message was sent to a group, this field will contain the user that sent the message.

vCardsstring[]

List of vCards contained in the message.

_dataobject

Message in a raw format that we get from WhatsApp. May be changed anytime, use it with caution! It depends a lot on the underlying backend.

Example response

{
  "id": "false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA",
  "timestamp": 1666943582,
  "from": "11111111111@c.us",
  "source": "api",
  "to": "11111111111@c.us",
  "media": {
    "url": "http://localhost:3000/api/files/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga",
    "mimetype": "audio/jpeg",
    "filename": "example.pdf",
    "s3": {
      "Bucket": "my-bucket",
      "Key": "default/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga"
    }
  },
  "mediaUrl": "http://localhost:3000/api/files/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga",
  "replyTo": {
    "id": "AAAAAAAAAAAAAAAAAAAA",
    "participant": "11111111111@c.us",
    "body": "Hello!",
    "media": {
      "url": "http://localhost:3000/api/files/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga",
      "mimetype": "audio/jpeg",
      "filename": "example.pdf",
      "s3": {
        "Bucket": "my-bucket",
        "Key": "default/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.