Pesan

Send image

POST
/messages/image

Otorisasi

X-Api-Key: wpf_YOUR_KEY

The connection's API key (wpf_...), generated in the dashboard.

Authorization: Bearer wpf_YOUR_KEY

The same key in Authorization: Bearer wpf_... (what n8n, Make and HTTP libraries support out of the box).

Parameter header

Idempotency-Key?string

Optional. Repeating the same value within 24 h, with the same API key, returns the first response without sending again. See Idempotency in the introduction.

Body permintaan

application/json
  1. body
to?string

Recipient: phone number with country code and area code, digits only (5581999999999; +, spaces and dashes are ignored), or the chatId (5581999999999@c.us, ...@lid, or a group ...@g.us). Brazilian phone numbers are checked on WhatsApp before sending.

url*string

Public http(s) address of the file. The Wappfy server downloads it (up to 50 MB, 30 s, up to 3 redirects); internal addresses are rejected. Provide url or base64, never both.

Panjanglength <= 2048
base64?string

The file in base64, raw or as a data URL (data:image/png;base64,...). Counts toward the request body limit; for large files, prefer url.

Panjang1 <= length
mimetype?string

File type (image/jpeg, application/pdf...). Optional: without it, the download's Content-Type is used, then the extension of the name or URL.

Panjanglength <= 255
filename?string

File name as the contact will see it (matters mostly in /messages/file).

Panjanglength <= 255
caption?string

Optional caption.

Panjanglength <= 1024

Body respons

Sent. Keep the message_id: it is what appears in the message.sent and message.status events.

application/json
  1. response
data*
curl -X POST 'https://app.wappfy.io/api/v1/messages/image' \  -H 'X-Api-Key: wpf_YOUR_KEY' \  -H 'Content-Type: application/json' \  -d '{  "to": "5581999999999",  "url": "https://exemplo.com/produto.jpg",  "caption": "Nosso novo produto"}'
{  "data": {    "message_id": "string",    "chat_id": "string"  }}