API Reference
Complete API documentation for integrating Hanc.AI into your applications. Manage agents, fetch call data, place calls, and operate every part of the platform programmatically.
Quick overview
| Base URL | https://api.hanc.ai |
| Authentication | API Key via x-api-key header |
| Format | JSON |
Generate an API key from Integration → API Keys in the dashboard. You can have up to 3 keys per user — see the API Keys section in Integrations for setup, permissions, and security guidance.
curl -X GET "https://api.hanc.ai/v1/agent/list" \
-H "x-api-key: YOUR_API_KEY"
Available endpoints
Calls
| Action | Method | Endpoint |
|---|---|---|
| List calls | GET | /v1/call/list |
| Call details (transcript, sentiment, summary) | GET | /v1/call/:id |
| General analytics (metrics by date/agent) | GET | /v1/call/general-metrics |
| Daily analytics | GET | /v1/call/daily-metrics |
| Sentiment statistics | GET | /v1/call/sentiment-stats |
| Cost breakdown | GET | /v1/call/costs-breakdown |
| Export calls (CSV) | GET | /v1/call/list/export |
| Export costs (CSV) | GET | /v1/call/costs-breakdown/export |
| Make a phone call | POST | /v1/call/make-phone-call |
| Make a web call | POST | /v1/call/make-web-call |
Agents
| Action | Method | Endpoint |
|---|---|---|
| List agents | GET | /v1/agent/list |
| Agent details | GET | /v1/agent/:id |
| Create agent | POST | /v1/agent |
| Update agent | PATCH | /v1/agent/:id |
| Delete agent | DELETE | /v1/agent/:id |
| Agent call statistics | GET | /v1/agent/:id/call-stats |
| List agent templates | GET | /v1/agent/agent_template/list |
Agent Actions:
| Action | Method | Endpoint |
|---|---|---|
| List actions | GET | /v1/agent/:id/actions |
| Add action | POST | /v1/agent/:id/actions |
| Update action | PATCH | /v1/agent/:id/actions/:actionId |
| Delete action | DELETE | /v1/agent/:id/actions/:actionId |
Agent Tools:
| Action | Method | Endpoint |
|---|---|---|
| List tools | GET | /v1/agent/:id/tools |
| Add tool | POST | /v1/agent/:id/tools |
| Update tool | PATCH | /v1/agent/:id/tools/:toolId |
| Delete tool | DELETE | /v1/agent/:id/tools/:toolId |
Knowledge Base
| Action | Method | Endpoint |
|---|---|---|
| List knowledge bases | GET | /v1/knowledge-base/list |
| Create knowledge base | POST | /v1/knowledge-base |
| Upload file(s) | POST | /v1/knowledge-base/:id/file(s) |
| Delete file | DELETE | /v1/knowledge-base/:id/file |
| Assign agents | PUT | /v1/knowledge-base/:id/agents |
Phone Numbers
| Action | Method | Endpoint |
|---|---|---|
| List numbers | GET | /v1/phone-number/list |
| Available numbers (by country) | GET | /v1/phone-number/available |
| Buy a number | POST | /v1/phone-number/buy |
| Import number | POST | /v1/phone-number/import |
| Connect to SIP | PATCH | /v1/phone-number/connect-to-sip |
Voices
| Action | Method | Endpoint |
|---|---|---|
| List voices | GET | /v1/voice/list |
Filter by language: GET /v1/voice/list?language=de
Subscription
| Action | Method | Endpoint |
|---|---|---|
| Subscription details | GET | /v1/subscription |
| Configure auto top-up | PATCH | /v1/subscription/auto-top-up |
| Set top-up amount | PATCH | /v1/subscription/top-up-amount |
Customers
| Action | Method | Endpoint |
|---|---|---|
| List customers | GET | /v1/customer/list |
| Customer details | GET | /v1/customer/:id |
| Create customer | POST | /v1/customer |
| Update customer | PATCH | /v1/customer/:id |
| Delete customer | DELETE | /v1/customer/:id |
Workspaces
| Action | Method | Endpoint |
|---|---|---|
| Workspace operations | GET/POST/PATCH/DELETE | /v1/workspaces/* |
| Invite member | POST | /v1/workspaces/:id/invite-member |
| Remove member | DELETE | /v1/workspaces/:id/invite-member |
What's not available via API
Some operations are only available through the dashboard:
| Feature | Reason |
|---|---|
| API key management | Security — keys can't create other keys |
| Phone number setup | Requires interactive setup |
| Google Calendar integration | Requires interactive authorization |
| Billing & payments | Managed through the dashboard |
Need help?
Contact our support team at support@hanc.ai for API-related questions.