Skip to content
Reference/Outgoing Messages/Send Document Message

Send Document Message

POSThttps://public.leadpattern.com/whatsapp/message/document
WhatsApp Connectedapplication/json60 req/min

Send a PDF or other document file using a public URL.

Headers

1 field
Authorizationstring
required
Your API key. Sent raw (e.g. 'lp_...'). No Bearer prefix required.

Body Parameters

2 fields
tostring
required
Recipient phone number in E.164 format (with country code).
contentobject
required
urlstring
required
Public URL of the document.
filenamestring
optional
File name shown to the recipient.
captionstring
optional
Document caption.

Responses

Message accepted by WhatsApp.
JSON Response
{
  "type": "success",
  "data": {
    "messageId": "wamid.abc123",
    "status": "sent",
    "recipient": "9195XXXXXXXX"
  }
}

Sample Request Body

{
  "to": "+9195XXXXXXXX",
  "content": {
    "url": "https://example.com/invoice.pdf",
    "filename": "Invoice_2024.pdf",
    "caption": "Your invoice"
  }
}