File
Send a document, such as a PDF invoice.
POST
/v1/numbers/{phone_number}/messages/sendReference →
curl -X POST "$WAPIU_API/v1/numbers/$WAPIU_NUMBER/messages/send" \ -H "Authorization: Bearer $WAPIU_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "recipient": "+393331112222", "message": { "message_type": "file", "file": { "url": "https://example.com/invoice.pdf", "name": "invoice.pdf", "caption": "Your invoice" } } }'| Field | Type | Required | Description |
|---|---|---|---|
file.url | string | Yes | A public HTTPS URL, up to 100 MB. |
file.name | string | No | The file name the user sees. |
file.caption | string | No | Up to 3000 characters. |
Delivered only within the 24-hour window. Outside it, send a template.
The response and errors are the same for every type: see Send a message.