Skip to content

Quickstart

Keys are created from the dashboard (Settings → API, integrations permission required). A key looks like ws_live_ followed by 40 characters. It’s shown only once at creation: copy it immediately.

Terminal window
curl https://app.whatsetter.com/api/v1/me \
-H "Authorization: Bearer ws_live_YOUR_KEY"
{
"data": {
"team_id": "",
"key": { "name": "My CRM", "scopes": ["leads:read", ""] }
}
}
Terminal window
curl "https://app.whatsetter.com/api/v1/leads?status=qualified&limit=10" \
-H "Authorization: Bearer ws_live_YOUR_KEY"

First contact always goes through a list + campaign (anti-ban protection):

Terminal window
curl -X POST "https://app.whatsetter.com/api/v1/lists/LIST_ID/leads" \
-H "Authorization: Bearer ws_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"leads":[{"phone":"+33612345678","name":"Marie","custom_variables":{"city":"Lyon"}}]}'

5. Send a message (already-contacted lead)

Section titled “5. Send a message (already-contacted lead)”
Terminal window
curl -X POST "https://app.whatsetter.com/api/v1/messages" \
-H "Authorization: Bearer ws_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: cmd-12345" \
-d '{"lead_id":"LEAD_ID","text":"Are we still on for tomorrow 2pm?"}'

The response takes a few seconds: the engine replays the human choreography (read → typing → send). The Idempotency-Key header guarantees a retry will never send the message twice.