Skip to main content
PATCH
Update agent
For a workflow-owned agent, update ordinary voice, technical and analysis settings here; edit instructions, bindings and the Before/During/After document through Save workflow.

Choosing the model

model chooses which model the agent runs on: gemini-3.1-flash-live, gemini-3.8-live or gpt-live, or null to return the agent to automatic. voice still works on its own, exactly as before.
Each model speaks with its own family of voices, and the two Gemini models share one list. So between gemini-3.1-flash-live, gemini-3.8-live and automatic the voice does not change, and model alone is enough. Moving to or from gpt-live changes the voice too, so send voice with it, one of that model’s voices:
  • model alone across the two families is 400 WORKFLOW_SETTINGS_MODEL_INVALID, and the message lists the voices to choose from.
  • A model and a voice of different families are the same 400, naming what to change.
  • voice alone still names its family: a gpt-live voice moves the agent to gpt-live (dropping a pinned Gemini model), and a Gemini voice moves it back, automatic.
  • gpt-live does not read temperature, vad_stop_secs, vad_start_secs or vad_confidence, and cannot be used on a type: "flow" agent; sending those with it is refused.
  • On the Gemini models a temperature below 0.3 is stored and returned as you sent it, and the agent speaks as if it were 0.3: at lower values a call sometimes opened on a word or two and a pause before the greeting.
  • engine, engine_voice and live_model are not fields: sending one is 400 WORKFLOW_SETTINGS_REQUEST_INVALID.
The response carries the choice as model and what it resolves to as resolved_model.

Idle reminders

idle_reminder_count (0–3) has the agent ask a silent caller whether they are still there before silence_timeout_secs hangs up, and idle_reminder_text is the line it says (null for a short default in the call’s language). See Idle reminders.
A value the settings cannot hold — "agent_speaks_first": "yes", "language": "xx", a temperature of 3 — answers 422 WORKFLOW_SETTINGS_REQUEST_INVALID with one issues[] entry per field at fault, each saying what the field takes. Every such field is named in the one answer, and nothing is saved. Native webhook and legacy graph fields are rejected for workflow owners, and the refusal names them. A body carrying webhook_url, webhook_events, webhook_headers, system_prompt, flow_config or tools — or any field an agent simply does not have — answers 400 WORKFLOW_SETTINGS_REQUEST_INVALID (it was 422; creating an agent already answered 400) with an issues[] entry per field at fault, each with code field_unknown (it was settings_request_invalid), a JSON pointer such as /webhook_url or /bogus, and the place that field moved to — and, in the same answer, an entry for every value beside it the settings cannot hold:
Nothing is written when a body is refused this way. Read Agent settings, then send the exact original updated_at:
The timestamp is optional on the public API for existing partial-update compatibility; dashboard and chat workflow edits require it. A supplied stale value returns 409 and changes nothing. Review the newer settings before retrying—never silently refresh the token and overwrite. Publishing moves this timestamp. Recording which version an agent runs writes the agent row, so an updated_at read before Publish workflow is stale as soon as the publish succeeds, and sending it here answers 409 WORKFLOW_SETTINGS_CONFLICT with nobody else involved. The publish response carries settings_updated_at, which is the new token: send that as expected_updated_at and the create → save → check → publish → change-a-setting sequence needs no extra read. language changes the language the agent speaks and listens for on calls, on every kind of agent: he, en, ar, ru, fr, es, de, it, pt, nl, tr, pl, uk, hi, ja, ko, zh, or multi for an agent that answers in the caller’s language (see Languages). The locale spellings he-IL and iw are accepted and stored as he, and en-US and en-GB as en — the same spellings Create Agent takes. The dashboard’s Call language control in Agent settings writes the same field, and a dashboard save leaves it as it is unless that control was changed — it used to set every prompt agent back to Hebrew.
Each extraction_parameters entry may carry a type — text (the default), number, yes_no or date — which decides what the extracted value is on the call: a number comes back as a JSON number, a yes/no as a JSON boolean, a date as YYYY-MM-DD, worked out from the day of the call when the caller said “tomorrow”, “next Sunday”, “three months ago” or a date with no year (see how a date is read). It is optional and additive: an entry saved without one behaves exactly as it always has. Any other value is rejected: 422 WORKFLOW_SETTINGS_REQUEST_INVALID for a workflow agent, 400 BAD_REQUEST for a prompt or flow agent. Read the values back as extracted_data on Get Call. greeting_message is editable here for every agent kind, workflow agents included: it is the line the agent opens the call with when agent_speaks_first is true, said word for word in the agent’s language — a voice of the second family (Keren, Eitan, …) can still put it in slightly different words. {{FirstName}} in it is filled in with the first name from the call’s variables or the lead’s stored name, and when there is none it is left out together with the space before it: "Hi {{FirstName}}, this is Dana." opens as Hi Noa, this is Dana. or Hi, this is Dana. {{Hi|Hello|Hey}} says one of its options, picked once per call (Random variations). null clears it so the agent opens in its own words. On a flow agent the start node’s own opening overrides it. It can also be sent when the agent is created (Create Agent). Missing fields stay unchanged. Explicit false, zero and permitted null are preserved. Body size is limited to 600000 UTF-8 bytes. A settings save uses the existing validated snapshot-promotion pipeline; accepted calls keep their exact snapshots. It does not change or publish the workflow document, reactivate a disabled agent unless explicitly requested, or enable an unready call runtime. On an agent created before the workflow engine (type: "prompt" or "flow"), webhook_headers replaces the stored headers with the map you send (null clears them) and is write-only: this response, like every read, carries configured_webhook_header_names — the names, never a value. Leave webhook_headers out and the stored headers are kept. For a workflow agent the response is the workflow Agent object: type: "workflow", with system_prompt, flow_config, webhook_url, webhook_events, webhook_headers and tools absent rather than empty — see Get Agent.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Path Parameters

