Skip to main content

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 URLhttps://api.hanc.ai
AuthenticationAPI Key via x-api-key header
FormatJSON

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

ActionMethodEndpoint
List callsGET/v1/call/list
Call details (transcript, sentiment, summary)GET/v1/call/:id
General analytics (metrics by date/agent)GET/v1/call/general-metrics
Daily analyticsGET/v1/call/daily-metrics
Sentiment statisticsGET/v1/call/sentiment-stats
Cost breakdownGET/v1/call/costs-breakdown
Export calls (CSV)GET/v1/call/list/export
Export costs (CSV)GET/v1/call/costs-breakdown/export
Make a phone callPOST/v1/call/make-phone-call
Make a web callPOST/v1/call/make-web-call

Agents

ActionMethodEndpoint
List agentsGET/v1/agent/list
Agent detailsGET/v1/agent/:id
Create agentPOST/v1/agent
Update agentPATCH/v1/agent/:id
Delete agentDELETE/v1/agent/:id
Agent call statisticsGET/v1/agent/:id/call-stats
List agent templatesGET/v1/agent/agent_template/list

Agent Actions:

ActionMethodEndpoint
List actionsGET/v1/agent/:id/actions
Add actionPOST/v1/agent/:id/actions
Update actionPATCH/v1/agent/:id/actions/:actionId
Delete actionDELETE/v1/agent/:id/actions/:actionId

Agent Tools:

ActionMethodEndpoint
List toolsGET/v1/agent/:id/tools
Add toolPOST/v1/agent/:id/tools
Update toolPATCH/v1/agent/:id/tools/:toolId
Delete toolDELETE/v1/agent/:id/tools/:toolId

Knowledge Base

ActionMethodEndpoint
List knowledge basesGET/v1/knowledge-base/list
Create knowledge basePOST/v1/knowledge-base
Upload file(s)POST/v1/knowledge-base/:id/file(s)
Delete fileDELETE/v1/knowledge-base/:id/file
Assign agentsPUT/v1/knowledge-base/:id/agents

Phone Numbers

ActionMethodEndpoint
List numbersGET/v1/phone-number/list
Available numbers (by country)GET/v1/phone-number/available
Buy a numberPOST/v1/phone-number/buy
Import numberPOST/v1/phone-number/import
Connect to SIPPATCH/v1/phone-number/connect-to-sip

Voices

ActionMethodEndpoint
List voicesGET/v1/voice/list

Filter by language: GET /v1/voice/list?language=de

Subscription

ActionMethodEndpoint
Subscription detailsGET/v1/subscription
Configure auto top-upPATCH/v1/subscription/auto-top-up
Set top-up amountPATCH/v1/subscription/top-up-amount

Customers

ActionMethodEndpoint
List customersGET/v1/customer/list
Customer detailsGET/v1/customer/:id
Create customerPOST/v1/customer
Update customerPATCH/v1/customer/:id
Delete customerDELETE/v1/customer/:id

Workspaces

ActionMethodEndpoint
Workspace operationsGET/POST/PATCH/DELETE/v1/workspaces/*
Invite memberPOST/v1/workspaces/:id/invite-member
Remove memberDELETE/v1/workspaces/:id/invite-member

What's not available via API

Some operations are only available through the dashboard:

FeatureReason
API key managementSecurity — keys can't create other keys
Phone number setupRequires interactive setup
Google Calendar integrationRequires interactive authorization
Billing & paymentsManaged through the dashboard

Need help?

Contact our support team at support@hanc.ai for API-related questions.