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
- Add an entry to the top-level
branchesarray with a uniqueidand acondition. - Set
branch_idon every question in that branch. Those questions are asked only when the condition is true.
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.