id
string<uuid>
required

Body

application/json
expected_updated_at
string<date-time>

Workflow settings CAS token from the original GET /agents/{id}/settings or Agent response. Do not replace a stale token by silently re-reading.

name
string
description
string
system_prompt
string

Legacy agents only. Random variations: {{Hi|Hello|Hey}} (two or more options separated by |) says one option, picked once per call; see Random variations.

flow_config
object

Replace the agent's flow graph (only valid when type='flow'). Each successful update writes a new flow_versions row, deduped by SHA-256 of the canonical JSON. type itself is immutable and rejected if present in the body.

voice
enum<string>

The persona the agent speaks in. Sent on its own it still works exactly as before: a voice belongs to one family, so naming one chooses the family. There is no separate engine field, and engine / engine_voice are rejected if you send them. Keren, Eitan, Hila, Ido, Boaz, Tali, Erez, Efrat are the voices of gpt-live, available to every workspace. Agents on these voices handle their own turn-taking and expressiveness, so temperature, vad_stop_secs, vad_start_secs and vad_confidence are rejected on them, and they cannot be used on a type='flow' agent. Any other name returns 400 listing every voice you may use. Naming a voice from the other family MOVES the agent onto it, and a pinned Gemini model is dropped on the way (the agent is then gpt-live; moving back leaves it automatic). The move is lossless for the voice in both directions: the Gemini voice is kept aside while the agent is on gpt-live, so switching back restores it.

Available options:
Michal,
Yonatan,
David,
Rachel,
Gil,
Noa,
Maya,
Adam,
Shira,
Avigail,
Amir,
Liat,
Omer,
Tamar,
Tom,
Benny,
Nir,
Natan,
Yael,
Dvora,
Yosef,
Shir,
Anat,
Ariel,
Roi,
Shlomo,
Dana,
Alon,
Ruth,
Yuval,
Keren,
Eitan,
Hila,
Ido,
Boaz,
Tali,
Erez,
Efrat
model
enum<string> | null

Choose the voice model. gemini-3.1-flash-live or gemini-3.8-live pins a Gemini model, null returns the agent to automatic, and gpt-live selects GPT Live. Each model speaks with its own family of voices, and the two Gemini models share one list. Changing between gemini-3.1-flash-live, gemini-3.8-live and automatic keeps the voice. Moving to or from gpt-live also changes the voice, so send voice with it, one of that model's voices; model alone across the two families is 400 and lists the voices to choose from. A model and a voice of different families are 400 too. Settings that gpt-live does not read (temperature, vad_*) are refused with it, and it cannot be used on a type='flow' agent.

Available options:
gemini-3.1-flash-live,
gemini-3.8-live,
gpt-live
background_sound
enum<string> | null

Ambient background sound mixed under the agent's voice during calls. Null means silent (default).

Available options:
call_center,
open_office,
cafe,
outdoor
background_sound_volume
number
default:0.3

Volume of the background sound, 0.0–0.6. Capped to protect turn-taking.

Required range: 0 <= x <= 0.6
language
enum<string>

One of the call languages (he, en, ar, ru, fr, es, de, it, pt, nl, tr, pl, uk, hi, ja, ko, zh), or multi for a multilingual agent that answers in the caller's language. he-IL and iw are stored as he, en-US and en-GB as en.

