Skip to content

Quickstart

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

Every tenant (workspace) has its own API key. It scopes every request to that one workspace, so a key for Acme can only read and write Acme’s data.

Ask your Whatbot admin for a key, or generate one in Settings → API keys. It looks like this:

wa_live_5b14e3379b56d72420dfc86659b74b0b5752c8a7201c63b3

Every request carries the key in the X-API-Key header:

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 }