Overview
Badala is a multi-tenant WhatsApp Business inbox built on the Meta Cloud API direct (no BSP). This documentation covers the REST API, outbound webhooks, and patterns for integrating Badala with your existing systems.
What you can do via the API
- Send WhatsApp messages (text, media, templates) on behalf of an org
- Read and search contacts
- List conversations and messages, post replies
- Manage canned responses, templates, and assignment rules
- Receive real-time push of inbound events via outbound webhooks
What you can't do (yet)
- Bulk import / export message history (Meta doesn't expose this)
- Edit messages after delivery on the customer's phone (Meta API limitation)
- Delete messages from the customer's view (intentionally not supported)
Authentication
All API calls require a Bearer token issued via POST /auth/login. The token encodes your userId; the org you're acting on is passed per-request via the x-org-id header. You must be a member of that org.
curl -X POST https://webhook.badala.app/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"[email protected]","password":"..."}'
# Response:
# { "token": "eyJ...", "user": { ... } }Base URL
The API is reachable at https://webhook.badala.app. The same hostname serves the Meta webhook endpoint. There's no separate api. subdomain.
Errors
Standard HTTP status codes. Validation errors come back with a message (string) and sometimes a details array. Upstream Meta failures are returned as 502 Bad Gateway — never propagated to you as 401 or 403.