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
ID of the instance.
- multipart/form-data
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.
Contact number or group id
Load the media file.
Possible values: [image
, video
, document
, sticker
, audio
]
Choose the type of food to be sent.
Define a caption for your image.
Default value: 1200
Defines the delay with which the message will be sent in milliseconds.
Possible values: [unavailable
, available
, composing
, recording
, paused
]
Default value: composing
Defines the behavior of the connected number when sending the message in the chat
Enter the id of the message to be quoted.
This parameter allows mentioning all members of a group without directly referencing them.
Use this attribute to explicitly mention all members of a group.
An external value of string type that will be sent in the webhook.
Responses
- 201
- 400
- 401
- 403
- 404
- 500
ResponseSendMessage
- application/json
- Schema
- Example (from schema)
Schema
Default value: 2023-12-13T17:55:01.032Z
Default value: 2023-12-13T17:55:01.032Z
{
"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:05.678Z",
"instanceInstanceId": "2023-12-13T17:55:01.032Z",
"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
}