Documentation Index
Fetch the complete documentation index at: https://docs.wator.id/llms.txt
Use this file to discover all available pages before exploring further.
Wator menyediakan dua cara mengirim media lewat API.
Endpoint:
POST /v1/devices/{deviceID}/messages/media
Contoh:
curl -X POST "https://api.wator.id/v1/devices/123/messages/media" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "628123456789@s.whatsapp.net",
"media_url": "https://example.com/invoice.pdf",
"caption": "Invoice Anda",
"mime_type": "application/pdf",
"priority": "normal"
}'
Wator akan mengambil file dari media_url, lalu memprosesnya sebagai pesan media.
Upload file
Endpoint:
POST /v1/devices/{deviceID}/messages/upload
Contoh:
curl -X POST "https://api.wator.id/v1/devices/123/messages/upload" \
-H "X-API-Key: YOUR_API_KEY" \
-F "to=628123456789@s.whatsapp.net" \
-F "caption=Katalog terbaru" \
-F "priority=normal" \
-F "file=@catalog.pdf"
Jika pengiriman media gagal, cek kembali URL file, ukuran file, format media, status device, dan batas paket Anda.