Available options:
he,
en,
ar,
ru,
fr,
es,
de,
it,
pt,
nl,
tr,
pl,
uk,
hi,
ja,
ko,
zh,
multi,
he-IL,
iw,
en-US,
en-GB
temperature
number

How varied the agent's wording is. On the Gemini voices a value below 0.3 is stored and returned as you sent it, and the agent speaks as if it were 0.3: lower values sometimes made a call open on a word or two and a pause. The expressive voices do not take it.

Required range: 0 <= x <= 2
greeting_message
string | null

The line the agent opens the call with when agent_speaks_first is true, said word for word (a second-family voice can still word it slightly differently), with {{FirstName}} filled in from the call's variables or the lead's name, or left out with the space before it. Send null to clear it. Random variations: {{Hi|Hello|Hey}} (two or more options separated by |) says one option, picked once per call; see Random variations. A workflow agent's line may read a Before-call step's result, {{before.<step_id>.|}}; see Opening line from a Before step.

agent_speaks_first
boolean
is_active
boolean
lead_memory_enabled
boolean
noise_cancellation_enabled
boolean
extraction_parameters
any
vad_stop_secs
number
Required range: 0.05 <= x <= 5
vad_start_secs
number
Required range: 0.05 <= x <= 2
vad_confidence
number
Required range: 0 <= x <= 1
silence_timeout_secs
number
Required range: 10 <= x <= 900
idle_reminder_count
any
idle_reminder_text
any
max_continuous_speech_secs
number
Required range: 0 <= x <= 300
max_call_duration_secs
number
Required range: 0 <= x <= 3600
webhook_url
string<uri> | null
webhook_events
enum<string>[]
Available options:
call.started,
call.answered,
call.ended,
call.failed,
call.no_answer,
call.dnc_blocked,
transcript.ready,
call.analyzed
webhook_headers
object | null

Legacy agents only. Write-only: it replaces the stored headers and is never returned; the response carries configured_webhook_header_names. Leave it out to keep the stored headers. Custom HTTP headers sent with every webhook delivery for this agent (e.g. an auth token). Flat name → string-value map, or null to clear. Headers that would override request routing or HTTP framing (Host, Content-Length, Transfer-Encoding, Connection, Expect, Keep-Alive, TE, Trailer, Upgrade, Proxy-*) are rejected with 400.

Example:

Response

The updated agent. A workflow agent answers with the workflow Agent object, without system_prompt, flow_config, webhook_url, webhook_events, webhook_headers or tools. A legacy agent answers with its fields, webhook header names in configured_webhook_header_names and never a value.

id
string<uuid>
name
string
execution_version
enum<string>
read-only

Authoring ownership assigned by Yappr. workflow_v1 can be an unpublished draft; this field does not prove call readiness.

Available options:
legacy,
workflow_v1
published_workflow_revision_id
string<uuid> | null
read-only

Null until explicit workflow publication. Cannot be set by agent create or PATCH.

live
boolean
read-only

On GET /agents and GET /agents/{id}: whether callers reach this agent right now. A workflow_v1 agent is live when it is active and a version of its workflow is published; a saved draft that was never published is not live. A legacy agent (type prompt or flow) has nothing to publish and is live whenever it is active, with published_workflow_revision_id null. A deactivated agent is never live. For a workflow_v1 agent the dashboard's "Live · version N" badge is the same fact; N is published.version on GET /agents/{id}/workflow.

inbound
object
read-only

