API reference

Trigger (for automation tools)

POST /api/webhooks/trigger — send a message from Zapier, Make or any automation tool, and fire the message_sent webhook.

POST/api/webhooks/trigger

A send endpoint for automation tools such as Zapier and Make. After a successful send, the outgoing webhooks registered for message_sent are fired.

Headers

Header Value
X-API-Key Your key. This endpoint does not accept Authorization: Bearer or the key in the URL.
Content-Type application/json

Request body

Field Type Required Description
to string Yes Recipient number in international format
message string Yes Message text
instance_id string No ID of the sending number. Default: the first connected number

The key needs the send permission (otherwise 403 permission_denied).

Response

200 OK

JSON
{
  "success": true,
  "message_id": "wamid.HBgMOTY2NTAwMDAwMDAwFQIAERgSQzE2..."
}

Errors

Status error Cause
400 to and message required Missing field
401 API key required Missing X-API-Key header
401 Invalid API key Invalid key
403 The blocking reason Plan limit, opt-out or block
404 No connected WhatsApp instance No connected number
405 Method not allowed Method is not POST
502 The failure reason The WhatsApp provider rejected the message

Examples

curl -X POST https://waabek.com/api/webhooks/trigger \
  -H "X-API-Key: $WABEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "to": "966500000000", "message": "Thanks for filling in our form!" }'