Welcome to the TopCalls API
The TopCalls API is a RESTful API that lets you build AI-powered phone agents. Make calls, manage phone numbers, check available models and voices, and integrate with your systems via webhooks.RESTful Design
Standard HTTP methods and JSON responses. Works with any programming language.
Interactive
Try API endpoints directly in this documentation. See responses in real-time.
Webhooks
Real-time notifications for call events, tool calls, and campaign updates.
Well Documented
Detailed schemas, examples, and error responses for every endpoint.
Base URL
All API requests should be made to:Authentication
All API requests require authentication. Include your API key in theAuthorization header:
Get your API key from topcalls.ai. Sign in and create a new key in your account settings.
403 Forbidden, and the response names the scope that was missing.
A read scope never grants writes: a
calls:read key can list calls but cannot place one. The model and voice catalog endpoints (/v1/models, /v1/voices) require no scope — any valid key can read them.
API Versioning
The current API version is v1. All endpoints are prefixed with/v1:
Response Format
All responses are JSON. Success responses include the requested data:Quick Start
1. Make Your First Call
2. Check Call Status
3. List Calls
API Endpoints
Calls
Campaigns
Create, configure, and run campaigns from the API or the TopCalls dashboard:Phone Numbers
Leads
Lead Lists
Knowledge Bases
Webhooks
Configuration
Account
Webhooks
TopCalls sends webhooks to your server when calls finish. Setwebhook_url on a call for per-call delivery:
POST /v1/webhooks, including disposition-suffixed events like call.completed.booked_callback. See the Webhooks Guide for complete documentation.
Idempotency
Mutating endpoints accept an optionalIdempotency-Key header (8-255 characters, [A-Za-z0-9_-]). The gateway caches the response for 24 hours and returns the same response on retries with the same key. A key reused while the first request is still running returns 409.
Rate Limits
Two limits apply, both counted per account. Every API key on the same account shares them.- All endpoints: 120 requests per minute.
POST /v1/calls: also limited to your account’smax_calls_per_minutesetting (default 20) per minute.
429 Too Many Requests with a Retry-After header and a Problem+JSON body:
- Read the
Retry-Afterheader. Its value is the number of seconds to wait before trying again. - Wait that long, then send the same request again.
- If you keep getting
429, you are sending faster than your limit allows. Lower your request rate, or spread the work out over time. - In automated clients, check for status
429(or thecodefield equal toRATE_LIMITED) and back off: wait theRetry-Afterseconds on the first429, then double the wait on each repeat until the request succeeds.
POST /v1/calls requests, or contact us to raise your max_calls_per_minute.
Error Codes
SDKs & Libraries
Official SDKs coming soon. For now, use any HTTP client library:- JavaScript/TypeScript:
fetch,axios - Python:
requests - Ruby:
httparty - Go:
net/http - PHP:
guzzle
Support
- Documentation: Browse our guides and concepts
- Contact: Email us at hello@topcalls.ai
- Get Your Deployment Plan: Book a discovery call for a free consultation
Next Steps
Quickstart
Make your first call in 5 minutes.
Making Calls Guide
Learn how to make calls with the API.