Skip to main content
By the end of this page an agent you created from code will phone you, and your server will get a signed call.ended event when you hang up.
Every step has Node SDK and Python SDK tabs. The SDKs aren’t published to npm and PyPI yet; until they are, use the curl, fetch or httpx tabs. See SDKs.
You need: a Kallabot workspace with at least one phone number that can call out (get a number), and a mobile phone to answer.
1

Create an API key

In the app, open Settings → For developers → API keys and click New key.
  • Name: something you’ll recognise, like Quickstart.
  • Access: choose Full access for this walkthrough. For production, pick the narrowest preset (see scopes).
  • Lifetime: 30 days is fine for a test.
Copy the key now. It starts with kb_live_ and is shown once. Then export it:
Keep the key on your server. Never put it in a browser, a mobile app or a public repo.
2

Create an agent

An agent is a JSON config. The smallest valid one is just a prompt; every other field has a sensible default.Creates need an Idempotency-Key header. Any unique string works; a UUID is ideal. If the network drops and you retry with the same key, you get the same agent back instead of two.
The response is 201 Created with the full agent. The parts you need next:
Response (abridged)
can_call is false because a new agent is a draft. Callers only ever hear a published version.
3

Publish it

Publishing makes the draft live. Send the revision you just read in If-Match, so you never publish over someone else’s edit.
4

Get ready for the webhook

Before you place the call, tell Kallabot where to send events. Your URL must be public HTTPS on port 443. For local testing, a tunnel such as ngrok http 3000 works.
Save the secret (it starts with whsec_). It’s only returned when the endpoint is created or its secret is rotated. Then run a receiver that checks the signature:
5

Place a call

Phone numbers are always in E.164 format: a plus sign, the country code and the number, no spaces. Calls are created with 202 Accepted: the call exists, and dialling starts right after.
Your phone rings from your workspace’s number. Talk to the agent, then hang up.
6

Receive the webhook

Within a second of hanging up, your server prints call.ended. A little later, once the summary is written, it prints call.analyzed.
call.ended
Then fetch the full call, with the transcript, using the call_id:

Where to go next

Configure agents

Voice, languages, turn-taking, tools, knowledge and transfers.

Calls in depth

Lifecycle, cancel, schedule, transcripts, recordings and live control.

Webhook events

Every event and its payload.

Handle errors

Every error code and when to retry.