/v1 API you see in the API Reference, but gives you a typed, async-native interface for managing numbers, creating calls, polling for results, and handling errors.
Install
Authenticate
The SDK reads your API key fromCALLINGBOX_API_KEY by default:
Custom API base URL
The SDK useshttps://api.callingbox.io by default. If your organization uses a private CallingBox deployment, set the base URL via the environment and optional client options:
Manage phone numbers
Numbers are the connection between agents and the outside world. The TypeScript SDK exposes the same public number APIs as the dashboard.List your numbers
Search for available numbers
Purchase a number
Create an outbound agent
Agents are where persona, instructions, voice, language, returns schema, tools, and caller IDs live. Create one once, then dispatch calls against it.Dispatch a call
Once you have an outbound agent with an attached number,calls.create(...) needs only agentId and to. Everything else is optional per-call overrides.
Choose a specific caller ID
fromNumber to the API as from_number. The value must already be attached to the agent; otherwise the API returns 400.
Replace instructions for a single call
Per-callinstructions wholly replace the agent’s default for this one execution. Persona, voice, and tools stay the same.
Poll for completion
Call creation is immediate, but the conversation and result extraction happen asynchronously. Poll the call until it reaches a terminal status:completedno_answerbusycanceledfailed
List and retrieve calls
Fetch the transcript
The transcript is stored separately from the call object. Fetch it on demand:Error handling
The SDK throws typed exceptions based on the API response:Webhooks
Manage endpoints and verify signatures withclient.webhooks and the
static Webhooks.constructEvent:
Next steps
SDK overview
Compare the Python SDK, TypeScript SDK, CLI, and raw HTTP.
API basics
See the underlying
/v1 endpoints the SDK wraps.Call object
Understand every field returned by
create, list, and get.Delivery
Polling vs webhooks for receiving results.