API reference

Message gateway

GET/POST /api/gateway/whatsapp — a simple send gateway compatible with plugins such as Digits for WordPress.

POST /api/gateway/whatsapp
GET  /api/gateway/whatsapp

A simple send gateway built for plugins that offer a "custom SMS/WhatsApp gateway", such as the Digits phone-login plugin for WordPress. It accepts several field names to stay compatible with these plugins.

Headers

Header Value
X-API-Key Your key (or Authorization: Bearer <key>)
Content-Type application/json or application/x-www-form-urlencoded (for POST)

Parameters

With GET, parameters are read from the URL only. With POST, they are read from both the body and the URL.

Parameter Aliases Required Description
to phone, mobile Yes Recipient number. Non-digit characters are removed.
message text, msg Yes Message text
instance_id sender_id, sender No ID of the sending number. Default: the first connected number

Requires a plan with API access (403 plan_no_api) and the send key permission (403 permission_denied). Limited to 100 requests per minute per key (429 with Retry-After).

Response

200 OK

JSON
{
  "success": true,
  "status": "sent",
  "message_id": "wamid.HBgMOTY2NTAwMDAwMDAwFQIAERgSQzE2...",
  "to": "966500000000",
  "data": { "message_id": "wamid.HBgMOTY2NTAwMDAwMDAwFQIAERgSQzE2..." }
}

Errors

Status code error
400 MISSING_TO Phone number required (to)
400 MISSING_MESSAGE Message required (message)
401 UNAUTHORIZED Invalid API key
403 PLAN_LIMIT / OPTED_OUT / BLOCKED The blocking reason
404 NO_INSTANCE No connected WhatsApp instance found
502 SEND_FAILED The failure reason

Digits setup

Digits setting Value
Gateway URL https://waabek.com/api/gateway/whatsapp
HTTP Method POST
Headers X-API-Key:YOUR_KEY
Parameters to:{to} and message:{message}

Examples

curl -X POST https://waabek.com/api/gateway/whatsapp \
  -H "X-API-Key: $WABEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "to": "+966 50 000 0000", "message": "Welcome to our store!" }'

Key in the URL (deprecated)

The gateway still accepts ?api_key= or ?key= in the URL, or api_key in the body, for compatibility with older Digits setups. Move the setting to the X-API-Key header; this method may be disabled later.