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.
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
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/calls | List calls |
GET | /v1/calls/{call_id} | Get call details |
POST | /v1/calls | Create a new call |
POST | /v1/calls/{call_id}/stop | Stop an active call |
POST | /v1/calls/{call_id}/cancel | Cancel a queued call |
Campaigns
Campaigns are created and configured through the TopCalls dashboard. The API provides monitoring and control:| Method | Endpoint | Description |
|---|---|---|
GET | /v1/campaigns | List campaigns |
GET | /v1/campaigns/{campaign_id} | Get campaign details and stats |
POST | /v1/campaigns/{campaign_id}/start | Start a campaign |
POST | /v1/campaigns/{campaign_id}/pause | Pause a running campaign |
Phone Numbers
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/phone-numbers/carriers | List carriers |
GET | /v1/phone-numbers | List phone numbers |
GET | /v1/phone-numbers/{phone_number_id} | Get phone number details |
POST | /v1/phone-numbers/carriers | Add custom carrier (BYOC) |
POST | /v1/phone-numbers | Add phone number |
DELETE | /v1/phone-numbers/carriers/{carrier_id} | Delete custom carrier |
DELETE | /v1/phone-numbers/{phone_number_id} | Delete phone number |
Configuration
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/models | List available AI models |
GET | /v1/voices/builtin | List built-in voices (with filters) |
GET | /v1/voices | List voices for your account (including custom/cloned) |
Account
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/balance | Get account balance and usage |
Webhooks
TopCalls sends webhooks to your server when events occur. Configure webhooks when creating calls:Error Codes
| Status Code | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request - Invalid input |
401 | Unauthorized - Invalid or missing API key |
402 | Payment Required - Insufficient quota |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn’t exist |
429 | Too Many Requests |
500 | Internal Server Error |
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.