API Reference
Complete endpoint specification for sending text and media messages.
Send Message Endpoint
Send text messages, images, PDFs, audio, or video files programmatically.
URL: https://api.wa-ma.org/send-message.php
Method: POST
Content-Type: multipart/form-data (FormData)
Request Parameters
• whatsapp_api_key (Required | String): The API key of your connected WhatsApp instance.
• recipient (Required | String): Recipient country code + phone number without + or spaces (e.g. 966501234567).
• message (Required | String): Text body of your message.
• media (Optional | String): Base64-encoded file contents or data URI to send an attachment.
Success Response
If the parameters are valid, the message is queued in the database and a success response is returned:
{
"success": true,
"message": "Message saved in the queue",
"id": 42
}Error Response
If the request fails, an error response containing the description is returned:
{
"error": "WhatsApp instance is not connected"
}