The WhatsApp API supports the following image types:
- image/jpeg (with extensions .jpg and .jpeg)
- image/png (.png)
The maximum file size allowed for images is 5 MB.
PARAMETER | FORMAT | REQUIRED | DESCRIPTION | DEFAULT |
url | string | Yes | The URL that your image file is uploaded to should be publicly accessible | |
caption | string | Optional | Image caption |
Sample request using CURL:
$ curl -X POST https://api.geniq.io/rest/v1/whatsapp/messages \
-H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-d '{
"recipient":"6591234567",
"type":"image",
"url":"https://images.pexels.com/photos/25002430/pexels-photo-25002430/free-photo-of-shot-with-oldroll-classic-m.jpeg",
"caption":"Sample Image",
"reference": "12345"
}' \