v1

latestOpenAPI 3.0.22026-08-045831103.6 KB
Messages

Send document message

Send a document message via WhatsApp Official. The document URL is sent directly to the Meta API. Filename is required and will be displayed to the recipient. Returns immediately with QUEUED status.

post/v2/messages/document

Headers

api-tokenstring required

API Token

Request body

channel_account_idstring uuid required

UUID of the WhatsApp Official channel account

contact_idstring uuid required

UUID of the contact to send the document to

urlstring uri required

Direct URL of the document to send

filenamestring required

Filename displayed to the recipient

captionstring

Optional caption for the document

chat_idstring uuid

Optional UUID of an existing chat. If not provided, the system will find or create a chat automatically.

Example request

{
  "channel_account_id": "550e8400-e29b-41d4-a716-446655440001",
  "contact_id": "550e8400-e29b-41d4-a716-446655440002",
  "url": "https://example.com/report.pdf",
  "filename": "report.pdf",
  "caption": "Monthly report",
  "chat_id": "550e8400-e29b-41d4-a716-446655440003"
}

Response

Document message queued for sending

statusinteger

Example response

{
  "status": 200,
  "data": {
    "success": true,
    "message_id": "550e8400-e29b-41d4-a716-446655440099",
    "chat_id": "550e8400-e29b-41d4-a716-446655440003",
    "status": "QUEUED"
  }
}