The WhatsApp API supports the following file types:
- text/plain (.txt)
- application/pdf (.pdf)
- application/vnd.ms-excel (.xls)
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.xlsx)
- application/msword (.doc)
- application/vnd.openxmlformats-officedocument.wordprocessingml.document (.docx)
- application/vnd.ms-powerpoint (.ppt)
- application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx)
The maximum file size allowed for files is 100 MB.
PARAMETER | FORMAT | REQUIRED | DESCRIPTION | DEFAULT |
url | string | Yes | The URL that your document file is uploaded to should be publicly accessible | |
caption | string | Optional | File caption | |
filename | string | Optional | Filename |
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":"document",
"url":"https://filesamples.com/samples/document/pdf/sample2.pdf",
"caption":"Test Doc",
"filename":"sample2.pdf",
"reference": "12345",
}' \