Skip to main content
1

Create a draft agent

POST /api/v1/agents always creates a draft. Send a title and a questions array. The response contains the id.
2

Map each field to a question type

response_type sets how the spoken answer is parsed and stored.options is an array of strings. The agent reads the list aloud and maps the answer to the closest option.Omit number_format to accept both integers and decimals.Add an optional name to a question to give it a stable snake_case key. Branch conditions reference questions by name.
3

Add scripts

Set scripts on the agent body.outro_incomplete requires outro.
4

Add conditional branches

  1. Add an entry to the top-level branches array with a unique id and a condition.
  2. Set branch_id on every question in that branch. Those questions are asked only when the condition is true.
A condition supports these fields:Set exactly one of equals or present.
5

Configure screening

end_call_values is an array of strings set on a question. When the answer to that question matches one of the values, the agent ends the call and marks the conversation screened_out. Screened-out calls count as successes, not failures, and appear separately in analytics.
6

Publish

PUT /api/v1/agents/{agent_id} always publishes. Send the complete agent body, not just the changed fields.
On validation failure the API returns 400 with a validation_issues array. Fix every issue before retrying. Partial saves are not supported.
See Agent config schema for every field.