Description
This endpoint allows you to send files of any type (documents, PDFs, spreadsheets, etc.) to individual contacts or groups on WhatsApp. The file must be sent in base64 format with the mimetype and file name specified.Body
Body Parameters
Property | Type | Required | Description |
---|---|---|---|
sessionId | string | ✅ Yes | Authenticated session ID that will send the file |
jid | string | ✅ Yes | Recipient identifier (WhatsApp JID). Format: 5511999999999@s.whatsapp.net for contacts or 120363XXXXX@g.us for groups |
file | object | ✅ Yes | Object containing the file information |
file.content | string | ✅ Yes | File content encoded in base64 |
file.mimetype | string | ✅ Yes | File MIME type (example: application/pdf , application/vnd.ms-excel , application/zip ) |
file.filename | string | ✅ Yes | File name with extension (example: document.pdf , spreadsheet.xlsx ) |
Status Codes
200
- File sent successfully400
- Invalid parameters401
- Unauthorized session404
- Session not found
Usage Example
Authorizations
Your Wappfy API key (get it at dash.wappfy.com.br)
Body
application/json
Chat ID (WhatsApp JID)
Example:
"5511999999999@c.us"
File (remote URL or base64 data)
- Option 1
- Option 2
Session name (instanceName)
Example:
"my-session"
Message ID you want to reply to
Example:
null
Caption/text that accompanies the file
Response
201 - application/json
The response is of type object
.