Skip to main content

Forwards Message

POST 

/api/v2/instance/:instanceId/send/forward

Forwards Message

Request

Path Parameters

    instanceId stringrequired

    ID of the instance.

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.

    recipient Recipientrequired

    Contact number or group id

    options object
    delay Delay

    Defines the delay with which the message will be sent in milliseconds.

    presence Presence

    Default value: composing | recording | available | unavailable

    Defines the behavior of the connected number when sending the message in the chat.

    quoteMessageById Quote Message

    Enter the id of the message to be quoted.

    groupMention object

    Mention the participants of a group.

    hidden Hidden

    Default value: true

    This parameter allows mentioning all members of a group without directly referencing them.

    everyone Everyone

    Default value: true

    Use this attribute to explicitly mention all members of a group.

    externalAttributes External Attributes

    An external value of any type that will be sent in the webhook.

    forwardsMessage object
    messageId Message Id
    message objectrequired
    keyId Key Idrequired
    keyFromMe Key From Merequired
    keyRemoteJid Key From Merequired
    participant Participant
    pushName Push Namerequired
    contentType Content Typerequired
    content objectrequired

Responses

ResponseSendMessage

Schema
    messageId stringrequired
    keyId stringrequired
    keyFromMe booleanrequired
    keyRemoteJid stringrequired
    keyParticipant string
    pushName stringrequired
    contentType stringrequired
    isGroup booleanrequired
    content objectrequired
    source stringrequired
    messageTimestamp numberrequired
    createdAt date-timerequired

    Default value: 2024-04-13T23:22:07.162Z

    instanceInstanceId stringrequired

    Default value: 2024-04-13T23:22:07.162Z

    externalAttributes stringrequired
Loading...