Developer Hub
Everything you need to integrate AllBots voice agents into your application.
Quick Start
Go from zero to a working voice agent in three steps.
Install the SDK
Pick your language and install the official client library.
npm install @allbots/sdk
Authenticate
Create an API key in your dashboard and initialize the client.
import AllBots from '@allbots/sdk';
const client = new AllBots({
apiKey: process.env.ALLBOTS_API_KEY,
});Make your first call
Create an agent and place an outbound call in a few lines of code.
const agent = await client.agents.create({
name: 'Appointment Scheduler',
industry: 'healthcare',
greeting: 'Hi, I\'m calling from Acme Clinic.',
});
const call = await client.calls.create({
agent_id: agent.id,
to: '+18015554321',
});
console.log('Call status:', call.status);Official SDKs
JavaScript / TS
npm install @allbots/sdkFull TypeScript definitions included. Works in Node.js 18+ and modern browsers.
Python
pip install allbotsAsync support with asyncio. Compatible with Python 3.9+ and type-annotated.
Node.js
npm install @allbots/nodeServer-side optimized with built-in retry logic and streaming support.
Webhooks
Receive real-time notifications when events occur. Configure webhook URLs in your dashboard under Settings > Webhooks. All payloads include an X-AllBots-Signature header for verification.
Event Types
| Event | Description |
|---|---|
| call.started | Fired when an inbound or outbound call begins |
| call.completed | Fired when a call ends, includes duration and outcome |
| call.failed | Fired when a call fails to connect or errors out |
| call.transferred | Fired when the AI agent transfers to a live operator |
| appointment.booked | Fired when the agent books a calendar appointment |
| lead.captured | Fired when the agent captures a new lead from a call |
Payload Example
{
"event": "call.completed",
"timestamp": "2026-03-24T14:42:00Z",
"data": {
"call_id": "call_3nq7v2x8p0",
"agent_id": "agt_8xk2m9f4j1",
"direction": "outbound",
"to": "+18015554321",
"from": "+18015559876",
"status": "completed",
"duration": 142,
"outcome": "appointment_booked",
"recording_url": "https://api.allbots.io/v1/calls/call_3nq7v2x8p0/recording",
"transcript_url": "https://api.allbots.io/v1/calls/call_3nq7v2x8p0/transcript",
"metadata": {
"patient_name": "Jane Doe",
"appointment_type": "follow-up"
}
}
}Code Samples
Create a Voice Agent
import AllBots from '@allbots/sdk';
const client = new AllBots({
apiKey: process.env.ALLBOTS_API_KEY,
});
const agent = await client.agents.create({
name: 'Sales Qualifier',
industry: 'real-estate',
voice: 'alloy',
greeting: 'Hi, thanks for your interest in the property.',
instructions: 'Qualify leads by asking about budget, timeline, and preferred locations.',
});
console.log('Agent created:', agent.id);import allbots
import os
client = allbots.Client(
api_key=os.environ["ALLBOTS_API_KEY"]
)
agent = client.agents.create(
name="Sales Qualifier",
industry="real-estate",
voice="alloy",
greeting="Hi, thanks for your interest in the property.",
instructions="Qualify leads by asking about budget, timeline, and preferred locations.",
)
print(f"Agent created: {agent.id}")Start an Outbound Call
const call = await client.calls.create({
agent_id: 'agt_8xk2m9f4j1',
to: '+18015554321',
metadata: {
lead_source: 'website',
property_id: 'prop_42',
},
});
console.log('Call initiated:', call.id);
console.log('Status:', call.status);call = client.calls.create(
agent_id="agt_8xk2m9f4j1",
to="+18015554321",
metadata={
"lead_source": "website",
"property_id": "prop_42",
},
)
print(f"Call initiated: {call.id}")
print(f"Status: {call.status}")Full API Reference
Explore every endpoint, parameter, and response schema in the complete API documentation.
View API Docs