Skip to content

Quickstart

This guide gets you from zero to a synced contact in your Whatbot inbox.

Every API key belongs to one workspace. It scopes every request to that workspace, so a key for Acme can only read and write Acme’s data. A workspace can hold several keys — one per tool or integration is a good habit.

An admin creates keys in Settings → API Keys (name it, then Create key). If you are not an admin, ask one for a key. It looks like this:

wa_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Every request carries the key in the X-API-Key header (Authorization: Bearer <key> works too):

Terminal window
X-API-Key: wa_live_xxxxxxxxxxxxxxxx

Contacts are the people you’ll message. Upsert one (or thousands) with a single call. The body is a JSON array.

Terminal window
curl -X POST https://api.whatbot.in/public/v1/contacts \
-H "X-API-Key: wa_live_xxx" \
-H "Content-Type: application/json" \
-d '[
{
"phone": "9876543210",
"name": "Ravi Kumar",
"tags": ["gold", "vip"],
"opt_in": true,
"attributes": { "city": "Chennai", "budget": "15L" }
}
]'

You’ll get back:

{ "upserted": 1, "received": 1 }