Update agent
Send only the fields you are changing. Each save is a new revision.
Nested objects (voice, end_call, voicemail, background_sound, analysis) are replaced whole, and so are the tools list and the flow graph, so send the complete object. behavior is the exception: it merges field by field, and behavior.pass_through (words that never interrupt the agent) replaces the whole list you send.
To refuse a stale edit, add "if_revision" with the revision you read. If someone saved the agent in between, you get a 409 and nothing changes.
{"archived": true} stops new calls without deleting the agent, and {"archived": false} brings it back. Changes apply from the next call; calls already queued or running keep the version they started with.
Authorizations
Body
How the agent takes turns with the caller, and whether it knows the date. Unlike other nested blocks, PATCH merges it field by field: omitted fields keep their current value and {} changes nothing; a sent pass_through replaces the whole list. null resets it to the defaults (interruptions normal, adaptive_interruptions true, pass_through [], date_awareness true).
The agent's booking window: which days 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), 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.
The phone number this agent's outbound calls ring from when the call, or its campaign, does not choose one. Resolution is fixed: the call's (or campaign's) phone_number_id or pool_id, else this, else the workspace's default pool, else the workspace's own number, else the Mirai shared line (only for a workspace with no number that can place calls). A number set here dials through its own provider connection (India destinations only) and is re-checked before every call: if it can no longer call, calls fail with 409 not_ready and campaigns pause, never falling back to the shared line. null unsets it. Kept across a rollback.
Per-agent switches for platform behaviour still being tuned, by name. Each reaches the worker as a call variable of the same name, under the call's own variables: a variable the call supplies wins for that call. A switch the agent does not name keeps the platform's setting. Optional; {} or null clears every switch, and a PATCH replaces the whole object.
Other languages callers may speak. Speech recognition listens for them as well as the primary language. Optional; the primary language is never repeated here. Entries are reduced to their base code (gu-IN is saved as gu; or is accepted for od), duplicates and the primary language are dropped, and at most 4 remain. A PATCH replaces the whole list; [] or null clears it.
4hi, en, gu, mr, bn, ta, te, kn, ml, pa, od Response
The updated agent