WasenderApi - Low Cost WhatsApp API for Developers Send Document Message - API Documentation - WasenderApi - Low Cost WhatsApp API for Developers
WasenderApi API

API Documentation

WasenderApi WhatsApp API

Send Document Message

Messages

POST/api/send-message

Sends a message with a document attached via a URL.

Send Document Message

Send a message with a document attached. Provide the document via a publicly accessible URL in the documentUrl parameter. You can optionally include caption text in the text parameter and specify a filename.

Most common document types are supported (PDF, DOCX, XLSX, etc.). Maximum file size: 50MB.

Parameters

NameTypeRequiredDescription
tostringYesRecipient phone number in E.164 format or, Group JID.
textstringNoThe text content of the message. Required if no media/contact/location is sent.
documentUrlstringYesURL of the document to send.
fileNamestringNoThe file name of the document. If not provided, document.{extension} will be used.

Code Examples

curl -X POST "https://www.wasenderapi.com/api/send-message"
  -H "Authorization: Bearer YOUR_API_KEY"
  -H "Content-Type: application/json"
  -d '{
      "to": "+1234567890",
      "text": "Quarterly report",
      "documentUrl": "https://example.com/report.pdf",
      "fileName:"report-02-2025.pdf"
  }'

Response Examples

{
  "success": true,
  "data": {
    "msgId": 100000,
    "jid": "+123456789",
    "status": "in_progress"
  }
}