Forwards Message
POST/api/v2/instance/:instanceId/send/forward
Forwards Message
Request
Path Parameters
ID of the instance.
- application/json
Body
required
The forwardsMessage object is used to forward an existing message to the recipient specified in the template. This object supports two ways of referencing the message to be forwarded: through an existing messageId or directly through a message object.
Properties
messageId (string, optional): Unique identifier of the message to be forwarded. If this field is provided, the system will search the database for the corresponding message. The presence of this field ignores any message provided in the message field.
message (object, optional): Directly represents the message to be forwarded. This object must include all the necessary message details, such as keyId, keyFromMe, keyRemoteJid, among others. If messageId is not provided, this message will be used for forwarding.
Behavior
When the messageId is provided, the system assumes that the message already exists in the database and searches for the provided ID. If the messageId is not present or is invalid, and the message object is defined, then the message provided in message will be used.
If both messageId and message are missing, the forwarding behavior will result in an error.
Contact number or group id
options object
Defines the delay with which the message will be sent in milliseconds.
Default value: composing | recording | available | unavailable
Defines the behavior of the connected number when sending the message in the chat.
Enter the id of the message to be quoted.
groupMention object
Mention the participants of a group.
Default value: true
This parameter allows mentioning all members of a group without directly referencing them.
Default value: true
Use this attribute to explicitly mention all members of a group.
An external value of any type that will be sent in the webhook.
forwardsMessage object
message objectrequired
Responses
- 201
- 400
- 401
- 403
- 404
- 500
ResponseSendMessage
- application/json
- Schema
- Example (from schema)
Schema
Default value: 2024-04-13T23:22:07.162Z
Default value: 2024-04-13T23:22:07.162Z
{
"messageId": "string",
"keyId": "string",
"keyFromMe": true,
"keyRemoteJid": "string",
"keyParticipant": "string",
"pushName": "string",
"contentType": "string",
"isGroup": true,
"content": {},
"source": "string",
"messageTimestamp": 0,
"createdAt": "2024-04-14T14:11:06.372Z",
"instanceInstanceId": "2024-04-13T23:22:07.162Z",
"externalAttributes": "string"
}
BadRequestException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
UnauthorizedException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
ForbiddenException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
NotFoundException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
InternalServerErrorException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}