Update an agent
Updates one or more fields on an agent’s draft. To avoid overwriting concurrent edits, send the version you last read in the If-Match header; if it is out of date the request returns 409 with the current version and agent state so you can refetch and retry. Changes apply to the draft only and take effect once you publish the agent.
Authorizations
Flowyte secret API key (Authorization: Bearer flowyte_sk_live_…). Scope-gated; is scoped to your organization — a key can never reach another tenant. The listed scopes in each operation's apiKey requirement are the scopes that key must hold. The tokenUrl is nominal: keys are minted in the dashboard.
Headers
Optimistic-concurrency token: the agent version the client last read. The server increments agents.version on every mutation; if If-Match is stale, the mutation is rejected 409 with the current version + current agent state so the client can rebase (refetch + re-apply pending field edits + retry).
Path Parameters
Body
Partial Agent (autosave). Any subset of editable Agent fields.
draft, published code_switch, single_language Open enum (future sms|whatsapp|email slot in with no schema change).
voice, chat Per-agent call-control guardrails (max duration, idle/no-response handling). All fields optional; an empty object means the runtime applies platform defaults (max call 10 min, idle reminders on, end on no response).
Per-agent open/closed schedule so the agent knows whether it is currently OPEN or CLOSED, speaks the correct local time, and applies the configured after-hours behavior. Empty object = unconfigured (no hours constraint; the agent behaves as always available). A timezone is required whenever a schedule is set — even at 24/7 — so the spoken local time is correct.
Per-channel overrides of the shared agent config, keyed by channel ("voice" | "chat"). Only set the keys that should DIFFER from the shared config. The common use is a chat-specific opening line, e.g. { "chat": { "enabled": true, "greeting": "Hi! How can I help?" } } — an empty/omitted chat greeting inherits the agent's main (voice) greeting. See ChannelPolicy for the per-channel fields.
The customer's saved average ticket / job value in CENTS, used by the Observe summary to compute recovered revenue. null = unset (the read layer falls back to its conservative default).