POST

Send Media / Document

Media

Send images, PDF invoices, audio recordings, or video clips directly to WhatsApp recipients with optional captions.

HTTP Endpoint

POSThttps://api-wa.hidessh.com/api/v1/wa/messages/send

Authentication

This endpoint requires Bearer authentication via your secret API Key.
Header KeyValueRequired
AuthorizationBearer <your_api_key>Required
Content-Typeapplication/jsonRequired

Request Parameters

The request body must be formatted as JSON with the following parameters:

ParameterTypeRequiredDescription
phone
stringRequired

Target phone number in international E.164 format.

example: 628123456789
media_url
stringRequired

Direct publicly accessible HTTPS URL to the media asset.

example: https://cdn.wahide.com/invoices/INV-2026.pdf
caption
stringOptional

Optional text caption accompanying the media file.

example: Here is your invoice for September 2026.
filename
stringOptional

Custom filename for PDF / document files shown to the recipient.

example: Invoice-September-2026.pdf

Code Examples

request.sh
curl -X POST "https://api-wa.hidessh.com/api/v1/wa/messages/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "628123456789",
    "media_url": "https://cdn.wahide.com/invoices/INV-2026.pdf",
    "caption": "Your official invoice",
    "filename": "Invoice-INV2026.pdf"
  }'

Response Formats

Media downloaded and dispatched to recipient.

application/json • 200 OK
{
  "messaging_product": "whatsapp",
  "contacts": [{ "input": "628123456789", "wa_id": "628123456789" }],
  "messages": [{ "id": "3EB0CCDDEEFF0011" }]
}