Skip to content

ForwardMessages#

The method is intended for forwarding messages to a personal or group chat. The forwarded messages will be added to the send queue. The message will be kept for 24 hours in the queue and will be sent immediately after phone authorization. The rate at which messages are sent from the queue is managed by Message sending delay parameter.

Request#

For forwarding, you need to make a request to:

POST {{APIUrl}}/waInstance{{idInstance}}/forwardMessages/{{apiTokenInstance}}

For APIUrl, idInstance and apiTokenInstance request parameters, refer to Before you start section.

Request parameters#

Parameter Type Mandatory Description
chatId string Yes Chat Id, where the message is forwarded
chatIdFrom string Yes Chat Id, from which the message is being forwarded
messages array Yes Collection of IDs of forwarded messages

Request body example#

Forwarding a message to a chat:

{
    "chatId": "11001234567@c.us",
    "chatIdFrom": "11001234567@c.us",
    "messages": [
       "BAE587FA1CECF760",
       "BAE5608BC86F2B59"
    ]
}

Response#

Response parameters#

Parameter Type Description
messages array Ids of sent messages

Response body example#

{
  "messages": [
    "BAE5DBB8DEABDA22",
    "BAE5BBA9BE3142D8"
  ]
}

Recipient display example#

Example of a forwarded message

ForwardMessages errors#

For a list of errors common to all methods, refer to Common errors section

curl example#

curl --location --request POST '{{APIUrl}}/waInstance{{idInstance}}/forwardMessages/{{apiTokenInstance}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chatId": "11001234567@c.us",
    "chatIdFrom": "11001234567@c.us",
    "messages": [
        "BAE587FA1CECF760",
        "BAE5608BC86F2B59"
    ]
}'