Create an Assistant
Use this endpoint to create a voice AI assistant from your own product, CRM, onboarding flow, or admin tools.
The assistant record holds model settings, voice, speech recognition, tools, webhooks, and telephony configuration.
- Create production assistants without opening the dashboard.
- Preload prompts, welcome messages, transfer rules, and provider settings.
- Return the assistant ID for later updates, phone-number assignment, and call routing.
How this endpoint maps to the product
The JSON body mirrors the assistant creation form in the Burki dashboard. The same groups appear in the API: basic info, LLM, TTS, STT, calling behavior, tools, knowledge, post-call actions, safety, and telephony.
A successful request creates the assistant in your organization and returns the full record, including the assistant ID for updates, phone-number assignment, and routing.
Request body
The request body is a JSON object with the assistant's configuration. Fields follow the same groups as the dashboard. Many fields are conditional on the provider or options you pick.
* `name` (string, **required**): A unique name for your assistant.
* `description` (string, optional): A brief description of the assistant's purpose.
* `is_active` (boolean, optional): Set to `true` to allow the assistant to handle calls. Defaults to `true`.
This section covers the core AI models for language, speech-to-text, and text-to-speech.
**LLM (Language Model)**
* `llm_provider` (string): The language model provider.
* **Enum**: `"openai"`, `"azure"`, `"azure_ai_foundry"`, `"anthropic"`, `"gemini"`, `"groq"`, `"xai"`, `"custom"`, `"custom_websocket"`. Defaults to `openai`.
* `llm_provider_config` (object): Provider-specific configuration.
* `api_key` (string, **required**): The API key for the selected provider.
* `model` (string, optional): The specific model to use (e.g., `gpt-4o-mini`).
* `base_url` (string, optional): A custom or Azure-compatible API base URL.
* `custom_config.ws_url` (string, optional): WebSocket URL for `custom_websocket`.
* `custom_config.fallback_base_url` (string, optional): HTTP fallback URL for `custom_websocket`.
* `custom_config.api_version` (string, optional): Azure OpenAI API version when using Azure deployments.
* `llm_settings` (object): General parameters for the language model.
* `temperature` (number): Controls creativity. Defaults to `0.7`.
* `max_tokens` (integer): Max length of the AI's response in tokens. Defaults to `1000`.
* `top_p` (number): Nucleus sampling control. Defaults to `1.0`.
* `system_prompt` (string): The AI's personality and instructions.
* `welcome_message` (string): The first thing the assistant says to the caller.
* `llm_fallback_providers` (object, optional): Configure backup LLM providers.
* `enabled` (boolean): Set to `true` to enable fallbacks.
* `fallbacks` (array of objects): An ordered list of fallback providers. Each object contains `provider`, `model`, `api_key`, and `base_url`.
**TTS (Text-to-Speech)**
* `tts_settings` (object):
* `provider` (string): The TTS provider. **Enum**: `"elevenlabs"`, `"deepgram"`, `"azure"`, `"cartesia"`, `"inworld"`, `"openai"`, `"murf"`, `"soniox"`, `"uplift"`.
* `voice_id` (string): The specific voice character to use (e.g., `rachel`).
* `model_id` (string, optional): The voice model (e.g., `eleven_flash_v2_5`).
* **Conditional Fields**:
* If `provider` is `elevenlabs`:
* `stability` (number): Voice consistency.
* `similarity_boost` (number): Voice accuracy.
* `style` (number): Speaking style variation.
* `use_speaker_boost` (boolean): Enhances audio quality.
* If `provider` is `resemble`:
* `provider_config.project_uuid` (string): Your Resemble AI project UUID.
* If `provider` is `inworld`:
* `provider_config.language` (string): Language code (e.g., `en`).
* `background_audio` / provider-specific background sound settings may be supplied for assistants that use ambient audio.
**STT (Speech-to-Text)**
* `stt_settings` (object):
* `provider` (string, optional): STT provider. Supported dashboard providers include `deepgram`, `azure`, `uplift`, `elevenlabs`, `speechmatics`, `soniox`, and `telnyx`.
* `model` (string): The STT model (e.g., `nova-2`, `nova-3`).
* `language` (string): Language code (e.g., `en-US`).
* `punctuate`, `smart_format`, `interim_results`, `audio_denoising` (boolean, optional): Transcript formatting and audio cleanup controls.
* `endpointing.silence_threshold`, `utterance_end_ms`, `utterance_timeout_seconds` (optional): Turn-detection controls for providers that consume them.
* `keywords` (array of objects, optional): An array of keywords to boost. Each object should have a `keyword` (string) and an optional `intensifier` (float). For `nova-2` and older models.
* `keyterms` (array of strings, optional): An array of key terms to boost. For `nova-3` model only.
* `speculative_config` (object, optional): Speculative LLM settings for lower latency on partial transcripts.
* `enable_speculative_llm` (boolean): Start the LLM before final STT arrives.
* `speculative_stream_to_tts` (boolean): Stream speculative output immediately to TTS.
* `speculative_debounce_ms` (integer): Delay after the latest partial before speculation.
* `speculative_min_words` (integer): Minimum words before triggering speculation.
* `speculative_similarity_threshold` (number): Confirmation threshold between partial and final transcript.
* `interruption_settings` (object):
* `interruption_mode` (string, optional): `"aggressive"`, `"balanced"`, or `"conservative"`.
* `interruption_threshold` (integer): Number of words a user must speak to interrupt.
* `min_speaking_time` (number): How long the assistant must speak before being interruptible (in seconds).
* `interruption_cooldown` (number): Cooldown period after an interruption (in seconds).
* `min_confidence`, `tentative_window_ms`, `backchannel_filter`, `tail_protection_ms` (optional): Advanced interruption controls.
* `backchannel_settings` (object, optional): Active listening cues such as "uh-huh".
* `enabled` (boolean): Enable backchannels.
* `frequency` (integer): Backchannel frequency from rare to aggressive.
* `conversation_continuity_enabled` (boolean, optional): Continue context for repeat calls from the same number within the continuity window.
* `idle_message` (string, optional): Message sent when the caller is silent.
* `max_idle_messages` (integer, optional): How many idle messages to send before ending the call.
* `idle_timeout` (integer, optional): Seconds of silence before sending an idle message.
* `max_call_length` (integer or null, optional): Maximum call duration in seconds. Omit or set null for no assistant-level cap.
* `tools_settings` (object): Configure built-in tools.
* `end_call` (object, optional):
* `enabled` (boolean): Enable/disable the tool.
* `scenarios` (array of strings): Phrases that will trigger ending the call.
* `transfer_call` (object, optional):
* `enabled` (boolean): Enable/disable the tool.
* `scenarios` (array of strings): Phrases that will trigger a transfer.
* `transfer_numbers` (array of strings): Phone numbers where calls can be transferred.
* `transfer_type` (string): `"cold"` for blind transfer or `"warm"` for an agent-briefed handoff.
* `agent_confirmation` (boolean): For warm transfer, require the agent to confirm before connection.
* `unavailable_message` (string, optional): Message for failed/unavailable warm transfer.
* `dtmf_solver` (object, optional): Enable IVR/touch-tone navigation and provide scenarios.
* `send_sms` (object, optional): Enable SMS sending, provide scenarios, and optionally set `default_message`.
* `custom_tools` (array, optional): Assigned organization tools with `tool_id`, `enabled`, `timeout_seconds`, and optional custom configuration.
* `rag_settings` (object, optional): Enable the assistant knowledge base and tune retrieval.
* `enabled` (boolean): Enable retrieval-augmented answers from uploaded documents.
* `search_limit` (integer): Max documents/chunks to retrieve.
* `similarity_threshold` (number): Minimum relevance score.
* `recording_settings` (object, optional): Recording and disclosure controls.
* `enabled` (boolean): Store call audio.
* `record_user_only_track` (boolean or null, optional): Store a caller-only track. Omit/null to use organization default.
* `disclosure_enabled`, `disclosure_message`, `disclosure_mode`: Caller recording disclosure controls.
* `bypass_numbers` (array of strings, optional): E.164 numbers that skip the AI and route directly to transfer.
* Spam detection scenarios and thresholds are managed through the assistant spam detection endpoints and dashboard Safety section.
* `custom_settings` (object, optional): For advanced data extraction.
* `structured_data_prompt` (string): Custom instructions for the AI on how to extract data.
* `structured_data_schema` (object): A JSON schema defining the data to be extracted.
* `twilio_config` (object, optional): Bring your own Twilio credentials.
* `account_sid` (string): Your Twilio Account SID.
* `auth_token` (string): Your Twilio Auth Token.
* `telnyx_config` (object, optional): Bring your own Telnyx credentials.
* `api_key` (string): Your Telnyx API Key.
* `connection_id` (string): Your Telnyx Connection ID for Call Control Application.
* `webhook_url` (string, optional): A URL to send call event webhooks to.
* `sms_webhook_url` (string, optional): A URL to send SMS event webhooks to.
* `messaging_service_sid` (string, optional): Twilio Messaging Service SID for SMS handling.
**Telephony Provider Selection:**
* If multiple provider configs are provided, the system will use the one associated with assigned phone numbers.
* If no provider config is provided, the system uses your organization's default telephony credentials.
* Each assistant can use a different telephony provider.
Example requests
These payloads mirror the dashboard. Arrays such as scenarios and transfer\_numbers use JSON arrays of strings.
Example: Twilio assistant
```json theme={null}
{
"name": "ServiceBot 5000",
"description": "Handles initial customer service questions and escalations.",
"is_active": true,
"llm_provider": "openai",
"llm_provider_config": {
"model": "gpt-4o-mini",
"api_key": "sk-your-openai-api-key"
},
"llm_settings": {
"temperature": 0.7,
"max_tokens": 1000,
"system_prompt": "You are a friendly and efficient customer support agent. Your goal is to help with common questions and transfer to a human when requested.",
"welcome_message": "Hello! Thanks for calling support. How can I assist you today?"
},
"tts_settings": {
"provider": "elevenlabs",
"voice_id": "rachel",
"model_id": "eleven_flash_v2_5",
"stability": 0.5,
"similarity_boost": 0.75,
"style": 0.0,
"use_speaker_boost": true
},
"stt_settings": {
"model": "nova-2",
"language": "en-US",
"keywords": [
{"keyword": "agent", "intensifier": 1.5},
{"keyword": "human"},
{"keyword": "representative"}
]
},
"interruption_settings": {
"interruption_threshold": 3,
"min_speaking_time": 0.5,
"interruption_cooldown": 2.0
},
"idle_message": "Are you still there? I'm here to help if you need anything.",
"max_idle_messages": 2,
"idle_timeout": 20,
"tools_settings": {
"transfer_call": {
"enabled": true,
"scenarios": [
"speak to an agent",
"talk to a human",
"transfer me to a representative"
],
"transfer_numbers": [
"+18005551212"
]
}
},
"twilio_config": {
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "your_twilio_auth_token"
},
"webhook_url": "https://yourapi.com/webhooks/call-events"
}
```
Example: Telnyx assistant
```json theme={null}
{
"name": "SalesBot Pro",
"description": "Modern sales assistant using Telnyx for competitive call rates.",
"is_active": true,
"llm_provider": "openai",
"llm_provider_config": {
"model": "gpt-4o-mini",
"api_key": "sk-your-openai-api-key"
},
"llm_settings": {
"temperature": 0.8,
"max_tokens": 1000,
"system_prompt": "You are an enthusiastic sales representative. Help qualify leads and schedule demos.",
"welcome_message": "Hi there! Thanks for your interest in our product. How can I help you today?"
},
"tts_settings": {
"provider": "elevenlabs",
"voice_id": "charlie",
"model_id": "eleven_flash_v2_5",
"stability": 0.6,
"similarity_boost": 0.8,
"use_speaker_boost": true
},
"stt_settings": {
"model": "nova-3",
"language": "en-US",
"keyterms": ["demo", "pricing", "features", "schedule"]
},
"telnyx_config": {
"api_key": "KEYxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"connection_id": "1234567890"
},
"webhook_url": "https://yourapi.com/webhooks/telnyx-events"
}
```
# Delete Assistant
Source: https://docs.burki.dev/api-reference/assistants/delete
DELETE /api/v1/assistants/{assistant_id}
Delete an assistant.
Permanently deletes the assistant if it belongs to your organization.
This action cannot be undone.
This endpoint permanently deletes an assistant from your organization. This action cannot be undone. Once an assistant is deleted, all associated configurations are removed.
### Path Parameters
* `assistant_id` (string, **required**): The unique identifier for the assistant you want to delete.
### Response
A successful deletion will return a `200 OK` status code with a confirmation message.
```json Response theme={null}
{
"message": "Assistant deleted successfully"
}
```
# Delete Document
Source: https://docs.burki.dev/api-reference/assistants/documents/delete
DELETE /api/v1/assistants/{assistant_id}/documents/{document_id}
Delete a document from an assistant's knowledge base.
This endpoint permanently deletes a document from an assistant's knowledge base. This action also removes all associated vector embeddings from the database and cannot be undone.
### Path Parameters
* `assistant_id` (string, **required**): The identifier of the assistant that owns the document.
* `document_id` (string, **required**): The identifier of the document to delete.
### Response
A successful deletion will return a `200 OK` status code with a confirmation message.
```json Response theme={null}
{
"message": "Document deleted successfully"
}
```
# Get Document Status
Source: https://docs.burki.dev/api-reference/assistants/documents/get-status
GET /api/v1/assistants/{assistant_id}/documents/{document_id}/status
Get processing status of a document.
After uploading a document, you can use this endpoint to check its processing status. This is useful for determining when the document is fully processed and ready for use in RAG.
### Path Parameters
* `assistant_id` (string, **required**): The identifier of the assistant that owns the document.
* `document_id` (string, **required**): The identifier of the document whose status you want to check.
### Response
The response contains the document object, which includes the current `status`. The status will be one of `processing`, `completed`, or `failed`.
```json Response theme={null}
{
"id": "doc_1234567890",
"user_id": "user_12345",
"organization_id": "org_67890",
"assistant_id": "asst_a1b2c3d4e5f67890",
"name": "product_faq.pdf",
"status": "completed",
"created_at": "2023-10-28T16:00:00Z",
"updated_at": "2023-10-28T16:05:00Z"
}
```
# List Documents
Source: https://docs.burki.dev/api-reference/assistants/documents/list
GET /api/v1/assistants/{assistant_id}/documents
List documents for an assistant.
This endpoint retrieves a list of all documents that have been uploaded to a specific assistant's knowledge base.
### Path Parameters
* `assistant_id` (string, **required**): The unique identifier of the assistant whose documents you want to list.
### Response
The response is a JSON array of document objects, each containing details about a specific document.
```json Response theme={null}
[
{
"id": "doc_1234567890",
"user_id": "user_12345",
"organization_id": "org_67890",
"assistant_id": "asst_a1b2c3d4e5f67890",
"name": "product_faq.pdf",
"status": "completed",
"created_at": "2023-10-28T16:00:00Z",
"updated_at": "2023-10-28T16:05:00Z"
},
{
"id": "doc_abcdefghij",
"user_id": "user_12345",
"organization_id": "org_67890",
"assistant_id": "asst_a1b2c3d4e5f67890",
"name": "onboarding_guide.docx",
"status": "completed",
"created_at": "2023-10-29T10:00:00Z",
"updated_at": "2023-10-29T10:02:00Z"
}
]
```
# Upload Document
Source: https://docs.burki.dev/api-reference/assistants/documents/upload
POST /api/v1/assistants/{assistant_id}/documents/upload
Upload a document to an assistant's knowledge base.
This endpoint allows you to upload a document to an assistant's knowledge base for Retrieval-Augmented Generation (RAG). The document will be processed, chunked, and stored as embeddings in a vector database.
The request must be sent as `multipart/form-data`.
### Path Parameters
* `assistant_id` (string, **required**): The unique identifier of the assistant to whom the document will be added.
### Form Data
* `file` (file, **required**): The document to upload. Supported file types include `.txt`, `.pdf`, `.md`, and `.docx`.
### Response
A successful request will immediately return a document object with a `processing` status. The document will be processed in the background. You can check the status later using the [Get Document Status](/api-reference/assistants/documents/get-status) endpoint.
```json Response theme={null}
{
"id": "doc_1234567890",
"user_id": "user_12345",
"organization_id": "org_67890",
"assistant_id": "asst_a1b2c3d4e5f67890",
"name": "product_faq.pdf",
"status": "processing",
"created_at": "2023-10-28T16:00:00Z",
"updated_at": "2023-10-28T16:00:00Z"
}
```
# Get Assistant by ID
Source: https://docs.burki.dev/api-reference/assistants/get-by-id
GET /api/v1/assistants/{assistant_id}
Get a specific assistant by ID.
Returns the assistant details if it belongs to your organization.
The response body is the assistant object directly (not wrapped in a "data" key).
It includes top-level recording_settings with an enabled field. The frontend should
use the response body as the assistant payload, e.g. setAssistantData({ ...defaultAssistantData, ...response }).
Retrieve One Assistant
Use this endpoint to load the current configuration for a single assistant before showing an edit screen, debugging call behavior, or syncing settings into another system.
- Fetch model, voice, speech, interruption, and tool settings in one response.
- Confirm whether an assistant is active before routing live calls to it.
- Use the returned ID and timestamps to compare configuration changes over time.
How this endpoint behaves
Pass the assistant identifier you received from create or list. The response is the same assistant shape as in list responses, with the full configuration for that record.
Use this call before editing an assistant in your own UI, before assigning numbers, or when debugging why a live call used certain model or voice settings.
Path parameters
-
assistant\_id (string, required): The assistant ID from create or list.
Response
When the ID exists, the API returns one assistant object. The shape matches each item from the list endpoint.
```json Response theme={null}
{
"id": "asst_a1b2c3d4e5f67890",
"user_id": "user_12345",
"organization_id": "org_67890",
"name": "Customer Service Bot",
"description": "Handles inbound customer queries and provides support.",
"is_active": true,
"llm_settings": {
"provider": "openai",
"model": "gpt-4-turbo",
"temperature": 0.7,
"max_tokens": 250
},
"tts_settings": {
"provider": "elevenlabs",
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"stability": 0.5,
"similarity_boost": 0.75
},
"stt_settings": {
"provider": "deepgram",
"language": "en-US",
"model": "nova-2"
},
"interruption_settings": {
"enabled": true,
"threshold": 0.5,
"evaluation_period": 0.8
},
"tools_settings": {
"end_call": {
"enabled": true,
"scenarios": ["The user says goodbye.", "The issue is fully resolved."]
},
"transfer_call": {
"enabled": false
}
},
"created_at": "2023-10-26T10:00:00Z",
"updated_at": "2023-10-26T10:00:00Z"
}
```
# Get Assistant by Phone
Source: https://docs.burki.dev/api-reference/assistants/get-by-phone
GET /api/v1/assistants/by-phone/{phone_number}
Get a specific assistant by phone number.
Returns the assistant details if it belongs to your organization.
Uses the new PhoneNumber table for lookups.
# Get count
Source: https://docs.burki.dev/api-reference/assistants/get-count
# Get Organization Info
Source: https://docs.burki.dev/api-reference/assistants/get-organization
GET /api/v1/assistants/me/organization
Get information about your organization.
Returns basic organization information for the authenticated user.
# List Assistants
Source: https://docs.burki.dev/api-reference/assistants/list
GET /api/v1/assistants
Get a list of assistants for your organization.
Returns all assistants that belong to your organization,
with optional filtering by status and creator.
List Organization Assistants
Use this endpoint to build assistant dashboards, selection menus, audits, and sync jobs. It returns the assistants your authenticated organization can access.
- Page through large assistant lists with
skip and limit.
- Show assistant names, active status, and provider settings in your own UI.
- Use the returned IDs with the get, update, phone-number, and call APIs.
How this endpoint behaves
Results include every assistant in the authenticated organization. Use skip and limit to page through large directories without loading everything at once.
Each item in the array uses the same assistant object shape as the get-by-id response, so you can reuse one client model across list and detail views.
### Query Parameters
* `skip` (integer, optional, default: 0): The number of assistants to skip before starting to collect the result set.
* `limit` (integer, optional, default: 100): The maximum number of assistants to return.
* `active_only` (boolean, optional, default: false): Return only active assistants.
* `my_assistants_only` (boolean, optional, default: false): Return only assistants created by the authenticated user.
* `include_stats` (boolean, optional, default: false): Include calculated call stats fields (`total_calls`, `avg_call_duration`, `success_rate`) when available.
### Response
The response is a JSON array where each object represents an assistant, containing its full configuration details.
```json Response theme={null}
[
{
"id": 124,
"user_id": 17,
"organization_id": 9,
"name": "Customer Service Bot",
"description": "Handles inbound customer queries and provides support.",
"is_active": true,
"llm_settings": {
"provider": "openai",
"model": "gpt-4-turbo",
"temperature": 0.7,
"max_tokens": 250
},
"tts_settings": {
"provider": "elevenlabs",
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"stability": 0.5,
"similarity_boost": 0.75
},
"stt_settings": {
"provider": "deepgram",
"language": "en-US",
"model": "nova-2"
},
"interruption_settings": {
"enabled": true,
"threshold": 0.5,
"evaluation_period": 0.8
},
"tools_settings": {
"end_call": {
"enabled": true,
"scenarios": ["The user says goodbye.", "The issue is fully resolved."]
},
"transfer_call": {
"enabled": false
}
},
"created_at": "2023-10-26T10:00:00Z",
"updated_at": "2023-10-26T10:00:00Z",
"total_calls": 1482,
"avg_call_duration": 213,
"success_rate": 96.3
}
]
```
# List Providers
Source: https://docs.burki.dev/api-reference/assistants/list-providers
GET /api/v1/assistants/providers
Get list of supported LLM providers.
Returns the available LLM providers and their default configurations.
# Assign Phone Number by String
Source: https://docs.burki.dev/api-reference/assistants/phonenumbers/assign-by-number
POST /api/v1/assistants/{assistant_id}/phone-numbers/assign-by-number
Assign a phone number to an assistant by phone number string.
Auto-syncs from Twilio if the number doesn't exist locally and auto_sync is True.
This is the recommended way to assign newly purchased Twilio numbers.
Args:
assistant_id: ID of the assistant to assign the phone number to
request: JSON request containing phone_number, friendly_name (optional), and auto_sync
This endpoint assigns an available phone number from your organization to a specific assistant. The phone number must already exist within your organization's pool of numbers and not be currently assigned to another assistant.
### Path Parameters
* `assistant_id` (string, **required**): The unique identifier of the assistant to whom the phone number will be assigned.
### Request Body
* `phone_number` (string, **required**): The phone number to assign, specified in E.164 format (e.g., `+15551234567`).
```json Request theme={null}
{
"phone_number": "+15551234567"
}
```
### Response
A successful assignment will return the updated phone number object, which now includes the `assistant_id`.
```json Response theme={null}
{
"id": "pn_1a2b3c4d5e6f7g8h",
"phone_number": "+15551234567",
"assistant_id": "asst_a1b2c3d4e5f67890",
"organization_id": "org_67890",
"created_at": "2023-10-26T11:00:00Z",
"updated_at": "2023-10-28T14:00:00Z"
}
```
# Bulk Assign Phone Numbers
Source: https://docs.burki.dev/api-reference/assistants/phonenumbers/bulk-assign
POST /api/v1/assistants/{assistant_id}/phone-numbers/bulk-assign
Assign multiple phone numbers to an assistant at once.
Assigns all specified phone numbers to the assistant.
Returns success if all assignments succeed, or details about failures.
# List Assigned Phone Numbers
Source: https://docs.burki.dev/api-reference/assistants/phonenumbers/list
GET /api/v1/assistants/{assistant_id}/phone-numbers
Get all phone numbers assigned to a specific assistant.
Returns a list of phone numbers currently assigned to the assistant.
This endpoint retrieves a list of all phone numbers currently assigned to a specific assistant. This is useful for seeing which numbers will route incoming calls to this assistant.
### Path Parameters
* `assistant_id` (string, **required**): The unique identifier of the assistant whose phone numbers you want to list.
### Response
The response is a JSON array of phone number objects. Each object contains details about the assigned phone number.
```json Response theme={null}
[
{
"id": "pn_1a2b3c4d5e6f7g8h",
"phone_number": "+15551234567",
"assistant_id": "asst_a1b2c3d4e5f67890",
"organization_id": "org_67890",
"created_at": "2023-10-26T11:00:00Z",
"updated_at": "2023-10-26T11:00:00Z"
},
{
"id": "pn_9i8j7k6l5m4n3o2p",
"phone_number": "+15557654321",
"assistant_id": "asst_a1b2c3d4e5f67890",
"organization_id": "org_67890",
"created_at": "2023-10-27T12:30:00Z",
"updated_at": "2023-10-27T12:30:00Z"
}
]
```
# List Available Phone Numbers
Source: https://docs.burki.dev/api-reference/assistants/phonenumbers/list-available
GET /api/v1/assistants/{assistant_id}/available-phone-numbers
Get all unassigned phone numbers that can be assigned to an assistant.
Returns phone numbers in your organization that are not currently assigned to any assistant.
# Unassign Phone Number by ID
Source: https://docs.burki.dev/api-reference/assistants/phonenumbers/unassign-by-id
POST /api/v1/assistants/{assistant_id}/phone-numbers/{phone_number_id}/unassign
Unassign a phone number from an assistant.
Removes the phone number assignment from the assistant.
The phone number will remain in your organization but won't route calls to any assistant.
# Unassign Phone Number by String
Source: https://docs.burki.dev/api-reference/assistants/phonenumbers/unassign-by-number
POST /api/v1/assistants/{assistant_id}/phone-numbers/unassign-by-number
Unassign a phone number from an assistant by phone number string.
This endpoint unassigns a phone number from an assistant, making it available again within your organization's pool. The phone number is not deleted from your account, but it will no longer route calls to this assistant.
### Path Parameters
* `assistant_id` (string, **required**): The unique identifier of the assistant from whom the phone number will be unassigned.
### Request Body
* `phone_number` (string, **required**): The phone number to unassign, specified in E.164 format (e.g., `+15551234567`).
```json Request theme={null}
{
"phone_number": "+15551234567"
}
```
### Response
A successful request will return the updated phone number object, where the `assistant_id` is now `null`.
```json Response theme={null}
{
"id": "pn_1a2b3c4d5e6f7g8h",
"phone_number": "+15551234567",
"assistant_id": null,
"organization_id": "org_67890",
"created_at": "2023-10-26T11:00:00Z",
"updated_at": "2023-10-28T15:00:00Z"
}
```
# Update Assistant
Source: https://docs.burki.dev/api-reference/assistants/update
PUT /api/v1/assistants/{assistant_id}
Update an assistant.
Updates the assistant configuration if it belongs to your organization.
Only the fields provided in the request will be updated.
This endpoint allows you to modify the configuration of an existing assistant by providing its unique ID. You only need to include the fields you wish to update in the request body; any omitted fields will remain unchanged.
### Path Parameters
* `assistant_id` (string, **required**): The unique identifier of the assistant you want to update.
### Request Body
The request body is a JSON object containing the fields to update. The structure and available parameters are identical to those used when creating an assistant. Refer to [Create Assistant](/api-reference/assistants/create) for the full schema and [Assistant configuration](/assistant-configuration) for how dashboard settings map to runtime behavior.
### Examples
**Update basic settings:**
```json Request theme={null}
{
"name": "Senior Customer Support Specialist",
"llm_settings": {
"temperature": 0.5,
"top_p": 0.9
}
}
```
**Enable warm transfer:**
```json Request theme={null}
{
"transfer_call_message": "Let me brief a specialist and connect you.",
"tools_settings": {
"transfer_call": {
"enabled": true,
"scenarios": [
"caller asks for a human",
"billing dispute requires account team"
],
"transfer_numbers": ["+18005551212"],
"transfer_type": "warm",
"agent_confirmation": true,
"unavailable_message": "I could not reach an agent right now. I can take a message or schedule a callback."
}
}
}
```
**Enable speculative LLM for lower latency:**
```json Request theme={null}
{
"stt_settings": {
"provider": "deepgram",
"model": "nova-3",
"language": "en-US",
"interim_results": true,
"speculative_config": {
"enable_speculative_llm": true,
"speculative_stream_to_tts": false,
"speculative_debounce_ms": 300,
"speculative_min_words": 3,
"speculative_similarity_threshold": 0.85
}
}
}
```
**Switch from Twilio to Telnyx:**
```json Request theme={null}
{
"telnyx_config": {
"api_key": "KEYxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"connection_id": "1234567890"
},
"twilio_config": {
"account_sid": null,
"auth_token": null
}
}
```
**Add Telnyx as backup to Twilio:**
```json Request theme={null}
{
"telnyx_config": {
"api_key": "KEYxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"connection_id": "1234567890"
}
}
```
### Response
A successful update will return the complete, updated assistant object.
```json Response theme={null}
{
"id": "asst_a1b2c3d4e5f67890",
"user_id": "user_12345",
"organization_id": "org_67890",
"name": "Senior Customer Support Specialist",
"description": "Handles inbound customer queries and provides support.",
"is_active": true,
"llm_settings": {
"temperature": 0.5,
"max_tokens": 1000,
"top_p": 0.9,
"system_prompt": "You are a senior customer support specialist.",
"welcome_message": "Hello, how can I help today?"
},
"llm_provider": "openai",
"llm_provider_config": {
"model": "gpt-5",
"api_key": "********"
},
"tts_settings": {
"provider": "openai",
"model_id": "tts-1",
"voice_id": "alloy"
},
"stt_settings": {
"provider": "deepgram",
"language": "en-US",
"model": "nova-3",
"interim_results": true
},
"interruption_settings": {
"interruption_mode": "balanced",
"interruption_threshold": 3,
"min_speaking_time": 0.8,
"interruption_cooldown": 2.0
},
"tools_settings": {
"end_call": {
"enabled": true,
"scenarios": ["The user says goodbye.", "The issue is fully resolved."]
},
"transfer_call": {
"enabled": true,
"transfer_type": "warm",
"transfer_numbers": ["+18005551212"]
}
},
"created_at": "2023-10-26T10:00:00Z",
"updated_at": "2023-10-26T10:15:00Z"
}
```
# List Voice Cloning Providers
Source: https://docs.burki.dev/api-reference/assistants/voice-cloning/providers
GET /api/v1/assistants/{assistant_id}/voice-cloning/providers
List available voice cloning providers.
This endpoint returns a list of TTS providers that support voice cloning, along with their specific requirements and capabilities. Use this information to determine which provider best fits your voice cloning needs.
### Path Parameters
* `assistant_id` (integer, **required**): The unique identifier of the assistant for which you want to list available voice cloning providers.
### Response
Returns an array of providers with their capabilities and requirements.
```json Response theme={null}
{
"success": true,
"providers": [
{
"provider": "elevenlabs",
"name": "ElevenLabs",
"requirements": {
"formats": ["mp3", "wav", "flac", "m4a"],
"min_duration": 10,
"max_duration": 300,
"max_size": 26214400,
"quality_requirements": {
"sample_rate": 22050,
"bit_rate": 128,
"channels": 1
}
}
},
{
"provider": "resemble",
"name": "Resemble",
"requirements": {
"formats": ["wav", "mp3", "flac"],
"min_duration": 10,
"max_duration": 600,
"max_size": 52428800,
"quality_requirements": {
"sample_rate": 22050,
"bit_rate": 128,
"channels": 1
}
}
},
{
"provider": "cartesia",
"name": "Cartesia",
"requirements": {
"formats": ["mp3", "wav", "flac", "m4a", "ogg"],
"min_duration": 5,
"max_duration": 30,
"max_size": 10485760,
"quality_requirements": {
"sample_rate": 16000,
"bit_rate": 128,
"channels": 1,
"note": "Clean mono audio without background noise is recommended"
}
}
}
]
}
```
### Provider Information
Each provider object contains:
* **provider**: Unique identifier for the provider (used in API calls)
* **name**: Human-readable name of the provider
* **requirements**: Technical requirements for voice samples
### Requirements Details
#### File Formats
* **formats**: Array of supported audio file extensions
* Common formats: `mp3`, `wav`, `flac`, `m4a`, `ogg`
#### Duration Limits
* **min\_duration**: Minimum audio duration in seconds
* **max\_duration**: Maximum audio duration in seconds
* Typical range: 10-600 seconds (10 seconds to 10 minutes)
#### File Size
* **max\_size**: Maximum file size in bytes
* Typical range: 25MB to 50MB
#### Quality Requirements
* **sample\_rate**: Minimum sample rate in Hz
* **bit\_rate**: Minimum bit rate in kbps
* **channels**: Number of audio channels (1 = mono, 2 = stereo)
### Provider Comparison
| Provider | Quality | Speed | Cost | Special Features |
| - | - | - | - | - |
| **ElevenLabs** | High | Fast | Premium | Instant cloning, emotion control |
| **Resemble** | High | Medium | Moderate | Real-time streaming, voice mixing |
| **Cartesia** | High | Fast | Usage-based | Low-latency multilingual cloned voices |
### Example Request
```bash cURL theme={null}
curl -X GET "https://api.burki.dev/api/v1/assistants/123/voice-cloning/providers" \
-H "Authorization: Bearer YOUR_API_KEY"
```
### Integration Examples
```python Python - Provider Selection Logic theme={null}
import requests
def select_best_provider(audio_file_info):
"""
Select the best provider based on audio file characteristics
"""
# Get available providers
response = requests.get(
"https://api.burki.dev/api/v1/assistants/123/voice-cloning/providers",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
providers = response.json()["providers"]
file_size = audio_file_info["size"]
duration = audio_file_info["duration"]
format = audio_file_info["format"]
compatible_providers = []
for provider in providers:
req = provider["requirements"]
# Check compatibility
if (format.lower() in req["formats"] and
req["min_duration"] <= duration <= req["max_duration"] and
file_size <= req["max_size"]):
compatible_providers.append({
"provider": provider["provider"],
"name": provider["name"],
"quality_score": calculate_quality_score(provider, audio_file_info)
})
# Sort by quality score
compatible_providers.sort(key=lambda x: x["quality_score"], reverse=True)
return compatible_providers
def calculate_quality_score(provider, audio_info):
"""
Calculate a quality score based on provider capabilities and audio characteristics
"""
score = 0
req = provider["requirements"]
# Bonus for higher quality requirements
if req["quality_requirements"]["sample_rate"] >= 22050:
score += 10
if req["quality_requirements"]["bit_rate"] >= 128:
score += 10
# Provider-specific bonuses
if provider["provider"] == "elevenlabs":
score += 20 # High quality, instant cloning
elif provider["provider"] == "resemble":
score += 15 # Good quality, streaming support
return score
# Usage
audio_info = {
"size": 15000000, # 15MB
"duration": 45, # 45 seconds
"format": "wav"
}
best_providers = select_best_provider(audio_info)
print(f"Best provider: {best_providers[0]['name']}")
```
```javascript Node.js - Requirements Validation theme={null}
async function validateAudioFile(assistantId, audioFile) {
try {
// Get provider requirements
const response = await axios.get(
`https://api.burki.dev/api/v1/assistants/${assistantId}/voice-cloning/providers`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const providers = response.data.providers;
const validationResults = {};
// Check file against each provider
for (const provider of providers) {
const req = provider.requirements;
const validation = {
provider: provider.provider,
name: provider.name,
compatible: true,
issues: []
};
// Check file format
const fileExtension = audioFile.name.split('.').pop().toLowerCase();
if (!req.formats.includes(fileExtension)) {
validation.compatible = false;
validation.issues.push(
`Format '${fileExtension}' not supported. Supported: ${req.formats.join(', ')}`
);
}
// Check file size
if (audioFile.size > req.max_size) {
validation.compatible = false;
validation.issues.push(
`File too large (${(audioFile.size / 1024 / 1024).toFixed(1)}MB). Max: ${(req.max_size / 1024 / 1024).toFixed(1)}MB`
);
}
// Check duration (if available)
if (audioFile.duration) {
if (audioFile.duration < req.min_duration) {
validation.compatible = false;
validation.issues.push(
`Audio too short (${audioFile.duration}s). Min: ${req.min_duration}s`
);
}
if (audioFile.duration > req.max_duration) {
validation.compatible = false;
validation.issues.push(
`Audio too long (${audioFile.duration}s). Max: ${req.max_duration}s`
);
}
}
validationResults[provider.provider] = validation;
}
return validationResults;
} catch (error) {
console.error('Failed to validate audio file:', error);
throw error;
}
}
// Usage example
const audioFile = {
name: 'voice-sample.wav',
size: 15000000, // 15MB
duration: 45 // 45 seconds
};
const results = await validateAudioFile(123, audioFile);
// Show compatible providers
const compatibleProviders = Object.values(results)
.filter(result => result.compatible)
.map(result => result.name);
console.log('Compatible providers:', compatibleProviders.join(', '));
// Show issues for incompatible providers
Object.values(results)
.filter(result => !result.compatible)
.forEach(result => {
console.log(`${result.name} issues:`, result.issues.join('; '));
});
```
### Error Responses
**404 Not Found** - Assistant not found:
```json theme={null}
{
"detail": "Assistant not found"
}
```
**403 Forbidden** - Insufficient permissions:
```json theme={null}
{
"detail": "You don't have permission to access this assistant"
}
```
**500 Internal Server Error** - Service unavailable:
```json theme={null}
{
"detail": "Error listing providers"
}
```
### Best Practices
#### Provider Selection Strategy
1. **Quality First**: Choose providers with higher quality requirements for professional use
2. **Cost Consideration**: Factor in provider pricing for your usage volume
3. **Feature Requirements**: Select based on needed features (streaming, emotions, etc.)
4. **Fallback Options**: Always have a secondary provider configured
#### Audio Preparation
```python Audio Preparation Helper theme={null}
import librosa
import soundfile as sf
def prepare_audio_for_cloning(input_file, target_provider):
"""
Optimize audio file for a specific provider's requirements
"""
# Load audio
audio, sr = librosa.load(input_file, sr=None)
# Get provider requirements
providers = get_voice_cloning_providers()
provider_req = next(p for p in providers if p["provider"] == target_provider)
req = provider_req["requirements"]
# Optimize for provider
target_sr = req["quality_requirements"]["sample_rate"]
target_channels = req["quality_requirements"]["channels"]
# Resample if needed
if sr != target_sr:
audio = librosa.resample(audio, orig_sr=sr, target_sr=target_sr)
# Convert to mono if required
if target_channels == 1 and len(audio.shape) > 1:
audio = librosa.to_mono(audio)
# Trim silence
audio, _ = librosa.effects.trim(audio, top_db=20)
# Normalize volume
audio = librosa.util.normalize(audio)
# Check duration
duration = len(audio) / target_sr
if duration < req["min_duration"]:
raise ValueError(f"Audio too short: {duration:.1f}s, minimum: {req['min_duration']}s")
if duration > req["max_duration"]:
# Trim to maximum duration
max_samples = int(req["max_duration"] * target_sr)
audio = audio[:max_samples]
return audio, target_sr
# Usage
optimized_audio, sample_rate = prepare_audio_for_cloning(
"voice-sample.wav",
"elevenlabs"
)
# Save optimized version
sf.write("optimized-sample.wav", optimized_audio, sample_rate)
```
#### Multi-Provider Strategy
```python Multi-Provider Voice Cloning theme={null}
async def clone_voice_multi_provider(audio_file, voice_name):
"""
Clone voice with multiple providers for redundancy
"""
providers = await get_voice_cloning_providers()
compatible_providers = validate_audio_file(audio_file, providers)
cloning_results = {}
for provider in compatible_providers:
try:
# Upload voice sample
upload_result = await upload_voice_sample(
audio_file,
assistant_id=123,
provider=provider["provider"]
)
# Create cloned voice
clone_result = await create_cloned_voice(
voice_sample_id=upload_result["voice_sample"]["id"],
provider=provider["provider"],
name=f"{voice_name} ({provider['name']})"
)
cloning_results[provider["provider"]] = {
"success": True,
"voice_id": clone_result["cloned_voice"]["id"],
"status": clone_result["cloned_voice"]["status"]
}
except Exception as e:
cloning_results[provider["provider"]] = {
"success": False,
"error": str(e)
}
return cloning_results
# Usage
results = await clone_voice_multi_provider("voice-sample.wav", "My Custom Voice")
# Check results
successful_clones = {k: v for k, v in results.items() if v["success"]}
print(f"Successfully cloned with {len(successful_clones)} providers")
```
### Dynamic Provider Configuration
For applications that need to adapt to changing provider availability:
```python Dynamic Provider Management theme={null}
class VoiceCloningManager:
def __init__(self, assistant_id):
self.assistant_id = assistant_id
self.provider_cache = {}
self.cache_expiry = 300 # 5 minutes
async def get_available_providers(self, force_refresh=False):
"""Get available providers with caching"""
now = time.time()
if (not force_refresh and
'providers' in self.provider_cache and
now - self.provider_cache['timestamp'] < self.cache_expiry):
return self.provider_cache['providers']
try:
providers = await fetch_voice_cloning_providers(self.assistant_id)
self.provider_cache = {
'providers': providers,
'timestamp': now
}
return providers
except Exception as e:
# Return cached data if available, otherwise raise
if 'providers' in self.provider_cache:
return self.provider_cache['providers']
raise e
async def select_optimal_provider(self, audio_characteristics, preferences=None):
"""Select the best provider based on audio and preferences"""
providers = await self.get_available_providers()
# Filter compatible providers
compatible = []
for provider in providers:
if self.is_compatible(provider, audio_characteristics):
score = self.calculate_provider_score(provider, preferences or {})
compatible.append((provider, score))
if not compatible:
raise ValueError("No compatible providers found")
# Sort by score and return best
compatible.sort(key=lambda x: x[1], reverse=True)
return compatible[0][0]
def is_compatible(self, provider, audio_characteristics):
"""Check if provider is compatible with audio characteristics"""
req = provider["requirements"]
return (
audio_characteristics.get("format", "").lower() in req["formats"] and
req["min_duration"] <= audio_characteristics.get("duration", 0) <= req["max_duration"] and
audio_characteristics.get("size", 0) <= req["max_size"]
)
def calculate_provider_score(self, provider, preferences):
"""Calculate provider score based on preferences"""
score = 0
# Base score from quality requirements
req = provider["requirements"]
score += req["quality_requirements"]["sample_rate"] / 1000
score += req["quality_requirements"]["bit_rate"] / 10
# Preference bonuses
if preferences.get("prioritize_quality") and provider["provider"] == "elevenlabs":
score += 50
if preferences.get("prioritize_cost") and provider["provider"] == "resemble":
score += 30
if preferences.get("prioritize_speed") and provider["provider"] in ["elevenlabs"]:
score += 40
return score
# Usage
manager = VoiceCloningManager(assistant_id=123)
audio_chars = {
"format": "wav",
"duration": 60,
"size": 10000000
}
preferences = {
"prioritize_quality": True,
"prioritize_speed": False
}
best_provider = await manager.select_optimal_provider(audio_chars, preferences)
print(f"Selected provider: {best_provider['name']}")
```
# List Voice Samples
Source: https://docs.burki.dev/api-reference/assistants/voice-samples/list
GET /api/v1/assistants/{assistant_id}/voice-samples
List voice samples for organization.
This endpoint retrieves a list of all voice samples that have been uploaded for a specific assistant's organization.
### Path Parameters
* `assistant_id` (integer, **required**): The unique identifier of the assistant whose voice samples you want to list.
### Query Parameters
* `status` (string, optional): Filter voice samples by processing status.
* Allowed values: `uploaded`, `processing`, `ready`, `failed`
### Response
The response is a JSON object containing an array of voice sample objects.
```json Response theme={null}
{
"success": true,
"voice_samples": [
{
"id": 123,
"name": "Professional Voice Sample",
"original_filename": "professional_voice.wav",
"content_type": "audio/wav",
"file_size": 2457600,
"duration_seconds": 45.2,
"status": "ready",
"error_message": null,
"tags": ["professional", "clear", "business"],
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": 124,
"name": "Casual Voice Sample",
"original_filename": "casual_voice.mp3",
"content_type": "audio/mpeg",
"file_size": 1843200,
"duration_seconds": 32.1,
"status": "uploaded",
"error_message": null,
"tags": ["casual", "friendly"],
"created_at": "2024-01-15T11:15:00Z"
}
]
}
```
### Response Fields
* `id` (integer): Unique identifier for the voice sample
* `name` (string): Display name of the voice sample
* `original_filename` (string): Original filename of the uploaded audio
* `content_type` (string): MIME type of the audio file
* `file_size` (integer): Size of the audio file in bytes
* `duration_seconds` (float): Duration of the audio in seconds
* `status` (string): Processing status of the sample
* `error_message` (string): Error message if processing failed
* `tags` (array): Array of tags associated with the sample
* `created_at` (string): ISO 8601 timestamp of when the sample was uploaded
### Status Values
* `uploaded`: Sample uploaded successfully, ready for voice cloning
* `processing`: Sample is being processed (validation, analysis)
* `ready`: Sample processed and available for voice cloning
* `failed`: Sample processing failed, check error\_message
### Example Request
```bash cURL theme={null}
curl -X GET "https://api.burki.dev/api/v1/assistants/123/voice-samples?status=ready" \
-H "Authorization: Bearer YOUR_API_KEY"
```
# Upload Voice Sample
Source: https://docs.burki.dev/api-reference/assistants/voice-samples/upload
POST /api/v1/assistants/{assistant_id}/voice-samples/upload
Upload voice sample for cloning.
This endpoint allows you to upload audio samples for voice cloning. The uploaded sample will be processed and prepared for creating cloned voices using supported TTS providers.
### Path Parameters
* `assistant_id` (integer, **required**): The unique identifier of the assistant to associate the voice sample with.
### Form Data
The request must be sent as `multipart/form-data`.
* `file` (file, **required**): The audio file to upload. Supported formats: MP3, WAV, FLAC, M4A, OGG.
* `name` (string, optional): Custom name for the voice sample. Defaults to filename if not provided.
* `description` (string, optional): Description of the voice sample.
* `tags` (string, optional): Comma-separated tags for organizing voice samples.
### File Requirements
* **Formats**: MP3, WAV, FLAC, M4A, OGG
* **Size**: Maximum 50MB
* **Duration**: 10 seconds to 10 minutes
* **Quality**: 22kHz+ sample rate, 128kbps+ bit rate recommended
* **Content**: Clear speech, single speaker, minimal background noise
### Response
A successful upload returns the voice sample object with processing status.
```json Response theme={null}
{
"success": true,
"voice_sample": {
"id": 123,
"name": "Professional Voice Sample",
"filename": "professional_voice.wav",
"status": "uploaded",
"created_at": "2024-01-15T10:30:00Z"
}
}
```
### Example Request
```bash cURL theme={null}
curl -X POST "https://api.burki.dev/api/v1/assistants/123/voice-samples/upload" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@voice_sample.wav" \
-F "name=Professional Voice" \
-F "description=Clear professional speaking voice" \
-F "tags=professional,clear,business"
```
### Error Responses
**400 Bad Request** - Invalid file or parameters:
```json theme={null}
{
"detail": "File too large (max 50MB)"
}
```
**413 Payload Too Large** - File exceeds size limit:
```json theme={null}
{
"detail": "Audio file exceeds maximum size limit"
}
```
**422 Unprocessable Entity** - Invalid audio format:
```json theme={null}
{
"detail": "Unsupported audio format: audio/mpeg3"
}
```
# Billing API
Source: https://docs.burki.dev/api-reference/billing/overview
Wallet, ledger, usage, statements, and managed-service billing endpoints.
The Billing API manages prepaid wallet balance, Stripe top-ups, auto top-up settings, ledger history, usage summaries, monthly charges, statements, and hybrid managed-service preferences.
Billing endpoints use the `/v1/billing` prefix:
```text theme={null}
https://api.burki.dev/v1/billing
```
How this endpoint behaves
Analytics aggregate calls for your organization over the selected period. Metrics include totals, completion and failure counts, duration, daily rollups, and top assistants.
Pair this endpoint with list and detail call APIs when you need to drill down from a dashboard summary into individual call records.
### Query Parameters
* `period` (string, optional, default: `7d`): The time period for the analysis.
* Allowed values: `1d`, `7d`, `30d`, `90d`.
### Response
The response is a JSON object containing a comprehensive breakdown of call metrics.
```json Response theme={null}
{
"total_calls": 150,
"completed_calls": 135,
"failed_calls": 10,
"ongoing_calls": 5,
"total_duration": 40500,
"avg_duration": 300,
"success_rate": 90,
"daily_stats": {
"2023-10-29": {
"total": 70,
"completed": 65,
"failed": 5
},
"2023-10-30": {
"total": 80,
"completed": 70,
"failed": 5
}
},
"top_assistants": [
{
"assistant_id": 123,
"assistant_name": "Support Bot",
"calls": 100,
"duration": 30000
},
{
"assistant_id": 456,
"assistant_name": "Sales Rep",
"calls": 50,
"duration": 10500
}
]
}
```
# Get Call by ID
Source: https://docs.burki.dev/api-reference/calls/get-by-id
GET /api/v1/calls/{call_id}
Get a specific call by ID.
Returns the call details if it belongs to an assistant in your organization.
This endpoint retrieves a single call record by its unique database ID.
### Path Parameters
* `call_id` (integer, **required**): The unique identifier for the call you want to retrieve.
### Response
The response is a JSON object containing the full details of the specified call. The structure is the same as the objects returned by the [List Calls](/api-reference/calls/list) endpoint.
```json Response theme={null}
{
"id": 101,
"call_sid": "CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"assistant_id": 123,
"assistant_name": "ServiceBot",
"flow_name": "Customer Support Flow",
"to_phone_number": "+15551234567",
"customer_phone_number": "+15559876543",
"status": "completed",
"started_at": "2023-10-30T10:00:00Z",
"ended_at": "2023-10-30T10:05:00Z",
"duration": 300,
"call_meta": {
"customer_id": "cust_abc123"
},
"total_cost": 0.05,
"llm_cost": 0.02,
"tts_cost": 0.01,
"stt_cost": 0.01,
"telephony_cost": 0.01,
"cost_currency": "USD"
}
```
# Get Call by SID
Source: https://docs.burki.dev/api-reference/calls/get-by-sid
GET /api/v1/calls/sid/{call_sid}
Get a specific call by Twilio Call SID.
Returns the call details if it belongs to an assistant in your organization.
This endpoint retrieves a single call record by its Burki call SID / provider call identifier. This is useful when you have the call SID from provider webhooks, logs, or call initiation responses and need to look up the corresponding call in Burki.
### Path Parameters
* `call_sid` (string, **required**): The Burki call SID / provider call identifier.
### Response
The response is a JSON object containing the full details of the specified call. The structure is the same as the objects returned by the [List Calls](/api-reference/calls/list) endpoint.
```json Response theme={null}
{
"id": 101,
"call_sid": "CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"assistant_id": 123,
"assistant_name": "ServiceBot",
"flow_name": "Customer Support Flow",
"to_phone_number": "+15551234567",
"customer_phone_number": "+15559876543",
"status": "completed",
"started_at": "2023-10-30T10:00:00Z",
"ended_at": "2023-10-30T10:05:00Z",
"duration": 300,
"call_meta": {
"customer_id": "cust_abc123"
},
"total_cost": 0.05,
"llm_cost": 0.02,
"tts_cost": 0.01,
"stt_cost": 0.01,
"telephony_cost": 0.01,
"cost_currency": "USD"
}
```
# Get Call Count
Source: https://docs.burki.dev/api-reference/calls/get-count
GET /api/v1/calls/count
Get the count of calls in your organization with filtering options.
This endpoint returns the total number of calls that match a given set of filters. It is useful for quickly getting a count without retrieving the full list of call objects.
### Query Parameters
This endpoint supports a subset of the [List Calls](/api-reference/calls/list) filters:
* `status` (string, optional)
* `assistant_id` (integer, optional)
* `date_from` (string, optional)
* `date_to` (string, optional)
It does not support the search-style filters (`customer_phone`, `call_sid`, `assistant_name`) or duration filters. Use List Calls when you need those filters and read the `total` field from the paginated response.
### Response
The response is a JSON object containing the total count of matching calls.
```json Response theme={null}
{
"count": 42
}
```
# Get Call Stats
Source: https://docs.burki.dev/api-reference/calls/get-stats
GET /api/v1/calls/stats
Get call statistics for your organization.
Returns various metrics about calls in your organization.
This endpoint provides a high-level summary of call statistics for your entire organization. It's a quick way to get key metrics without any parameters.
### Response
The response is a JSON object containing the following key statistics:
* `total_calls`: The total number of calls ever made.
* `total_duration`: The sum of the duration of all calls, in seconds.
* `average_duration`: The average duration of a call, in seconds.
```json Response theme={null}
{
"total_calls": 500,
"total_duration": 150000,
"average_duration": 300
}
```
# Initiate Call
Source: https://docs.burki.dev/api-reference/calls/initiate
POST /calls/initiate
Initiates an outbound call from an assistant to a specified phone number.
This endpoint is protected and requires authentication.
Programmatically initiate an outbound call from one of your AI assistants to a phone number.
This is one of the most powerful features of Burki - it allows you to trigger AI-powered outbound calls from your application logic, enabling use cases like appointment reminders, lead follow-ups, and proactive customer outreach.
## How It Works
1. **You send a request** with the source phone number, destination number, and optional customization
2. **Burki resolves the assistant** based on your parameters
3. **The call is placed** through your configured telephony provider (Twilio, Telnyx, Vonage, or SIP)
4. **Your AI assistant** handles the conversation automatically
Create a Callable Tool
Tools let assistants take action during a conversation. Use this endpoint to register HTTP endpoints, Python functions, or AWS Lambda functions that the AI can call when it needs external data or business logic.
- Expose customer lookup, scheduling, payment, quoting, or ticketing workflows.
- Define a JSON schema so the assistant knows which arguments to collect.
- Keep sensitive credentials out of prompts and route them through tool configuration instead.
How this endpoint behaves
You register a tool once per organization, then attach it to one or more assistants. Supported tool types are HTTP endpoints, Python functions, and AWS Lambda functions.
Each tool carries a name, description, and configuration block. The assistant uses that metadata when deciding whether to invoke the tool during a conversation.
### Request Body
The request body structure varies based on the tool type you're creating:
Create a tool that makes HTTP requests to external APIs.
```json Example Request theme={null}
{
"name": "get_customer_info",
"display_name": "Customer Information Lookup",
"description": "Look up customer information by phone number or email",
"tool_type": "endpoint",
"configuration": {
"url": "https://api.yourcompany.com/customers/lookup",
"method": "GET",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
"timeout_seconds": 30
},
"function_definition": {
"name": "get_customer_info",
"description": "Look up customer information by phone number or email",
"parameters": {
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"description": "Customer's phone number in E.164 format"
},
"email": {
"type": "string",
"description": "Customer's email address"
}
},
"required": ["phone_number"]
}
},
"is_active": true,
"is_public": false
}
```
Create a tool that executes custom Python code.
```json Example Request theme={null}
{
"name": "calculate_loan_payment",
"display_name": "Loan Payment Calculator",
"description": "Calculate monthly loan payment based on principal, rate, and term",
"tool_type": "python_function",
"configuration": {
"python_code": "def calculate_monthly_payment(principal, annual_rate, years):\n monthly_rate = annual_rate / 100 / 12\n num_payments = years * 12\n \n if monthly_rate == 0:\n return principal / num_payments\n \n payment = principal * (monthly_rate * (1 + monthly_rate) ** num_payments) / ((1 + monthly_rate) ** num_payments - 1)\n \n return {\n 'monthly_payment': round(payment, 2),\n 'total_paid': round(payment * num_payments, 2),\n 'total_interest': round((payment * num_payments) - principal, 2)\n }",
"timeout_seconds": 10
},
"function_definition": {
"name": "calculate_loan_payment",
"description": "Calculate monthly loan payment and totals",
"parameters": {
"type": "object",
"properties": {
"principal": {
"type": "number",
"description": "Loan principal amount in dollars"
},
"annual_rate": {
"type": "number",
"description": "Annual interest rate as percentage (e.g., 5.5 for 5.5%)"
},
"years": {
"type": "integer",
"description": "Loan term in years"
}
},
"required": ["principal", "annual_rate", "years"]
}
},
"is_active": true
}
```
Create a tool that invokes AWS Lambda functions.
```json Example Request theme={null}
{
"name": "customer_lookup_lambda",
"display_name": "Customer Lookup (Lambda)",
"description": "Look up customer data using AWS Lambda function",
"tool_type": "lambda",
"configuration": {
"function_name": "customer-lookup-function",
"aws_region": "us-east-1",
"invocation_type": "RequestResponse",
"timeout_seconds": 30
},
"function_definition": {
"name": "customer_lookup",
"description": "Look up customer information from database",
"parameters": {
"type": "object",
"properties": {
"customer_id": {
"type": "string",
"description": "Unique customer identifier"
},
"phone_number": {
"type": "string",
"description": "Customer phone number"
}
},
"required": ["customer_id"]
}
},
"is_active": true
}
```
### Response
A successful request returns the created tool object:
```json Response theme={null}
{
"id": 123,
"name": "get_customer_info",
"display_name": "Customer Information Lookup",
"description": "Look up customer information by phone number or email",
"tool_type": "endpoint",
"configuration": {
"url": "https://api.yourcompany.com/customers/lookup",
"method": "GET",
"headers": {
"Authorization": "Bearer [REDACTED]",
"Content-Type": "application/json"
},
"timeout_seconds": 30
},
"function_definition": {
"name": "get_customer_info",
"description": "Look up customer information by phone number or email",
"parameters": {
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"description": "Customer's phone number in E.164 format"
},
"email": {
"type": "string",
"description": "Customer's email address"
}
},
"required": ["phone_number"]
}
},
"is_active": true,
"is_public": false,
"execution_count": 0,
"success_rate": 0.0,
"avg_execution_time": 0.0,
"organization_id": 456,
"created_by": 789,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
```
### Field Descriptions
* `name` (string, **required**): Unique identifier for the tool within your organization
* `display_name` (string, **required**): Human-readable name shown in the UI
* `description` (string, **required**): Clear description of what the tool does
* `tool_type` (string, **required**): Type of tool (`"endpoint"`, `"python_function"`, or `"lambda"`)
* `configuration` (object, **required**): Tool-specific configuration (varies by type)
* `function_definition` (object, **required**): OpenAI function calling schema
* `is_active` (boolean, optional): Whether the tool is active (default: `true`)
* `is_public` (boolean, optional): Whether other organizations can see this tool (default: `false`)
* `timeout_seconds` (integer, optional): Maximum execution time (default: 30)
* `retry_attempts` (integer, optional): Number of retry attempts on failure (default: 1)
### Error Responses
**400 Bad Request**
```json theme={null}
{
"detail": "Tool name 'get_customer_info' already exists in organization"
}
```
**422 Validation Error**
```json theme={null}
{
"detail": [
{
"loc": ["body", "tool_type"],
"msg": "value is not a valid enumeration member; permitted: 'endpoint', 'python_function', 'lambda'",
"type": "type_error.enum"
}
]
}
```
### Configuration Examples
```json theme={null}
{
"configuration": {
"url": "https://api.example.com/data",
"method": "POST",
"headers": {
"Authorization": "Bearer ${API_KEY}",
"Content-Type": "application/json",
"User-Agent": "Burki/1.0"
},
"timeout_seconds": 45,
"follow_redirects": true,
"verify_ssl": true,
"request_template": {
"query": "SELECT * FROM customers WHERE phone = '${phone_number}'",
"format": "json"
}
}
}
```
```json theme={null}
{
"configuration": {
"python_code": "import requests\nimport pandas as pd\nfrom datetime import datetime\n\ndef analyze_customer_data(customer_id):\n # Fetch data from API\n response = requests.get(f'https://api.internal.com/customers/{customer_id}')\n data = response.json()\n \n # Process with pandas\n df = pd.DataFrame(data['transactions'])\n \n return {\n 'total_spent': df['amount'].sum(),\n 'transaction_count': len(df),\n 'last_purchase': df['date'].max(),\n 'avg_order_value': df['amount'].mean()\n }",
"timeout_seconds": 15,
"max_memory_mb": 128
}
}
```
```json theme={null}
{
"configuration": {
"function_name": "customer-analytics-prod",
"aws_region": "us-west-2",
"invocation_type": "RequestResponse",
"environment_variables": {
"DATABASE_URL": "${DB_URL}",
"API_KEY": "${EXTERNAL_API_KEY}"
},
"timeout_seconds": 60
}
}
```
### Best Practices
1. **Naming**: Use clear, descriptive names that indicate the tool's purpose
2. **Security**: Never include sensitive data in tool definitions; use environment variables
3. **Testing**: Test tools thoroughly before deploying to production
4. **Documentation**: Provide clear descriptions and parameter documentation
5. **Error Handling**: Design tools to handle failures gracefully
6. **Performance**: Set appropriate timeouts and optimize for call-time execution
# Discover Lambda Functions
Source: https://docs.burki.dev/api-reference/tools/discover-lambda
POST /api/lambda/list-functions
List available Lambda functions in user's AWS account.
This endpoint discovers and lists all AWS Lambda functions available in your AWS account for the specified region and credentials. This is used by the Tools Library to provide an interactive function selector when creating Lambda tools.
### Request Body
Send AWS credentials and region as query parameters:
```json Example Request theme={null}
{
"access_key": "AKIA1234567890EXAMPLE",
"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"region": "us-east-1"
}
```
### Query Parameters
* `access_key` (string, **required**): AWS Access Key ID with Lambda permissions
* `secret_key` (string, **required**): AWS Secret Access Key
* `region` (string, optional, default: "us-east-1"): AWS region to search for Lambda functions
### Response
A successful request returns detailed information about all Lambda functions:
```json Response theme={null}
{
"success": true,
"message": "Found 3 Lambda functions",
"functions": [
{
"function_name": "customer-lookup-service",
"description": "Look up customer data by phone number",
"runtime": "python3.9",
"timeout": 30,
"memory_size": 512,
"code_size": 1024000,
"handler": "lambda_function.lambda_handler",
"version": "$LATEST",
"last_modified": "2024-01-15T10:30:00.000Z"
},
{
"function_name": "order-processing",
"description": "Process customer orders and payments",
"runtime": "nodejs18.x",
"timeout": 60,
"memory_size": 1024,
"code_size": 2048000,
"handler": "index.handler",
"version": "$LATEST",
"last_modified": "2024-01-10T14:22:15.000Z"
},
{
"function_name": "send-notifications",
"description": "",
"runtime": "python3.8",
"timeout": 15,
"memory_size": 256,
"code_size": 512000,
"handler": "notification.send",
"version": "$LATEST",
"last_modified": "2024-01-05T09:15:30.000Z"
}
]
}
```
### Function Object Properties
Each function object in the response contains:
| Property | Type | Description |
| - | - | - |
| `function_name` | string | Lambda function name (used for invocation) |
| `description` | string | Function description (may be empty) |
| `runtime` | string | Runtime environment (e.g., python3.9, nodejs18.x) |
| `timeout` | integer | Function timeout in seconds |
| `memory_size` | integer | Allocated memory in MB |
| `code_size` | integer | Function code size in bytes |
| `handler` | string | Function entry point |
| `version` | string | Function version (usually \$LATEST) |
| `last_modified` | string | ISO timestamp of last modification |
### Error Responses
#### 400 Bad Request - Missing Credentials
```json theme={null}
{
"success": false,
"detail": "AWS credentials not found. Please configure access_key and secret_key."
}
```
#### 400 Bad Request - Invalid Credentials
```json theme={null}
{
"success": false,
"detail": "AWS error (InvalidUserID.NotFound): The AWS Access Key Id you provided does not exist in our records."
}
```
#### 400 Bad Request - Access Denied
```json theme={null}
{
"success": false,
"detail": "AWS error (AccessDenied): User: arn:aws:iam::123456789012:user/example is not authorized to perform: lambda:ListFunctions"
}
```
#### 500 Internal Server Error
```json theme={null}
{
"success": false,
"detail": "Failed to list Lambda functions: Connection timeout"
}
```
### Required IAM Permissions
Your AWS credentials must have the following permissions:
```json IAM Policy theme={null}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"lambda:ListFunctions",
"lambda:GetFunctionConfiguration"
],
"Resource": "*"
}
]
}
```
### Usage in Tools Library
This endpoint is automatically called when users:
1. **Enter AWS credentials** in the Lambda tool configuration form
2. **Select a region** from the dropdown
3. **Click "🔍 Discover Functions"** button
4. **Browse the interactive function list** to select their Lambda function
The selected function's metadata is used to auto-populate the tool configuration form.
### Rate Limits
* **Rate Limit:** 10 requests per minute per organization
* **Timeout:** 30 seconds maximum per request
* **Pagination:** Returns all functions (AWS API handles pagination internally)
List Organization Tools
Use this endpoint to show available tools in an admin UI, audit tool health, or let builders attach existing tools to assistants.
- Filter by tool type and active status.
- Search by tool name, display name, or description.
- Sort by usage, performance, creation date, or update date.
How this endpoint behaves
The list is paginated and supports search, filters, and sort order. Use it for admin screens, audits, and attaching existing tools to assistants without creating duplicates.
Tool records include type, status, and usage-oriented sort fields so you can find stale or high-traffic tools quickly.
### Query Parameters
* `page` (integer, optional, default: 1): Page number for pagination
* `per_page` (integer, optional, default: 12): Number of tools per page (max: 100)
* `tool_type` (string, optional): Filter by tool type
* Allowed values: `"endpoint"`, `"python_function"`, `"lambda"`
* `is_active` (boolean, optional): Filter by active status
* `search` (string, optional): Search in tool names, display names, and descriptions
* `sort_by` (string, optional, default: `"name"`): Sort field
* Allowed values: `"name"`, `"display_name"`, `"created_at"`, `"updated_at"`, `"execution_count"`
* `sort_order` (string, optional, default: `"asc"`): Sort direction
* Allowed values: `"asc"`, `"desc"`
### Example Requests
```bash Basic List theme={null}
curl -X GET "https://api.burki.dev/api/v1/tools" \
-H "Authorization: Bearer YOUR_API_KEY"
```
```bash Filtered by Type theme={null}
curl -X GET "https://api.burki.dev/api/v1/tools?tool_type=endpoint&is_active=true" \
-H "Authorization: Bearer YOUR_API_KEY"
```
```bash Search and Sort theme={null}
curl -X GET "https://api.burki.dev/api/v1/tools?search=customer&sort_by=execution_count&sort_order=desc" \
-H "Authorization: Bearer YOUR_API_KEY"
```
```bash Paginated theme={null}
curl -X GET "https://api.burki.dev/api/v1/tools?page=2&per_page=20" \
-H "Authorization: Bearer YOUR_API_KEY"
```
### Response
A successful request returns a paginated list of tools:
```json Response theme={null}
{
"tools": [
{
"id": 123,
"name": "get_customer_info",
"display_name": "Customer Information Lookup",
"description": "Look up customer information by phone number or email",
"tool_type": "endpoint",
"configuration": {
"url": "https://api.yourcompany.com/customers/lookup",
"method": "GET",
"timeout_seconds": 30
},
"function_definition": {
"name": "get_customer_info",
"description": "Look up customer information by phone number or email",
"parameters": {
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"description": "Customer's phone number in E.164 format"
}
},
"required": ["phone_number"]
}
},
"is_active": true,
"is_public": false,
"execution_count": 156,
"success_rate": 94.2,
"avg_execution_time": 1.24,
"organization_id": 456,
"created_by": 789,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T15:45:00Z"
},
{
"id": 124,
"name": "calculate_loan_payment",
"display_name": "Loan Payment Calculator",
"description": "Calculate monthly loan payment based on principal, rate, and term",
"tool_type": "python_function",
"configuration": {
"timeout_seconds": 10
},
"function_definition": {
"name": "calculate_loan_payment",
"description": "Calculate monthly loan payment and totals",
"parameters": {
"type": "object",
"properties": {
"principal": {"type": "number"},
"annual_rate": {"type": "number"},
"years": {"type": "integer"}
},
"required": ["principal", "annual_rate", "years"]
}
},
"is_active": true,
"is_public": false,
"execution_count": 89,
"success_rate": 100.0,
"avg_execution_time": 0.12,
"organization_id": 456,
"created_by": 789,
"created_at": "2024-01-14T09:15:00Z",
"updated_at": "2024-01-14T09:15:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 12,
"total": 2,
"total_pages": 1,
"has_next": false,
"has_prev": false
}
}
```
### Response Fields
**Tool Object:**
* `id` (integer): Unique tool identifier
* `name` (string): Tool name (unique within organization)
* `display_name` (string): Human-readable name
* `description` (string): Tool description
* `tool_type` (string): Tool type (`"endpoint"`, `"python_function"`, or `"lambda"`)
* `configuration` (object): Tool-specific configuration (sensitive data redacted)
* `function_definition` (object): OpenAI function calling schema
* `is_active` (boolean): Whether the tool is active
* `is_public` (boolean): Whether the tool is publicly visible
* `execution_count` (integer): Total number of executions
* `success_rate` (float): Success rate percentage (0-100)
* `avg_execution_time` (float): Average execution time in seconds
* `organization_id` (integer): Organization that owns the tool
* `created_by` (integer): User ID who created the tool
* `created_at` (string): ISO 8601 creation timestamp
* `updated_at` (string): ISO 8601 last update timestamp
**Pagination Object:**
* `page` (integer): Current page number
* `per_page` (integer): Items per page
* `total` (integer): Total number of tools
* `total_pages` (integer): Total number of pages
* `has_next` (boolean): Whether there's a next page
* `has_prev` (boolean): Whether there's a previous page
### Filtering Examples
**Endpoint Tools Only:**
```bash theme={null}
GET /api/v1/tools?tool_type=endpoint
```
**Python Function Tools Only:**
```bash theme={null}
GET /api/v1/tools?tool_type=python_function
```
**Active Lambda Tools:**
```bash theme={null}
GET /api/v1/tools?tool_type=lambda&is_active=true
```
**Search by Name:**
```bash theme={null}
GET /api/v1/tools?search=customer
```
**Search by Description:**
```bash theme={null}
GET /api/v1/tools?search=lookup
```
**Complex Search:**
```bash theme={null}
GET /api/v1/tools?search=payment%20calculator&tool_type=python_function
```
**Most Used Tools:**
```bash theme={null}
GET /api/v1/tools?sort_by=execution_count&sort_order=desc
```
**Recently Created:**
```bash theme={null}
GET /api/v1/tools?sort_by=created_at&sort_order=desc
```
**Best Performance:**
```bash theme={null}
GET /api/v1/tools?sort_by=success_rate&sort_order=desc
```
**Fastest Execution:**
```bash theme={null}
GET /api/v1/tools?sort_by=avg_execution_time&sort_order=asc
```
### Error Responses
**400 Bad Request**
```json theme={null}
{
"detail": "Invalid sort_by field. Must be one of: name, display_name, created_at, updated_at, execution_count"
}
```
**422 Validation Error**
```json theme={null}
{
"detail": [
{
"loc": ["query", "per_page"],
"msg": "ensure this value is less than or equal to 100",
"type": "value_error.number.not_le"
}
]
}
```
### Integration Examples
```javascript theme={null}
const axios = require('axios');
async function listTools(filters = {}) {
try {
const params = new URLSearchParams();
// Add filters
if (filters.toolType) params.append('tool_type', filters.toolType);
if (filters.isActive !== undefined) params.append('is_active', filters.isActive);
if (filters.search) params.append('search', filters.search);
if (filters.sortBy) params.append('sort_by', filters.sortBy);
if (filters.sortOrder) params.append('sort_order', filters.sortOrder);
if (filters.page) params.append('page', filters.page);
if (filters.perPage) params.append('per_page', filters.perPage);
const response = await axios.get(`https://api.burki.dev/api/v1/tools?${params}`, {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
return response.data;
} catch (error) {
console.error('Failed to list tools:', error.response.data);
throw error;
}
}
// Usage examples
const allTools = await listTools();
const endpointTools = await listTools({ toolType: 'endpoint', isActive: true });
const mostUsed = await listTools({ sortBy: 'execution_count', sortOrder: 'desc' });
```
```python theme={null}
import requests
from typing import Optional, Dict, Any
def list_tools(
tool_type: Optional[str] = None,
is_active: Optional[bool] = None,
search: Optional[str] = None,
sort_by: str = "name",
sort_order: str = "asc",
page: int = 1,
per_page: int = 12
) -> Dict[str, Any]:
"""List tools with optional filtering and sorting."""
url = "https://api.burki.dev/api/v1/tools"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
"sort_by": sort_by,
"sort_order": sort_order,
"page": page,
"per_page": per_page
}
# Add optional filters
if tool_type:
params["tool_type"] = tool_type
if is_active is not None:
params["is_active"] = is_active
if search:
params["search"] = search
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
return response.json()
else:
raise Exception(f"Failed to list tools: {response.json()['detail']}")
# Usage examples
all_tools = list_tools()
python_tools = list_tools(tool_type="python_function", is_active=True)
search_results = list_tools(search="customer", sort_by="execution_count", sort_order="desc")
```
```php theme={null}
'endpoint', 'is_active' => true]);
$searchResults = listTools(['search' => 'customer', 'sort_by' => 'execution_count']);
?>
```
### Performance Considerations
* **Pagination**: Use appropriate page sizes (default 12, max 100)
* **Filtering**: Apply filters to reduce response size
* **Caching**: Consider caching results for frequently accessed tool lists
* **Search**: Use specific search terms for better performance
# Initiate Outbound Call
Source: https://docs.burki.dev/api-reference/webhooks/initiate-call
POST /calls/initiate
Initiates an outbound call from an assistant to a specified phone number.
This endpoint is protected and requires authentication.
This endpoint is used to programmatically initiate an outbound call from one of your AI assistants to an external phone number. It is a system endpoint that you call from your own application logic, not a webhook for an external service.
When you call this endpoint, Burki instructs your telephony provider (Twilio, Telnyx, or Vonage) to place a call. The provider then makes a request to your webhook, passing along the parameters you provide here as metadata. This allows the system to route the call to the correct assistant and begin the conversation.