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.

1

Install the SDK

Pick your language and install the official client library.

bash
npm install @allbots/sdk
2

Authenticate

Create an API key in your dashboard and initialize the client.

TypeScript
import AllBots from '@allbots/sdk';

const client = new AllBots({
  apiKey: process.env.ALLBOTS_API_KEY,
});
3

Make your first call

Create an agent and place an outbound call in a few lines of code.

TypeScript
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/sdk

Full TypeScript definitions included. Works in Node.js 18+ and modern browsers.

Python

pip install allbots

Async support with asyncio. Compatible with Python 3.9+ and type-annotated.

Node.js

npm install @allbots/node

Server-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

EventDescription
call.startedFired when an inbound or outbound call begins
call.completedFired when a call ends, includes duration and outcome
call.failedFired when a call fails to connect or errors out
call.transferredFired when the AI agent transfers to a live operator
appointment.bookedFired when the agent books a calendar appointment
lead.capturedFired when the agent captures a new lead from a call

Payload Example

call.completed
{
  "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

JavaScript
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);
Python
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

JavaScript
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);
Python
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