Create the agent
POST /api/v1/voice_agents needs only a name. Set the instructions, the
greeting and the language in the same request so the agent is usable right away:
voice_config block is optional and takes the same keys and values as the
settings below. Every value is validated as if you had set it with the settings
endpoints; if one is rejected, nothing is created and the API returns 422. Keep
the returned id - all settings and tools use it.
Afterwards:
- Add tools with
POST /api/v2/tools, using the agent’sidasagent_id. See Tools. - Connect a phone number in the dashboard. See AI numbers.
What you configure where
A voice agent has three settings groups. Each has a read, an update and a schema endpoint under/api/v1/voice_agents/{id}/concerns/<group>.
If you only want an agent that answers calls with your instructions, you need the
prompts group. The defaults in voice_config work without changes.
How a change works
- Read the schema -
GET .../concerns/<group>/schema. It lists every setting (fields[].key), its type (value_type), its limits (validation) and, for selection fields, the accepted values (option_sets[field.options_ref]). - Write one setting -
PATCH .../concerns/<group>with{ "key": "<fields[].key>", "value": <value> }. One setting per request. - Check
effects- the response lists every related setting the server changed along with yours, with the old and the new value.valuesis the resulting configuration.
affects_schema: true
(conversation type, language model, speech model, voice): the options of related
fields change with it.
Recipes
Each recipe changes one setting of an existing agent. Agent789 in the
examples; responses are shortened.
Set the greeting
The greeting is the first sentence the agent says when it picks up, up to 1000 characters.%%caller_number%%, %%called_number%% and
%%forwarded_from_number%% are replaced with the live call’s numbers.
Change the instructions and the language
prompts.user_prompt holds the instructions: the agent’s role, what it should
find out and how it should answer. The prompting guide explains
how to write them.
prompts.transcription_locale is the language the agent listens in: de, en,
fr and so on, or xx when callers may speak different languages. The full list
is in option_sets["prompts.transcription_locales"].
Pick a voice
Voices are listed inoption_sets["voice_config.tts_voices"], each with a
label, provider, gender and a short description:
value exactly as listed:
voice_config.tts to that provider’s model, and effects shows it. To use a
different model of the same provider (for example ElevenLabs Flash instead of
v3 Conversational), set voice_config.tts afterwards; the voice is kept.
Choosing a model of another provider resets the voice to that provider’s default.
Choose the language model
The language model writes the agent’s answers. Pick avalue from
option_sets["voice_config.llm_models"]:
voice_config.response_style (0 to 1) controls how varied the answers are: lower
is more predictable, higher is more creative.
Switch the conversation type
voice_config.model_mode decides how the agent processes speech:
Tune response time and call limits
voice_config.response_time_ms is how long the agent waits after the caller
stops speaking before it answers. The field’s presets are 0 (fast), 700
(balanced) and 1200 (patient).
-1 for “off”
(the field’s validation.disabled_value). Any other value must be at least
validation.min. To end calls after ten minutes:
Settings reference
The schema decides what an agent accepts right now. These tables explain what each setting does.Prompt settings (prompts)
option_sets["prompts.variable_suggestions"] lists the variables, such as
%%caller_number%%, you can use in the instructions.
Voice settings (voice_config)
Fields you cannot write
A field whosecapabilities.writable is false is rejected on write.
capabilities.reason says why:
Concurrent edits: If-Match
Every read and write returns a revision. Send it as the If-Match header on a
PATCH. If the configuration changed since that read, for example in the
dashboard, nothing is saved and the API returns 409 with the current
revision and values. If-Match is optional; without it the write always
applies.
Rejected values
A value the schema does not allow returns422, with errors keyed by field.
values and revision show the unchanged state: