Skip to main content
POST
Send Document

Basic Usage


Request Body

Supported formats: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX.

Response

Success (200)

Error: Missing Required Field (400)


Integration Example


Media URLs

Ensure the document URL is publicly accessible. The API needs to download the file before uploading to Meta.

Authorizations

Authorization
string
header
required

Bearer token for authentication. Format: Bearer YOUR_BEARER_TOKEN

Body

application/json
phone_number
string
required

Recipient phone number with country code

Example:

"+27123456789"

message_type
enum<string>
required

Must be "document"

Available options:
document
Example:

"document"

media_url
string
required

Publicly accessible URL to the document file

Example:

"https://example.com/invoice.pdf"

filename
string

Display filename shown to the recipient

Example:

"Invoice_2025.pdf"

caption
string

Optional caption for the document

Example:

"Please find your invoice attached"

context_message_id
string

WhatsApp message ID to reply to

Example:

"wamid.HBgLMjc4MTIzNDU2NzgVAgASGBQzRUI..."

Response

Message sent successfully

success
boolean
Example:

true

message
string
Example:

"Message sent successfully"

data
object