Save a flow on an agent
Replaces the agent’s graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed.
Each save is a new agent revision, so you can roll it back. if_revision refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as invalid_flow with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.
Authorizations
Query Parameters
Body
A node graph: the conversation as nodes with their own instructions and transitions between them. See x-semantics.flow for the rules.
Response
The agent, now node-based
Other languages callers may speak. Speech recognition listens for them as well as the primary language. Optional; the primary language is never repeated here. Always returned; [] when there are none.
4hi, en, gu, mr, bn, ta, te, kn, ml, pa, od The agent's booking window: which days, and at what hours, a caller may book. With date awareness on, every day a caller names is marked as bookable or not before the agent replies (after the window, a closed weekday or date, already past, or today after closing time) with that day's opening hours, the agent is told the window in its prompt and offered the nearest bookable day, so it never confirms a day you cannot take. Absent when not set. A PATCH replaces the whole block (omitted fields take their defaults); null removes it. Present only on agents that have one.
How long an incoming phone call waits for this agent's pre-call tools before it is answered, in milliseconds (1000-10000). The caller hears ringing meanwhile; the call is answered as soon as the tools finish. When the wait runs out, the tool still running is a timeout and its on_failure decides: continue answers without its values, abort leaves the call unanswered (not charged). Each tool still stops at its own timeout_ms. Unset (or null) is the default of about 2000. Applies to calls to your phone numbers (Plivo, SIP trunk, managed numbers) only; outbound calls are unaffected and WhatsApp calls keep about 2 seconds. Absent when unset.
1000 <= x <= 10000GET /v2/agents/{id} only: how the agent's keyterms are written in the scripts of its calls' languages, which its calls also listen for, by term (as stored in keyterms) and then language tag, for example {"Zeton": {"hi-IN": ["ज़ेटन"]}}. Speech recognition on an Indian-language call writes English and brand words in that language's script, so a term typed in English letters is also listened for in the script of the agent's language and secondary_languages (Hindi, Marathi, Gujarati, Punjabi, Bengali, Tamil, Telugu, Kannada, Malayalam, Odia), and a term typed in an Indian script is also listened for in English letters when English is one of them. At most 2 spellings per language. Written automatically in the background a short while after the agent is saved, never stored on the agent and not editable; absent while there are none.
Lines this agent speaks that will come out wrong on calls, worked out each time the agent is read and never stored; absent when there are none. Today one kind: romanized_speech, a line in an Indian language other than Hindi typed in English letters, which the voice reads with English sounds. Checked: first_message and system_prompt's quoted lines (not on a flow agent, which does not use them), end_call.message when end_call is enabled, voicemail.message when voicemail.action is message, every flow node's greeting and the lines its prompt quotes.
20