Send document files like PDF, invoice, or report.

Request

cURL
curl -X POST "https://api.wazapin.id/v1/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "wzp_abc123",
    "to": "6281234567890",
    "type": "document",
    "content": {
      "media_url": "https://cdn.example.com/docs/invoice-2026-001.pdf",
      "file_name": "invoice-2026-001.pdf",
      "caption": "Invoice terbaru kamu"
    }
  }'

Notes

  • Use content.media_url as the canonical media field.
  • content.file_name is optional but recommended for documents.
  • content.fileName is still accepted as a compatibility alias.
  • content.caption is optional.