Skip to main content
PATCH
Patch Agent
Send only what you want to change.
Giving the transcriber, model or voice a backup provider? See Backups - each one takes a slightly different shape.

Updating the greeting

To switch to an AI-generated opening with a five-second delay:
This preserves the saved Custom message. To switch back, send {"greeting":{"mode":"custom"}}; the saved message must be nonblank. To update the words too, include message in that same block. Omitted greeting fields keep their current values on PATCH. delay_ms: null resets the delay to zero. There is no separate greeting prompt; update system_prompt to guide generated openings. The delay must be an integer from 0 to 120000 milliseconds. See Greeting fields for mode requirements and what happens if the caller speaks first.

Choosing the version

?version=3 changes that version — the mirror of GET /v1/agents/{id}?version=3, so reading and writing take the same selector.
A published version’s configuration is refused with 409 version_immutable, whether you name it by number or as live: it is frozen, which is what makes a rollback exact.

Renaming a version

label and notes go in the same body. They name the version the change lands on, and they are not configuration, so they apply to any version - a published one included:
Send them alongside configuration to change and name a draft in one request. Omit it and the change goes to your working draft — see below.

Where the change lands

On the agent’s working draft — and which one that is has to be unambiguous, because we will not guess on your behalf: Nothing you change here reaches a caller until you publish that draft and make it live.
An agent may hold as many drafts as you like, and your colleagues create them from the dashboard too. If more than one is open we refuse rather than pick — writing your change into somebody else’s unreviewed draft would succeed silently, and you would have no way to tell.
The error carries the labels, so you can choose without a second call. Then name it:
That form never guesses — use it whenever you know which draft you want.

Editing safely from two places

Send If-Match with the document_revision you read, and a write composed against a stale copy is refused with 409 version_document_stale rather than overwriting someone else’s change.
Leave it out and your change applies to whatever the draft holds now — usually what you want for a script changing one field.

Channel instructions

system_prompt is the shared prompt. channel_prompts holds optional additions for phone_inbound, phone_outbound, web_voice, web_chat, and whatsapp. Only the matching addition is appended during a conversation. Each addition allows up to 65,536 characters.
On PATCH, omitted keys are unchanged; a null or blank value removes that channel’s addition. channel_prompts: null clears all additions. An empty object changes nothing. Instructions are versioned with the rest of the configuration and do not become live merely by saving.

Background sound

A soft looping sound played behind the agent on phone calls, like an office or a café. Two optional fields on conversation, read and written by create, update and get:
Sending null for either field resets it to its default. It plays only on phone calls: inbound, outbound, API and campaign calls. It never plays on a web call. There is no per-call override, so POST /v1/calls uses whatever the version answering the call is set to.
Uploaded sounds are chosen in the dashboard. A write accepts only "none" and the ten ids above, and the API has no endpoints to upload, list or delete sounds. An agent set to an uploaded sound reads back with that sound’s id in background_sound. Sending that same id back unchanged is accepted, so reading an agent and writing it straight back stays safe. Any other value returns 400 document_invalid. See Background Sound.

Voicemail

What the agent does when a voicemail box answers an outbound call. Two optional fields on call, read and written by create, update and get:
Sending null for either field resets it to its default. Inbound calls are never affected. Whatever voicemail_action says, every outbound call is checked, and one a voicemail box answered ends as voicemail with a voicemail object on the call. See Voicemail.

Default Instructions

default_instructions is optional. Send only the rules you want to change: the rest stay as they are, and leaving a rule out is never an error.
Switches take true or false. Pick-one rules take one of their values, or null to turn them off. Rules that start with voice_ apply to calls, rules that start with chat_ apply to chats, and the rest apply to both.

Authorizations

Authorization
string
header
required

Your API key as a Bearer token, e.g. Authorization: Bearer vk_….

Headers

If-Match
string | null

The document_revision this change was composed against. Omit to write against whatever the draft holds now.

Path Parameters

agent_id
string
required

The agent's id, as GET /v1/agents returns it.

Query Parameters

version
string | null

Which version to change, by number — e.g. 3. Omit to change the agent's working draft. A published version is refused: its configuration is frozen.

Body

application/json

Change any setting. Merge-patch: objects merge, lists replace whole, null clears.

Applies to the agent's newest draft. If the newest version is published, a draft is branched from the live version first — a published version's configuration cannot change.

name
string | null

What the agent is called. Yours to choose; never spoken to a caller.

Required string length: 1 - 255
system_prompt
string | null

The agent's instructions. Naming a tool as <tool_name> here is what ARMS it: a tool the prompt never names is never called, and naming one the version does not have is refused on save.

Required string length: 1 - 65536
channel_prompts
Channel Prompts · object | null

Optional instructions added to system_prompt for the active channel. PATCH merges keys; null removes a channel. Blank uses shared instructions only.

default_instructions
DefaultInstructions · object | null

Optional. Ready-made behaviour rules added before system_prompt. Send only the rules you want to change: the rest stay as they are. On create, anything you leave out takes its default.

greeting
Greeting · object | null

What the agent says first.

language
LanguageConfig · object | null

The language it opens in, which others it may switch to, and what triggers a switch.

transcriber
Transcriber · object | null

Speech recognition. GET /v1/transcribers lists valid model values.

model
Model · object | null

The LLM. GET /v1/models lists valid model and provider values.

voice
Voice · object | null

