Skip to main content

Send Message: File

POST 

/api/v2/instance/:instanceId/send/media-file

Send File Message

Send media in general to whatsapp, such as: images, videos, stickers, audios and documents.

Request

Path Parameters

    instanceId stringrequired

    ID of the instance.

Body

required

multipart/form-data is one of the content types used in HTTP requests to send data, especially binary files such as images, videos, audios, documents and other types of media. This content type is widely used when you need to pass structured information, including binary files, through forms on web pages.

When sending data with the multipart/form-data type, the request is divided into several parts, that is, it is "multipart". Each part contains a header that describes the data type and content, and the data body itself, which contains the binary file or the other form fields. The parts are separated by a special string of characters that acts as a delimiter, usually defined in the request.

In summary, multipart/form-data is a content type used to send data, including binary files, through HTTP requests, allowing the secure and efficient transmission of structured information between clients and servers.

    recipient Recipientrequired

    Contact number or group id

    attachment binaryrequired

    Load the media file.

    mediatype Media typerequired

    Possible values: [image, video, document, sticker, audio]

    Choose the type of food to be sent.

    caption Caption

    Define a caption for your image.

    delay Delay

    Default value: 1200

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

    presence Presence

    Possible values: [unavailable, available, composing, recording, paused]

    Default value: composing

    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.

    groupMentionHidden Group Mention Hidden

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

    groupMentionEveryone Group Mention Everyone

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

    externalAttributes External Attributes

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

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: 2023-12-13T17:55:01.032Z

    instanceInstanceId stringrequired

    Default value: 2023-12-13T17:55:01.032Z

    externalAttributes stringrequired
Loading...