Ivorypush API reference
Send and receive WhatsApp messages from your own software. Each client can link 1 to 10 numbers.
Sign in with Google to get your API keys in the dashboard (first month free).
Authentication
Send Authorization: Bearer wag_live_... on every request. Keys are shown once when issued. A wag_test_ key records messages but sends nothing.
Keys can be limited to scopes (messages:send, messages:read, numbers, webhooks, optouts) and to one number.
Send a message
POST /v1/messages
Idempotency-Key: order-1042-confirmation (optional, 24h dedupe)
{ "to": "919812345678", "text": "Your order is ready.",
"from": "num_...", (optional: otherwise your least-busy connected number)
"media": { "url": "https://...", "type": "image/jpeg", "file_name": "a.jpg" }, (optional)
"send_at": "2026-12-01T09:00:00Z", "expires_at": "2026-12-01T12:00:00Z" } (optional)
-> 202 { "id": "msg_...", "status": "queued", ... }
Numbers are the full international number (a plain 10-digit Indian number gets 91). Messages go out one at a time per number with a short random pause between them, to protect the number.
Each number is limited to 1,000 new messages in any 24 hours. Recipients who replied STOP are blocked (recipient_opted_out).
| Route | What it does |
|---|---|
POST /v1/messages/batch | Same body, to is a list (max 200). Returns each result. |
GET /v1/messages, /{id} | List (filters status, number, limit, cursor) or read one. Status: queued, scheduled, sending, sent, delivered, read, failed, cancelled, expired. |
DELETE /v1/messages/{id} | Cancel while still queued or scheduled. |
GET /v1/me | Your plan, key scopes and event types. |
Numbers
POST /v1/numbers {label} | Add a number (up to your plan limit). Then scan its QR. |
GET /v1/numbers, /{id} | List or refresh status: starting, scan_qr, connected, failed, stopped, unreachable. |
GET /v1/numbers/{id}/qr | Returns {mimetype, data} (base64 PNG). Scan with WhatsApp > Linked devices. |
POST /v1/numbers/{id}/pairing-code {phone} | 8-character code to type under "Link with phone number instead". |
DELETE /v1/numbers/{id} | Log out and remove the number. |
POST /v1/numbers/{id}/reconnect | Restart the linked session. |
PATCH /v1/numbers/{id} {safe_mode} | Turn Safe Mode on or off for one number. |
GET /v1/logs | What came in, went out, failed or changed. Filters dir (in, out, error, system), number, limit, cursor. Kept 30 days. |
GET /v1/queue, DELETE /v1/queue?number= | Messages waiting to go out; cancel everything still queued. |
Lists, templates, campaigns, reminders
POST /v1/lists {name} | Create a saved list. POST /v1/lists/{id}/members {rows:[{phone, name, vars:{"City":"Delhi"}}]} adds people; every extra column is kept and can be used as {{city}}. |
POST /v1/campaigns | {name, message, number_id?, send_at?, media?, location?, audience:{list_id} or {rows:[...]}}. Placeholders in the message: {{name}} (first name), {{full_name}}, {{phone}} and any column, e.g. {{due_amount}}. Rows are released a few at a time and wait for Safe Mode limits instead of failing. GET /v1/campaigns/{id} shows progress; POST /v1/campaigns/{id}/cancel stops it. |
POST /v1/reminders | {name, message, audience, repeat:{freq:"daily|weekly|monthly", days:[0-6], day_of_month, time:"HH:MM", tz}}. Each run starts a campaign. /pause, /resume, DELETE. |
/v1/templates | Saved messages: GET, POST, PUT, DELETE. |
GET /v1/inbox/conversations | Level 2. Customer replies, /conversations/{phone}/messages for a thread, POST /conversations/{phone}/read. Reply with POST /v1/messages. |
Safe Mode (warm-up)
A newly linked number is warmed up for 14 days. Limits rise in five steps: 60, 150, 300, 600, then 1,000 messages a day; 1, 2, 3, 5, then 8 a minute; 8, 20, 40, 80, then 150 new chats a day.
In that time a link or attachment as the first message to a new chat is refused (link_in_first_message). Errors: safe_mode_daily_limit, safe_mode_new_chat_limit.
The same text to the same chat more than 3 times in 24 hours is refused (duplicate_message); set "skip_filter": true to override. Each number shows its current warmup step.
Location
{ "to": "919812345678", "location": { "latitude": 19.076, "longitude": 72.8777, "name": "Our shop", "address": "Zaveri Bazaar", "as_link": false } }
A map pin by default. With as_link: true it goes out as a text message with a map link. A location cannot be combined with text or media.
Number health emails
Once a day (about 9 am India time) we email the account owner and you, only if a number is disconnected, needs a QR scan, has failed or stuck messages, or a webhook was switched off. No problem, no email.
Webhooks
POST /v1/webhooks {url, events} (https only, max 5; the secret is shown once). Events: message.sent, message.failed, message.delivered,
message.read, message.expired, message.received, number.connected, number.disconnected, number.status, ping. Test with POST /v1/webhooks/{id}/test.
{ "id": "evt_...", "type": "message.received", "created_at": "...", "data": { "number_id": "num_...", "from": "9198...", "text": "hi" } }
Headers: WaGateway-Event-Id, WaGateway-Timestamp (unix seconds), WaGateway-Signature = "v1=" + HMAC_SHA256(secret, timestamp + "." + rawBody)
Verify with the raw body and reject timestamps older than 5 minutes. Failed deliveries retry over about 17 hours. Return any 2xx to acknowledge.
Opt-outs
GET/POST /v1/optouts, DELETE /v1/optouts/{phone}. A reply of STOP is added automatically.
Errors
{ "error": { "code": "daily_limit_reached", "message": "...", "field": "...", "request_id": "req_..." } }
Limit: 120 requests a minute per key. Unofficial linked-device sending is not endorsed by WhatsApp and a number can be restricted by them. Message only people who expect to hear from you.