Yes, you can send a PDF file over WhatsApp. To do this, you must use a pre-approved WhatsApp message template from Meta that is configured with a document header, and pass the public URL of your PDF as the document header variable.
Note: the legacy /createWhatsAppMessage endpoint is deprecated. New integrations should use Messaging API v2 — pass platforms: ["WHATS_APP"] to Notify and use the whatsapp block inside payload.content.localized_content. See the migration guide.
Legacy request example (deprecated endpoint):
{
"request": {
"application": "APP_CODE",
"auth": "API_TOKEN",
"notifications": [
{
"send_date": "now",
"content_id": "your_meta_template_name",
"header_variables": {
"document": "https://example.com/file.pdf"
},
"devices": [
"whatsapp:+1234567890"
]
}
]
}
}
Key points to remember:
- Your
content_idmust be the name of a Meta-approved template that includes a document header. - The PDF file must be hosted at a publicly accessible URL.
- Each request must contain only one WhatsApp number in the
devicesarray. - Set
languageif your template locale is not the defaulten_US. - Ensure that your WhatsApp platform is fully configured in your Pushwoosh account before sending messages.
Comments
0 comments
Please sign in to leave a comment.