Text to speech. GET /v1/voices lists valid voice_id values, and a voice that cannot speak language.default is refused on save.

conversation
Conversation · object | null

Turn-taking, interruption and noise handling — how it behaves in the back-and-forth.

call
CallSettings · object | null

Limits on the call itself: maximum duration, silence timeout, and what ends it.

inbound
Inbound · object | null

Lines for inbound calls that cannot be handled normally.

builtin_tools
BuiltinTools · object | null

The tools Vocily ships: end the call, hold, transfer, send a WhatsApp template. Each still has to be armed from the prompt.

variables
RuntimeVariable · object[] | null

The {{placeholders}} the prompt and tools can use. Reference them namespaced as {{custom.your_key}}, never bare. Sending this list replaces the whole set.

knowledge_base_ids
string[] | null

Which knowledge bases this agent can search, from GET /v1/knowledge-bases. This list IS the attachment — there is no separate attach endpoint, and sending it replaces the whole set. An id this workspace does not hold is refused, not ignored.

analysis_group_ids
string[] | null

Which custom-analysis groups run after each call, from GET /v1/custom-analysis. The list is the attachment, and an id this workspace does not hold is refused, not ignored.

memory
Memory · object | null

Whether the agent remembers callers between calls, and what it is allowed to remember.

numbers
Numbers · object | null

Which phone and WhatsApp numbers this agent answers on. GET /v1/numbers and GET /v1/whatsapp/numbers list what you may use.

label
string | null

Short name for the version this change lands on. Editable on a published version too.

Maximum string length: 80
notes
string | null

Longer free text for the version this change lands on. Editable on a published version too.

Response

The version the change landed on, after it — the working draft, or the one ?version= named.

One agent at one version — the response of every agent read, create and update.

A request body is this same object minus the read-only fields, so what you send is what you read back.

id
string
required

The agent's id. Stable across every version.

name
string
required

What the agent is called. Yours to choose; never spoken to a caller.

version
integer
required

Which version this body describes. 0-based, and the identity you use in /versions/{n} and ?version=.

version_id
string
required

This version's uuid. Pass it as agent_version_id on POST /v1/calls to pin a call to this exact version — that field takes a uuid, not a number.

is_published
boolean
required

True once frozen. A published version's configuration can never be edited again; branch a draft instead.

is_live
boolean
required

True if this is the version answering calls right now.

latest_version
integer
required

The highest version number this agent has.

document_revision
integer
required

This version's edit counter. Echo it back as If-Match on your next write and the write becomes a compare-and-set, so you cannot silently overwrite an edit made between your read and your write.

created_at
string<date-time>
required

When this version was created (UTC, ISO 8601).

updated_at
string<date-time>
required

When this version was last edited (UTC, ISO 8601).

live_version
integer | null

Which version is live, if any. null means the agent is off air and answers nothing.

label
string | null

Short name for this version, e.g. Shorter greeting. Editable even after publishing — it is metadata, not configuration.

notes
string | null

Longer free text about this version.

blocked_reasons
string[]

Why this version cannot be made live, if it cannot — e.g. it pins a model that has since been retired. Empty means it can go live.

system_prompt
string | null

The agent's instructions. Naming a tool as <tool_name> here is what ARMS it: a tool the prompt never names is never called, and naming one the version does not have is refused on save.

channel_prompts
Channel Prompts · object

Additional instructions appended to the shared system_prompt only in the matching conversation context.

default_instructions
DefaultInstructions · object | null

Ready-made behaviour rules added before system_prompt. See each field. A rule that is missing or null is off.

greeting
Greeting · object | null

What the agent says first.

language
LanguageConfig · object | null

The language it opens in, which others it may switch to, and what triggers a switch.

transcriber
Transcriber · object | null

Speech recognition. GET /v1/transcribers lists valid model values.

model
Model · object | null

The LLM. GET /v1/models lists valid model and provider values.

voice
Voice · object | null

Text to speech. GET /v1/voices lists valid voice_id values, and a voice that cannot speak language.default is refused on save.

conversation
Conversation · object | null

Turn-taking, interruption and noise handling — how it behaves in the back-and-forth.

call
CallSettings · object | null

Limits on the call itself: maximum duration, silence timeout, and what ends it.

inbound
Inbound · object | null

Lines for inbound calls that cannot be handled normally.

builtin_tools
BuiltinTools · object | null

The tools Vocily ships: end the call, hold, transfer, send a WhatsApp template. Each still has to be armed from the prompt.

variables
RuntimeVariable · object[]

The {{placeholders}} the prompt and tools can use. Reference them namespaced as {{custom.your_key}}, never bare.

knowledge_base_ids
string[]

Which knowledge bases this agent can search, from GET /v1/knowledge-bases. This list IS the attachment — there is no separate attach endpoint, and sending it replaces the whole set. An id this workspace does not hold is refused, not ignored.

analysis_group_ids
string[]

Which custom-analysis groups run after each call, from GET /v1/custom-analysis. Same rule as knowledge_base_ids: the list is the attachment, and an id this workspace does not hold is refused, not ignored.

memory
Memory · object | null

Whether the agent remembers callers between calls, and what it is allowed to remember.

numbers
Numbers · object | null

Which phone and WhatsApp numbers this agent answers on. GET /v1/numbers and GET /v1/whatsapp/numbers list what you may use.

dashboard_url
string | null

Deep link to this agent in the Vocily dashboard, for your own UI to link out to.