1. Home
  2. Docs
  3. WhatsApp
  4. Send WhatsApp Message
  5. Document Message

Document Message

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.

PARAMETERFORMATREQUIREDDESCRIPTIONDEFAULT
urlstringYesThe URL that your document file is uploaded to should be publicly accessible
captionstringOptionalFile caption
filenamestringOptionalFilename

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",
}' \