Developers
Whapick Public API
Send approved WhatsApp template messages from your own systems — no dashboard login required. Bearer-authenticated, business-scoped and asynchronous. Bulk/template sends are charged 1 AI credit per dispatched message from your shared AI-credit pool.
Base URL https://whapick.com/api/v1
1. Authenticate
Create a key under Settings -> API (shown once). Send it as a bearer token. Every key is bound to one business — the account is always taken from the key, never the body.
Authorization: Bearer wh_live_<prefix>_<secret>
A test key validates the full path but never dispatches or charges.
2. Scopes
| Scope | Grants |
|---|---|
| broadcasts:send | Create, schedule and cancel broadcasts |
| broadcasts:read | List broadcasts and poll their status |
| templates:read | List approved templates and their variables |
| account:read | Read plan, credit and limit information |
3. Send a broadcast
POST /api/v1/broadcasts
curl -X POST https://whapick.com/api/v1/broadcasts \
-H "Authorization: Bearer $WHAPICK_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "665f1c2ab3e4d5f6a7b8c9d0",
"recipient": { "source": "groups", "groupIds": ["665f1c2ab3e4d5f6a7b8c9d1"] },
"variables": { "1": "Ada", "2": "20% off" },
"externalId": "order-4821"
}'{
"broadcastId": "665f1c2ab3e4d5f6a7b8c9d2",
"status": "QUEUED",
"totalRecipients": 412,
"creditsReserved": 412,
"scheduledFor": null
}- Recipients:
sourceisphonesorgroups. Numbers are normalised and de-duplicated. - Variables: positional map, e.g.
{ "1": "Ada" }. - Scheduling: pass
scheduledFor(ISO-8601) to hold the send. - Idempotency: replaying the same
externalIdreturns the original broadcast (HTTP 200) instead of sending twice.
4. Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/broadcasts | Create and enqueue (or schedule) a broadcast |
| GET | /api/v1/broadcasts | List your broadcasts |
| GET | /api/v1/broadcasts/:id | Poll a broadcast status |
| POST | /api/v1/broadcasts/:id/cancel | Cancel a scheduled/queued broadcast |
| GET | /api/v1/templates | List approved templates |
| GET | /api/v1/templates/:id | Get one template |
| GET | /api/v1/me | Plan, credits and limits |
| GET | /api/v1/openapi.json | OpenAPI 3.1 spec (public) |
5. Credits & billing
Bulk sends charge 1 AI credit per dispatched message from the same pool as your chatbot usage. Credits are reserved up front for the whole list, then reconciled on completion: dispatched messages are charged, recipients skipped before any attempt are refunded. remaining = allowance - used - reserved. A send that does not fit is refused with 402 insufficient_credits, and bulk sends require a payment method on file.
6. Webhooks
Configure an endpoint under Settings -> API. We POST a signed broadcast.completed / broadcast.failed event. Verify X-Whapick-Signature (HMAC-SHA256 of the raw body, keyed by your signing secret) before trusting the payload, and treat the webhook as a notification only — GET /broadcasts/:id is authoritative.
7. Errors
| Status | Meaning |
|---|---|
| 400 | Validation error |
| 401 | Key missing, invalid, revoked or expired |
| 402 | insufficient_credits |
| 403 | missing_scope, template not approved, payment_method_required |
| 404 | Unknown resource (or not yours) |
| 413 | Recipient list over the plan cap |
| 429 | Rate limited |