Welcome to the TopCalls API
A REST API for AI phone agents. Place calls, run campaigns, manage leads and phone numbers, and get each call’s result by webhook.RESTful Design
Standard HTTP methods and JSON. Works from any language.
Interactive
Send requests from these pages and see the live response.
Webhooks
A notification when each call finishes, with its transcript, summary and outcome.
Well Documented
Schemas, examples and error responses for every endpoint.
Base URL
Authentication
Every request needs your API key in theAuthorization header:
Sign in and create a key under Settings > Company, in the API keys section.
403, and detail names the missing scope. New keys don’t include calls:write, campaigns:write or the leads scopes unless you tick them.
A read scope never grants writes. The catalog endpoints (
/v1/models, /v1/voices, /v1/voices/builtin) need no scope.
API Versioning
The current version is v1, and every path starts with/v1:
Response Format
Responses are JSON. Creating a call returns:Quick Start
1. Make Your First Call
2. Check Call Status
3. List Calls
API Endpoints
Calls
Campaigns
Phone Numbers
Leads
Lead Lists
Knowledge Bases
Webhooks
Configuration
Account
Webhooks
TopCalls posts to your server when a call finishes. Setwebhook_url on a call for per-call delivery:
POST /v1/webhooks, including disposition events such as call.completed.booked_callback. Details are in the Webhooks Guide.
Idempotency
These endpoints accept an optionalIdempotency-Key header (8 to 255 characters from [A-Za-z0-9_-]): call create, stop and cancel; campaign create, update, start, pause, resume, stop and test; knowledge base create and update; phone number and carrier create; webhook subscription create and update. Other endpoints ignore it. Only a 2xx response is stored, for 24 hours, and a retry with the same key gets it back with the header Idempotent-Replay: true. Errors aren’t stored, so a retry after one runs again. The body isn’t compared: reuse a key with a different body and you still get the first response. A key reused while the first request is still running gets 409, and a malformed key gets 400.
Rate Limits
Three limits apply, all per account and shared by every key on it:- All endpoints: 120 requests per minute unless your account was raised. Every response carries
RateLimit-Limit,RateLimit-RemainingandRateLimit-Reset. Over it you get429withRetry-Afterand a plain-text body, not Problem+JSON. POST /v1/calls: your account’smax_calls_per_minute(default 20) over a fixed 60-second window. Going over returns429withRetry-After: 60andcode: RATE_LIMITED, shown below.- Concurrent calls: a call placed while every concurrent-call slot is in use gets
429withcode: concurrency_limitand noRetry-After. Place it again once a call in progress ends.
429 with Retry-After, wait that many seconds and send the same request again. If it keeps coming back, double the wait each time and slow down. Extra keys or servers on the same account don’t raise the ceiling. For steady volume, run a campaign instead of single POST /v1/calls requests, or contact us to raise a limit.
Error Codes
Destinations your account can call
Calls go to mobile, landline, VoIP and business numbers in the countries enabled for your account. Toll-free, pager, personal and high-cost numbers are refused, as are countries not enabled and numbers written with a trunk zero. A refusal returns422 with code: destination_not_allowed, places no call and holds no credit. A scheduled call is checked when you create it and again when it comes due. To enable a country, contact support.
SDKs & Libraries
There’s no official SDK yet. Any HTTP client works:fetch or axios, Python requests, Go net/http, PHP guzzle.
Support
- Documentation: guides and concepts
- Contact: hello@topcalls.ai
- Get Your Deployment Plan: book a free discovery call
Next Steps
Quickstart
Make your first call in 5 minutes.
Making Calls Guide
Learn how to make calls with the API.