Skip to content
Send messages

Send document

Send any file type WhatsApp recognises as a document. The filename shown to the recipient defaults to the URL’s last segment if you don’t override it.

Terminal window
curl -X POST \
https://api.kirim.chat/v1/$PHONE_ID/messages \
-H "Authorization: Bearer $KIRIM_KEY" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "+628123456789",
"type": "document",
"document": {
"link": "https://cdn.example.com/invoices/INV-4521.pdf",
"filename": "INV-4521.pdf",
"caption": "Invoice bulan Mei"
}
}'
FieldConstraint
document.linkPublic HTTPS URL; either link or id (not both)
document.filenameOptional, ≤ 255 chars — shown to the recipient
document.captionOptional, ≤ 1024 chars
FormatPDF, Word, Excel, PowerPoint, plain text, more
Max size100 MB