Skip to main content
POST
/
messages
/
image
curl --request POST \
  --url https://wsapi.chat/messages/image \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --header 'X-Instance-Id: <x-instance-id>' \
  --data '
{
  "to": "1234567890@s.whatsapp.net",
  "url": "https://example.com/cat.jpg",
  "mimeType": "image/jpeg",
  "caption": "Cat pic"
}
'
{
  "id": "01234567890123456"
}

Authorizations

X-Api-Key
string
header
required

Instance or customer-level API key. Either the instance's own API key or the customer's API key is accepted. Must be paired with the X-Instance-Id header to identify the target instance.

Headers

X-Instance-Id
string
default:{{instanceId}}
required

The ID of the WhatsApp instance to use

Body

application/json
to
string
required

Recipient JID

data
string

Base64-encoded file data (mutually exclusive with url)

url
string<uri>

URL to download the media from (mutually exclusive with data, max 50 MB)

mimeType
string

MIME type of the file (auto-detected if omitted)

caption
string

Media caption

mentions
string[]
replyTo
string
replyToSenderId
string
isForwarded
boolean
viewOnce
boolean

Send as view-once media

ephemeralExpiration
enum<string>
Available options:
off,
24h,
7d,
90d

Response

Resource created

id
string

ID of the created resource