https://api.bolna.ai and Bearer authentication.
Don’t have a key yet? Follow Generate an API key first, then come back here. Telephone calls consume wallet credits, so keep a test number handy.
Prerequisites
- A Bolna API key (
Authorization: Bearer <key>) - A recipient phone number in E.164 format, e.g.
+919876543210 curl, or Python 3, or Node 18+
Verify your API key
A quick read-only call confirms the key works and shows your wallet balance and concurrency limit before you spend any credits.A successful response returns your account details:
Get an agent ID
You need an
agent_id to make a call. Pick one path:- Use an existing agent (fastest)
- Create an agent via API
Create an agent once in the dashboard (Auto Build is quickest), open it, and copy the agent ID from the URL or the agent settings. Then:This is the most reliable way to finish the quickstart, because the full agent configuration is large.
Place the call
Pass your The response returns an Your phone should ring within a few seconds.
agent_id and the recipient’s number. Omit from_phone_number to use Bolna’s default number, or set it to one of your purchased numbers.execution_id you’ll use to track the call:Fetch the result
Poll the execution until it finishes. Bolna fires a
call-disconnected event the instant the line drops, then a final completed event a few seconds later once duration, cost, recording, and the AI call summary are finalized — so wait for completed (or a hard-failure status like no-answer, busy, failed) rather than stopping at call-disconnected, or you’ll read a half-populated payload with conversation_duration: 0. The completed execution includes the full transcript, recording URL, duration, cost breakdown, and extracted_data.Completed execution (truncated)
Alternative: receive results via webhook
Polling is fine for a quickstart, but in production you don’t want to hammer the API. Instead, give your agent awebhook_url and Bolna will POST the execution payload to your server as the call progresses — same JSON shape as Step 4.
Stand up a public endpoint
Your endpoint must be publicly reachable over HTTPS and return
200 quickly. For local testing, run a small receiver and expose it with a tunnel:Attach the webhook to your agent
Set Or set it in the dashboard under the Analytics Tab — “Push all execution data to webhook”.
webhook_url inside agent_config when creating (or updating) the agent. With the test harness:Bolna sends several POSTs per call as the status changes. Two land near the end:
call-disconnected fires the instant the line drops (with conversation_duration: 0, no recording, no summary), then completed arrives a few seconds later with the finalized duration, cost, recording_url, and extracted_data. Treat completed as “call is done” — along with hard-failure statuses (no-answer, busy, failed). The same URL may also receive in-progress / pre-call webhooks; tell them apart by status. See Webhooks.Run the whole flow as one script
The complete, dependency-free Python script runs all four steps end to end:--dry-run to print the exact request bodies without making any network calls.
Next steps
Personalize calls
Pass
user_data variables like {customer_name} into the call body.Call many people
Upload a CSV and run a batch campaign instead of single calls.
Receive results via webhook
Get the execution payload pushed to your server when a call ends.
Full agent schema
Every field you can set when creating an agent.

