Prerequisites: API key
Overview
Agent configuration consists of:- Root-level parameters -
nameandkb_idare set at the root level of create/update requests config object- Contains conversation style, voice settings, timing controls, and integrations
name when creating) - the system uses sensible defaults for any omitted fields.
Status Management: Agent status (
paused, deployed, disabled) cannot be updated directly through the update endpoint. Use the dedicated endpoints: Deploy Agent, Pause Agent, or Delete Agent.Update Behavior: Agent updates are partial. Omit a root-level field or
config field to leave it unchanged. Use null only for fields or containers that are documented below as nullable or clearable.Agent-Level Parameters
These parameters are set at the root level of agent create/update requests, not inside theconfig object:
Configuration Structure
When creating or updating an agent, the request structure is:config object contains all behavioral parameters. The kb_id parameter is set at the root level to assign a knowledge base to the agent.
Core Conversation Parameters
Dynamic Variables
dynamic_variables are call-scoped values that you pass when a session starts. They are not stored in the saved agent config, but you can reference them from both your prompt and greeting with bare placeholders such as {{customer_name}} or {{order_id}}.
dynamic_variables through the Web SDK, the API reference, or from webhooks.inbound_call before an inbound call starts. For inbound-call webhook payloads, response examples, and testing, use the dedicated Webhooks guide.
dynamic_variablesmust be a flat object ofstring,number, orbooleanvalues.- Omitted variables are allowed.
- Variables that are not referenced by the runtime prompt or greeting are ignored.
- If the same placeholder appears multiple times, the same runtime value is used for every occurrence.
agent_overrides instead of dynamic_variables. agent_overrides keeps the same nested shape as agent config, but currently supports only a limited runtime subset under tts_params.
Voice & Speech Parameters
TTS Parameters
Thetts_params object contains voice-specific settings:
On update, omit individual
tts_params fields to preserve their current values. For nullable TTS fields such as voice_id, model, language, temperature, top_p, dictionary_id, and dictionary_version, pass null to clear that specific value.
Automatic Language Detection: Set
language: "auto" to automatically detect the user’s language from speech recognition. This requires a multilingual model (e.g., voiceai-tts-multilingual-v1-latest). The agent will match the TTS language to the detected speech language in real-time.Interruption & Turn-Taking
Timing & Endpointing
These parameters control when the system detects speech start/end and manages conversation flow:Agent Control Permissions
Phone Number
On update, set
phone_number: null to unassign the current phone number. Empty strings are also normalized to null.
Call Recording
On update, omit
recording_enabled to leave it unchanged. Set recording_enabled: false to disable recording for future calls. Existing recordings are unaffected.
Use the Call Recording endpoint to check recording status and retrieve the merged MP3 URL for completed calls.
Integrations
Webhooks
On update, omit
webhooks to leave existing webhook config unchanged. Set webhooks: null to clear all webhook configuration, or clear individual webhook containers as described below.
This section is the configuration-field reference. For webhook payload examples, signature verification, test endpoints, and inbound-call response behavior, use the dedicated Webhooks guide.
The webhooks object contains three distinct configs. webhooks.events, webhooks.inbound_call, and webhooks.tools use different contracts:
webhooks.events[]supportssecret(write-only on create/update) andhas_secret(read-only on fetch), with fan-out across enabled endpoints.webhooks.inbound_callsupportssecret(write-only on create/update) andhas_secret(read-only on fetch). Use it to returndynamic_variablesand optionalagent_overridesfor personalization only, not routing.webhooks.toolsdefine outbound API calls and do not usesecret.
Event webhook fields (webhooks.events[])
Inbound: Voice.ai sends POST requests to each enabled event webhook URL. Configure secret for HMAC signature verification.
On update, omit
webhooks.events to preserve the current list, set webhooks.events: null to clear it, or pass a full array to replace it. Within a replacement array, omitted events[].secret values are preserved only for entries whose url exactly matches an existing endpoint, events[].secret: null clears that endpoint’s signing secret, duplicate URLs are rejected, and events[].events: [] means that endpoint receives all event types.
Inbound call webhook fields (webhooks.inbound_call)
Inbound: Voice.ai sends POST requests to your URL before an inbound call starts. Use this webhook to personalize a call with dynamic_variables and optional runtime agent_overrides. Do not use inbound_call to route calls to different agents.
On update, omit
webhooks.inbound_call to preserve it, set webhooks.inbound_call: null to remove it, and set inbound_call.secret: null to clear only the signing secret.
Tool webhook fields (webhooks.tools)
Outbound: Voice.ai calls your API. Configure auth_type, auth_token, or headers to authenticate the outbound request to your endpoint.
On update, omit
webhooks.tools to leave the current tool list unchanged, set webhooks.tools: null to clear all tools, or pass a new array to replace the current list.
MCP Servers
On update, omit
mcp_servers to preserve the current server list, set mcp_servers: null to clear it, or pass a new array to replace the current list.
Each MCP server configuration includes:
name(string, required) - Human-readable namedescription(string, optional) - Server descriptionurl(string, required) - MCP server endpoint URLauth_type(string, optional) - Authentication type:"none","bearer_token","api_key","custom_headers". Default:"none"auth_token(string, optional) - Token for authenticationheaders(object, optional) - Custom HTTP headers
Examples
Basic Configuration
Advanced Configuration
Multilingual Agent with Auto Language Detection
Configuration for Fast-Paced Conversations
Configuration for Formal Conversations
Configuration with Webhooks
This example shows the saved agent config shape only. For webhook request/response payload examples and test flows, see the dedicated Webhooks guide.webhooks.events[] and webhooks.inbound_call use secret for HMAC verification of inbound requests. webhooks.tools use auth_type/auth_token for outbound API authentication. See the Webhooks guide for payload examples and the Web SDK guide for SDK usage.
Best Practices
- Start Simple: Begin with just
promptandgreeting, then add parameters as needed - Test Incrementally: Adjust one parameter at a time to understand its effect
- Timing Parameters: Fine-tune
min_silence_durationandvad_activation_thresholdbased on your use case - Interruptions: Set
allow_interruptions: falsefor formal scenarios,truefor casual conversations - Voice Selection: Use
voice_idintts_paramsto select a specific voice from your available voices - Call Duration: Set
max_call_duration_secondsto prevent runaway costs or enforce time limits
Next Steps
- Agent Quickstart - Create your first agent
- Webhooks - Receive event, inbound call, and tool webhook notifications
- Web SDK - Pass
dynamic_variablesand connect from the browser - Phone Number Management - Assign phone numbers
- Model Context Protocol - Connect MCP servers
- API Reference - Complete API documentation