/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
If you’re using the published package:npm link.
Authenticate
The SDK reads your API key fromCALLINGBOX_API_KEY by default:
Run against a local backend
For local development, point the SDK at your local backend instead of production:Manage phone numbers
Every outbound call needs a caller ID. The TypeScript SDK exposes the same public number APIs as the dashboard.List your numbers
Search for available numbers
Purchase a number
Create a call
Once your org has at least one active phone number, you can create outbound calls:Choose a specific caller ID
from_number. The value must be an active number owned by your organization.
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
Error handling
The SDK throws typed exceptions based on the API response:Full runnable example
For a complete example that:- checks whether your org already has a number
- purchases one if needed
- places a call
- polls until the call finishes
- prints the result
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.