Download OpenAPI specification:
The Fonella REST API lets you programmatically manage your AI phone assistant. Create API keys, subscribe to real-time call webhooks, build custom tools that the AI can invoke during live calls, and access call logs with transcripts and summaries.
All endpoints require a Bearer token in the Authorization header:
Authorization: Bearer fon_live_...
API keys are created in the Fonella Dashboard under Developers → API Keys, or
via the POST /v1/me/api-keys endpoint (requires an existing JWT or API key session).
Creates a new API key for the authenticated user. The full plaintext token is returned only once in the response — store it securely. A maximum of 10 keys per account is enforced.
| name required | string A descriptive name for the key (e.g. "CRM Integration"). |
| scopes | Array of strings Items Enum: "webhooks:manage" "calls:read" "tools:manage" Permission scopes. Defaults to all scopes if omitted. |
| expiresAt | string <date-time> Optional expiration timestamp. The key becomes invalid after this date. |
{- "name": "CRM Integration",
- "scopes": [
- "calls:read",
- "webhooks:manage"
]
}{- "success": true,
- "apiKey": {
- "keyId": "468bcefd-6536-4844-8249-aff3ecb2ef7b",
- "name": "string",
- "prefix": "fon_live_a1b2c3d4",
- "scopes": [
- "string"
], - "lastUsedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "token": "fon_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4"
}
}Returns all API keys for the authenticated user. The full token is never returned — only the first 16 characters (prefix).
{- "success": true,
- "apiKeys": [
- {
- "keyId": "468bcefd-6536-4844-8249-aff3ecb2ef7b",
- "name": "string",
- "prefix": "fon_live_a1b2c3d4",
- "scopes": [
- "string"
], - "lastUsedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z"
}
]
}Registers a new webhook subscription. Fonella will send HTTP POST requests
to the specified URL when any of the subscribed events occur. The url must
use HTTPS. A signing secret is generated and returned for HMAC-SHA-256
signature verification. Maximum 10 webhooks per account.
| url required | string <uri> The HTTPS URL to receive webhook deliveries. |
| events required | Array of strings (WebhookEventType) non-empty Items Enum: "call.started" "call.ended" "call.failed" "call.transcript" "call.speech_update" "call.tool_call" "call.hang" "call.summary" List of event types to subscribe to. |
| description | string Optional human-readable description. |
{- "events": [
- "call.started",
- "call.ended",
- "call.summary"
], - "description": "Main CRM integration"
}{- "success": true,
- "webhook": {
- "webhookId": "ed71eef4-4c34-46dc-81fe-954e560454fd",
- "events": [
- "call.started"
], - "secret": "string",
- "enabled": true,
- "description": "string",
- "failureCount": 0,
- "lastDeliveredAt": "2019-08-24T14:15:22Z",
- "lastFailedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
}Returns all webhook subscriptions for the authenticated user.
{- "success": true,
- "webhooks": [
- {
- "webhookId": "ed71eef4-4c34-46dc-81fe-954e560454fd",
- "events": [
- "call.started"
], - "secret": "string",
- "enabled": true,
- "description": "string",
- "failureCount": 0,
- "lastDeliveredAt": "2019-08-24T14:15:22Z",
- "lastFailedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
]
}Updates an existing webhook subscription. Only the provided fields are changed. Re-enabling a webhook resets the failure counter to 0.
| webhookId required | string <uuid> The unique identifier of the webhook subscription. |
| url | string <uri> |
| events | Array of strings (WebhookEventType) non-empty Items Enum: "call.started" "call.ended" "call.failed" "call.transcript" "call.speech_update" "call.tool_call" "call.hang" "call.summary" |
| description | string |
| enabled | boolean Set to |
{- "events": [
- "call.started",
- "call.ended",
- "call.failed",
- "call.summary"
], - "enabled": true
}{- "success": true,
- "webhook": {
- "webhookId": "ed71eef4-4c34-46dc-81fe-954e560454fd",
- "events": [
- "call.started"
], - "secret": "string",
- "enabled": true,
- "description": "string",
- "failureCount": 0,
- "lastDeliveredAt": "2019-08-24T14:15:22Z",
- "lastFailedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
}Registers a new custom tool. During live phone calls, the AI assistant can
invoke this tool by calling the specified HTTPS endpoint with the parameters
defined in inputSchema. The endpoint must respond within 5 seconds with a
JSON body containing a result string. Maximum 20 tools per account.
| name required | string Machine-readable tool name (camelCase, no spaces). |
| description required | string Human-readable description telling the AI when to use this tool. |
| url required | string <uri> HTTPS endpoint called when the tool is invoked. |
| method | string Default: "POST" Enum: "GET" "POST" HTTP method for tool invocation. |
object Additional HTTP headers sent with each tool request. | |
| inputSchema | object JSON Schema describing the input parameters the AI should extract from the conversation. |
{- "name": "lookupOrder",
- "description": "Look up the status of a customer order by order number",
- "method": "POST",
- "inputSchema": {
- "type": "object",
- "properties": {
- "orderNumber": {
- "type": "string",
- "description": "The customer order number"
}
}, - "required": [
- "orderNumber"
]
}
}{- "success": true,
- "tool": {
- "toolId": "4ff05811-a7af-43b0-84ca-ea7fa7a23c07",
- "name": "string",
- "description": "string",
- "method": "GET",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "inputSchema": { },
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z"
}
}Returns all custom tools registered by the authenticated user.
{- "success": true,
- "tools": [
- {
- "toolId": "4ff05811-a7af-43b0-84ca-ea7fa7a23c07",
- "name": "string",
- "description": "string",
- "method": "GET",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "inputSchema": { },
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z"
}
]
}Updates an existing custom tool. Only the provided fields are changed.
| toolId required | string <uuid> The unique identifier of the custom tool. |
| name | string |
| description | string |
| url | string <uri> |
| method | string Enum: "GET" "POST" |
object | |
| inputSchema | object |
| enabled | boolean |
{- "description": "Updated description",
}{- "success": true,
- "tool": {
- "toolId": "4ff05811-a7af-43b0-84ca-ea7fa7a23c07",
- "name": "string",
- "description": "string",
- "method": "GET",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "inputSchema": { },
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z"
}
}Permanently deletes a custom tool. The AI will no longer be able to invoke it during calls.
| toolId required | string <uuid> The unique identifier of the custom tool. |
{- "success": true
}Returns a paginated list of calls for the authenticated user, ordered by start time (newest first).
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of calls to return. |
| startAfter | string Pagination cursor — the |
{- "success": true,
- "calls": [
- {
- "id": "string",
- "type": "inboundPhoneCall",
- "status": "ended",
- "startedAt": "2019-08-24T14:15:22Z",
- "endedAt": "2019-08-24T14:15:22Z",
- "duration": 0,
- "durationFormatted": "2:15",
- "customerPhone": "+4915112345678",
- "calledPhoneNumber": "+4915792816700",
- "summary": "string",
- "transcript": "string",
- "transcriptMessages": [
- {
- "role": "user",
- "text": "string"
}
], - "endedReason": "customer-ended"
}
]
}Returns detailed information about a specific call, including transcript messages and summary.
| callId required | string The unique identifier of the call. |
{- "success": true,
- "call": {
- "id": "string",
- "type": "inboundPhoneCall",
- "status": "ended",
- "startedAt": "2019-08-24T14:15:22Z",
- "endedAt": "2019-08-24T14:15:22Z",
- "duration": 0,
- "durationFormatted": "2:15",
- "customerPhone": "+4915112345678",
- "calledPhoneNumber": "+4915792816700",
- "summary": "string",
- "transcript": "string",
- "transcriptMessages": [
- {
- "role": "user",
- "text": "string"
}
], - "endedReason": "customer-ended"
}
}