Skip to main content
POST
/
api
/
v1
/
messages
/
document
Send a document message
curl --request POST \
  --url https://api.wazzapi.io/api/v1/messages/document \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "+1234567890",
  "mediaUrl": "https://example.com/document.pdf",
  "whatsappAccountId": "wa_abc123def456"
}
'
{
"success": true,
"message": {
"id": "msg_1234567890",
"status": "queued",
"runId": "run_abc123",
"createdAt": "2025-01-15T10:30:00.000Z"
}
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as Bearer YOUR_API_KEY. API keys can be created from the dashboard.

Body

application/json
phone
string
required

Recipient phone number in international format (E.164)

Minimum string length: 1
Example:

"+1234567890"

mediaUrl
string<uri>
required

Public URL of the document file

Minimum string length: 1
Example:

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

whatsappAccountId
string
required

ID of the WhatsApp account to send from. Must be in 'connected' status.

Minimum string length: 1
Example:

"wa_abc123def456"

caption
string

Optional caption text for the document

Maximum string length: 1024
Example:

"Here is the document"

filename
string

Optional filename for the document

Maximum string length: 255
Example:

"report.pdf"

Response

Message queued successfully

success
boolean
required

Indicates if the message was queued successfully

Example:

true

message
object
required