curl --request POST \
--url https://api.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"
}{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 409,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Messages
Send an image message
Send an image message via URL or base64-encoded data. The response contains the message ID.
POST
/
messages
/
image
curl --request POST \
--url https://api.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"
}{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 409,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Authorizations
Body
application/json
⌘I