Send WhatsApp Message

-------------------------
1. SEND WHATSAPP MESSAGE
-------------------------

Send WhatsApp Message: Sends a WhatsApp text message (optionally with a media file) to a recipient number. You can use a default device or specify a particular sending device.

Endpoint: POST /whatsapp/send

Parameters (JSON body):

  • api_key (required, string): Your WhatsApp Messaging API key.
  • number (required, string): Recipient WhatsApp number in international format (e.g. 250788123456).
  • message (required, string): Text content of the WhatsApp message.
  • file (optional, string): Public URL to an image or file to send along with the message.
  • sender_number (optional, string): Specific device phone number to send from.
  • device_id (optional, string): Alternative to sender_number; internal device identifier.

Example Request (Basic):

curl -X POST "https://umva.net/api/messaging/whatsapp/send" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_WHATSAPP_API_KEY",
    "number": "250788123456",
    "message": "Hello from WhatsApp API!"
  }'

Example Request (Send from Specific Device):

curl -X POST "https://umva.net/api/messaging/whatsapp/send" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_WHATSAPP_API_KEY",
    "number": "250788123456",
    "message": "Hello from my specific device!",
    "sender_number": "250789000111"
    /* or: "device_id": "YOUR_DEVICE_ID" */
  }'

Success Response Example (HTTP 200):

{
  "success": true,
  "message": "Message sent successfully",
  "data": {
    "device_name": "My Device",
    "remaining_capacity": 315
  }
}

Notes: If neither sender_number nor device_id is provided, the system uses your default connected device for WhatsApp messaging.