Send WhatsApp File
-------------------------
2. SEND WHATSAPP FILE
-------------------------
Send WhatsApp File: Sends a document, image, or other media file via WhatsApp from a specific device, with an optional caption.
Endpoint:POST /whatsapp/send-file
Parameters (JSON body):
api_key(required, string): Your WhatsApp Messaging API key.number(required, string): Recipient WhatsApp number (international format).fileUrl(required, string): Publicly accessible URL of the file (image, PDF, etc.).caption(optional, string): Optional caption or description sent with the file.sender_number(required*, string): Device phone number to send from.device_id(optional, string): Alternative tosender_number; internal device identifier.
* At least one of sender_number or device_id must be supplied.
Example Request:
curl -X POST "https://umva.net/api/messaging/whatsapp/send-file" \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_WHATSAPP_API_KEY",
"number": "250788123456",
"fileUrl": "https://example.com/document.pdf",
"caption": "Here is the requested document",
"sender_number": "250789000111"
}'Success Response Example (HTTP 200):
{
"success": true,
"message": "Message sent successfully",
"data": {
"device_name": "My Device",
"remaining_capacity": 314
}
}Notes: The file URL must be reachable over HTTPS and return the correct content type. Very large files may be rejected depending on provider/device limits.