Skip to main content
POST
Send a file

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

Status Codes

  • 200 - File sent successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized session
  • 404 - Session not found

Usage Example

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Body

application/json
chatId
string
required

Chat ID (WhatsApp JID)

Example:

"5511999999999@c.us"

file
object
required

File (remote URL or base64 data)

session
string
required

Session name (instanceName)

Example:

"my-session"

reply_to
string

Message ID you want to reply to

Example:

null

caption
string

Caption/text that accompanies the file

Response

201 - application/json

The response is of type object.