On GET /agents and GET /agents/{id}: what routes inbound calls to this agent - active phone numbers that answer with it (as the number's agent or the other half of its A/B split) and active SIP endpoints. Empty lists mean no inbound route reaches it; the member is absent when the routes could not be read. A key reads each route as its scopes allow: without phone_numbers:search a number's number and friendly_name are null, and without sip_endpoints:read an endpoint's name is null.

type
enum<string>

workflow on every agent with execution_version: workflow_v1 — the only kind that can be created. Such an agent also omits system_prompt, flow_config, webhook_url, webhook_events, webhook_headers and tools: it has no such things, and returning them as nulls read as the retired kind. Its instructions, graph and tool bindings are its workflow document — GET /agents/{id}/workflow. prompt and flow appear only on agents created before the workflow engine, which keep their old response shape unchanged. prompt (legacy): a single system_prompt drives the call; the LLM decides when to call attached tools. flow: the call is driven by a flow_config graph. type is immutable post-create.

Available options:
workflow,
prompt,
flow
flow_config
object | null

Legacy agents only, and absent from a workflow agent's response. The flow graph. Required when type='flow', must be omitted/null when type='prompt'.

system_prompt
string | null

Legacy agents only, and absent from a workflow agent's response — read its workflow document instead. {{VariableName}} is filled in from the call's variables. Random variations: {{Hi|Hello|Hey}} (two or more options separated by |) says one option, picked once per call; see Random variations.

description
string | null
voice
enum<string>

The persona the agent speaks in. A voice belongs to one of Yappr's two voice families, so naming a voice on its own still chooses the family — and with it the model family (model below) — and no existing client has to change. There is no separate engine field, and engine / engine_voice are rejected if you send them. Keren, Eitan, Hila, Ido, Boaz, Tali, Erez, Efrat are the voices of gpt-live, available to every workspace. Agents on these voices handle their own turn-taking and expressiveness, so temperature, vad_stop_secs, vad_start_secs and vad_confidence are rejected on them, and they cannot be used on a type='flow' agent. The other thirty are the voices of both Gemini models. Any other name returns 400 listing every voice you may use. Always the name the agent actually speaks in, whichever family it is on.

Available options:
Michal,
Yonatan,
David,
Rachel,
Gil,
Noa,
Maya,
Adam,
Shira,
Avigail,
Amir,
Liat,
Omer,
Tamar,
Tom,
Benny,
Nir,
Natan,
Yael,
Dvora,
Yosef,
Shir,
Anat,
Ariel,
Roi,
Shlomo,
Dana,
Alon,
Ruth,
Yuval,
Keren,
Eitan,
Hila,
Ido,
Boaz,
Tali,
Erez,
Efrat
model
enum<string> | null

The voice model the agent runs on, as you chose it; null means automatic, where Yappr picks by the agent's language (see resolved_model). See the models page for what each model is and how to choose. A gpt-live agent always reads gpt-live: GPT Live is chosen through its voices, never automatically.

Available options:
gemini-3.1-flash-live,
gemini-3.8-live,
gpt-live
resolved_model
enum<string>
read-only

The model the agent's calls run on: model when it is set, and otherwise what automatic chooses today for the agent's language (Hebrew and multilingual run gemini-3.1-flash-live, every other language gemini-3.8-live). Read-only, and it can change for an automatic agent when Yappr moves a language to a better model; a pinned model never moves.

Available options:
gemini-3.1-flash-live,
gemini-3.8-live,
gpt-live
background_sound
enum<string> | null

Ambient background sound mixed under the agent's voice during calls. Null means silent (default).

Available options:
call_center,
open_office,
cafe,
outdoor
background_sound_volume
number
default:0.3

Volume of the background sound, 0.0–0.6. Capped to protect turn-taking.

Required range: 0 <= x <= 0.6
language
enum<string>

The language the agent speaks and listens for on calls, as its short code, or multi for a multilingual agent that answers in the caller's language and switches when they do. Each language gets its own speaking rules (politeness, gender, how numbers, dates and prices are said). See the Languages page.

Available options:
he,
en,
ar,
ru,
fr,
es,
de,
it,
pt,
nl,
tr,
pl,
uk,
hi,
ja,
ko,
zh,
multi
temperature
number

How varied the agent's wording is. On the Gemini voices a value below 0.3 is stored and returned as you sent it, and the agent speaks as if it were 0.3: lower values sometimes made a call open on a word or two and a pause. The expressive voices do not take it.

Required range: 0 <= x <= 2
greeting_message
string | null

The line the agent opens the call with when agent_speaks_first is true, said word for word in the agent's language (a second-family voice can still word it slightly differently). On the standard voices a caller's brief hello in the first few seconds of the line does not interrupt it; a caller who keeps talking over it does. {{FirstName}} is filled in from the call's variables or the lead's name, or left out with the space before it when there is none. Send null to clear it and let the agent open in its own words. Editable here and on PATCH /agents/{id}; on a flow agent the start node's own opening overrides it. Random variations: {{Hi|Hello|Hey}} (two or more options separated by |) says one option, picked once per call; see Random variations. On a workflow agent it may read a Before-call step's result, {{before.<step_id>.|}}, said word for word: the value, else the fallback, else the rest of the line; Check and Publish refuse a step the workflow does not have. See Opening line from a Before step.

agent_speaks_first
boolean
vad_stop_secs
number
default:0.5

Seconds of silence that end the caller's turn. Lower answers sooner and cuts a caller who pauses mid-thought; higher waits longer before replying. Below 0.5 s the agent may start answering half a sentence.

Required range: 0.05 <= x <= 5
vad_start_secs
number
default:0.2

Seconds of speech that count as the caller starting to talk. It also sets how much of the moment before that is kept, so an interruption does not lose the caller's first word.

Required range: 0.05 <= x <= 2
vad_confidence
number
default:0.7

How sure the agent must be that it is hearing speech. Below the 0.7 default the agent reacts more eagerly — useful for quiet callers, and more likely to react to background noise on a noisy line. Two things read it, and they read it differently. How readily the caller can cut the agent off mid-sentence follows the number continuously, so any change moves it. Where the caller's turn begins and ends is a two-position switch either side of the 0.7 default: at or above it the agent is deliberate about deciding the caller has started or stopped, below it eager. For that half, 0.05 and 0.69 behave identically, and so do 0.70 and 1.00 — tune it by moving across the default, not by nudging it.

Required range: 0 <= x <= 1
silence_timeout_secs
number
default:60

Seconds of caller silence before auto-hangup. Prevents idle calls wasting credits.

Required range: 10 <= x <= 900
idle_reminder_count
integer
default:0

How many times the agent asks a silent caller whether they are still there before silence_timeout_secs hangs up. Each reminder is said when the silence timeout runs out, and the timer starts again after it; the caller speaking resets the count. 0 (the default) hangs up at the first timeout without asking. See Idle reminders.

Required range: 0 <= x <= 3
idle_reminder_text
string | null

What the agent says as each reminder, word for word. Null (the default) is a short line in the call's language ("Hello, are you still there?" in English); for a language without a fixed line, the agent asks in its own words in the call's language. A blank string is stored as null.

Maximum string length: 200
max_continuous_speech_secs
number
default:120

Max seconds one party can speak non-stop before auto-hangup. Catches answering machines. 0 = disabled.

Required range: 0 <= x <= 300
max_call_duration_secs
number
default:600

Hard cap on total call duration regardless of activity. 0 = no cap of the agent's own; the platform still ends the call after 65 minutes (3900 s), with the disconnect reason Platform call limit reached. A call is never billed for more than this plus 60 seconds; with 0, or once a call is transferred to a person, billing stops at 4 hours.

Required range: 0 <= x <= 3600
lead_memory_enabled
boolean
default:true

When true, the matched lead's long-term memory context is injected into the system prompt at call time.

noise_cancellation_enabled
boolean
is_active
boolean
webhook_url
string<uri> | null

Legacy agents only. Read whole by a key with tools:read (or tools:update), the rule GET /deliveries/{id} applies to the same destination; for any other key, and in a campaign or eval-case embed, it is scheme://host[:port] and webhook_url_path_withheld is true. Send the whole URL to change it.

webhook_url_path_withheld
boolean
read-only

Legacy agents only. True when webhook_url is shortened to scheme://host[:port] because the reading key holds neither tools:read nor tools:update.

webhook_events
enum<string>[]

Events posted to webhook_url as {event, timestamp, agent_id, company_id, call_id, data}. data on every call event carries direction, status, from_number, to_number, duration_seconds, started_at (when the call was placed), answered_at (when its audio came up; absent until it did) and recording_started_at (when its recording began - a transcript's start and end are milliseconds from here; null until the recording is saved, on a browser call, and on older calls recorded before the field was added), all ISO 8601 with a +00:00 offset as GET /calls/{id} writes them; plus disposition, summary, transcript and extracted_data once they exist. transcript.ready and call.analyzed are sent after the recording is saved, so they carry recording_started_at on a phone call. No event carries the conversation while the call is still going. call.failed and call.no_answer carry data.hangup_cause when the cause is known. For a call from a number in your own Telnyx account that Telnyx refused while it rang, call.failed has data.hangup_cause:

  • carrier_rejected — Telnyx refused the call (SIP 401, 403 or 407).
  • carrier_number_invalid — Telnyx could not route the number called (SIP 404, 484 or 604).

The SIP code is not in the webhook; the carrier account keeps the last one in last_error.sip_code. One Telnyx refused before it rang sends no webhook when POST /calls was placing it (the request answers 422); from the queue it sends call.failed with data.error_reason instead.

Available options:
call.started,
call.answered,
call.ended,
call.failed,
call.no_answer,
call.dnc_blocked,
transcript.ready,
call.analyzed
configured_webhook_header_names
string[]
read-only

Legacy agents only, and absent from a workflow agent's response. The names of the stored webhook_headers, sorted; the values are never returned, to any key.

Example:
tools
object[]
read-only

Legacy agents only, and absent from a workflow agent's response. The agent's tools in execution order, each as GET /tools/{id} answers it plus execution_order, for a key that holds tools:read; without it each is {id, name} only.

extraction_parameters
object[]

AI extraction parameters — after each call, values are extracted from the transcript, stored on the call log and included in the call.analyzed webhook payload. Read them back on a call as extracted_data in GET /calls/{id}.

created_at
string<date-time>
updated_at
string<date-time>