Skip to main content
PATCH
Update agent
Updates an existing agent. Only the fields you send are changed.

Overview

The update agent endpoint allows you to modify agent configuration without recreating it. This supports partial updates, meaning you only need to provide the fields you want to change. This is useful for refining agent questions, updating evaluation criteria, or adjusting voice settings.

Use Cases

  • Refine Questions: Change what the agent asks
  • Adjust Settings: Change voice, duration or type
  • Update Criteria: Modify evaluation criteria as requirements evolve
  • Iterative Improvement: Continuously improve agent configurations

Partial Updates

You can update any combination of fields:

Fields That Can Be Updated

  • name: Agent display name
  • type: Agent type (ONLINE, PHONE)
  • focus: Agent focus (GENERIC, SCREENING, OUTREACH, LANGUAGE_TEST)
  • language: language code for the call
  • duration: call duration in minutes (max 180)
  • questions: the questions to ask
  • instructions: additional instructions for the agent
  • voiceId: the voice the agent speaks with
  • cefrLevel: CEFR level for language test agents
  • backgroundSound: Ambient background sound during calls (OFFICE or OFF)
  • flow: Conversation flow graph — see Custom Agents below
  • guardrails, contextConfig, analyticsConfig, callConfig: Custom agent configuration
  • overrides: The company the agent speaks as — see Speaking for another company below

Custom Agents

Sending a flow replaces the agent’s conversation design, and makes the agent custom if it was not already. See Create Agent for the shape of a flow and the rules that come with it — in particular, block ids and schemaVersion are assigned by InstaView and must not be sent, so a flow read back from the API has to have them stripped before it is sent again. A configuration-only update like this one requires an agent that is already custom — see the third rule below:
Three rules apply once an agent is custom:
  • focus cannot be changed (422). A custom agent’s prompts come from its flow; there is no template focus to move it to. Create a new agent instead.
  • The flow cannot be cleared (422). Sending "flow": null on a custom agent would leave it with nothing to run.
  • guardrails, contextConfig, analyticsConfig and callConfig apply only to custom agents (422 otherwise). Send a flow in the same request to make the agent custom.

Updating analytics

analyticsConfig replaces the stored config outright; send null to remove it.
Replaced means replaced, one level down as well. The update is partial at the top level — an analyticsConfig you omit is left alone — but the object itself is not merged into the stored one. Sending analyticsConfig with only extractionTargets in it clears scoringCriteria, outcomes, outputTags and capture, because they are absent from the config you sent.
To change one list, send the others back unchanged. Read the agent first and edit the analyticsConfig you get back — its keys round-trip, so resending it is safe.
What happens to per-question scoring — which lives under question ids you never see — depends on which of the two fields you send:
Replacing a flow re-mints every question id, so scoring that referred to the old questions cannot survive as-is. Restate importance / weight inline on the questions of the flow you send, exactly as you would on create — otherwise the questions in the new flow are asked but not scored.
A flow you send is validated here exactly as it is on create, and an invalid one is rejected with a 422 carrying an errors array — every problem found, each with the path of the block it is on. See Flow Validation Errors for the shape. The three rules above are 422s too, but carry a message only, so treat errors as optional.

Updating retries and calling hours

callConfig is the one config field that behaves the opposite way to the others. It is merged, and it is not nullable. retryPolicy and callWindow are each replaced when you send them and left alone when you do not, so changing the attempt count does not mean restating the window:
A callWindow you do send is replaced whole — send days, start, end and timezoneAnchor together. Half a window is how an agent ends up dialling at an hour nobody chose.
"callConfig": null is rejected. Every agent dials on some schedule, so there is no “no policy” state to clear to — the only thing it could mean is falling back to the legacy business_hours preset, which is not something to end up with by accident. To widen or narrow the schedule, send the window you want.
Sending a callWindow is also how an agent still reporting "mode": "business_hours" is moved onto a real window. See Retries and calling hours for the fields and for what the timezone anchor decides.

Company Isolation

You can only update agents that belong to your API key’s company. Attempting to update an agent from another company will result in a 403 Forbidden error.

Phone Agents

If you update an agent’s type to PHONE, you must also provide a companyPhoneNumberId in the same request.

Background Sound

Use backgroundSound to change the ambient noise played during calls for this agent. Accepted values are "OFFICE" (subtle office noise, default) and "OFF" (silence).
Omitting backgroundSound keeps the existing value on the agent.

Speaking for Another Company

overrides changes the company the agent introduces itself as. See Create Agent for what it does and does not change.
overrides is replaced whole, not merged — the same contract as guardrails and contextConfig. Sending only companyName drops any stored companyDescription, and the agent falls back to your own company’s description for it. Send every field you want kept, every time.
Send "overrides": null to clear them; the agent goes back to speaking as your own company. Omitting the field leaves the stored overrides alone.

Impact on Existing Conversations

Updating an agent does not affect conversations already scheduled or completed. Only conversations created after the update use the new configuration.

Error Scenarios

  • 404 Not Found: Agent doesn’t exist or has been deleted
  • 403 Forbidden: Agent belongs to a different company
  • 400 Bad Request: Invalid field values or validation errors

Agents Resource Guide

Learn about agent configuration best practices

Get Agent

Retrieve current agent configuration

Create Agent

Create new agents

Authorizations

Authorization
string
header
required

API key for authentication using Bearer scheme

Path Parameters

id
string<uuid>
required

Query Parameters

companyId
string

Required for ATS API keys to specify which company to access. Ignored for standard company API keys.

Body

application/json
name
string

Agent name

Required string length: 2 - 100
Example:

"Updated Senior Developer Interview"

type
enum<string>

Type of the agent

Available options:
UNDEFINED,
ONLINE,
PHONE
Example:

"ONLINE"

focus
enum<string>

Focus of the agent. GENERIC: job-optional, for a conversation that is not about a particular job. SCREENING: a hiring screen against a job's requirements. OUTREACH: a first call to gauge interest. LANGUAGE_TEST: language proficiency. Cannot be sent together with flow, and cannot be changed at all on an existing custom agent (422).

Available options:
GENERIC,
SCREENING,
OUTREACH,
LANGUAGE_TEST
Example:

"SCREENING"

questions
string[]

List of questions for the conversation

Maximum array length: 50
Example:
instructions
string

Additional instructions for the conversation

Maximum string length: 2000
Example:

"Focus on system design and communication"

language
enum<string>

Language of the conversation

Available options:
UNDEFINED,
EN,
JA,
ZH,
DE,
HI,
FR,
KO,
PT,
IT,
ES,
ID,
NL,
TR,
FIL,
PL,
SV,
BG,
RO,
AR,
CS,
EL,
FI,
HR,
MS,
SK,
DA,
TA,
UK,
RU,
HU,
NO,
VI
Example:

"EN"

duration
number

Duration of the conversation in minutes

Required range: 1 <= x <= 180
Example:

45

voiceId
enum<string> | null

Voice ID the agent speaks with (null clears existing voice)

Available options:
ALEX,
PETER,
MIRIAM,
SUE,
VIERA,
CASANDRA,
SILVIA,
MICHAEL,
LUKE,
EMMA,
SARAH,
EVA
cefrLevel
enum<string>

CEFR level for language test agents

Available options:
A1,
A2,
B1,
B2,
C1,
C2
Example:

"B2"

companyPhoneNumberId
string<uuid>

ID of the company phone number assignment to use for calls from this agent (CompanyPhoneNumber.id)

Example:

"123e4567-e89b-12d3-a456-426614174000"

metadata
object

Custom metadata (merged with existing metadata, max 10KB, 5 levels deep, 50 keys)

Example:
backgroundSound
enum<string> | null

Ambient background sound during calls (OFFICE or OFF). Omit to keep the existing value, set null to clear override.

Available options:
OFF,
OFFICE
Example:

"OFFICE"

flow
object | null

Conversation flow graph, replacing the stored one. Providing it makes the agent custom. A flow read back from this API must have its ids and schema version stripped before it is sent again. Clearing the flow of a custom agent (null) is rejected with 422.

guardrails
object | null

Rules the agent must obey during the call. Replaces the stored rules; send null or an empty array to remove them all. Accepted only for an agent that is custom after this update — otherwise rejected with 422.

contextConfig
object | null

Who the agent is and what the call is about. Replaces the stored context; send null to clear it. Accepted only for an agent that is custom after this update — otherwise rejected with 422.

analyticsConfig
object | null

What to extract, score, decide and label after every call. Replaces the stored config; send null to remove it. Replacing the flow re-mints its question ids, so an update that sends a flow WITHOUT an analyticsConfig re-points the stored per-question scoring at the new questions and leaves the rest of the config alone.

callConfig
object

How persistently and when the agent calls. Merged rather than replaced — retryPolicy and callWindow are each replaced when sent and kept when omitted — and not nullable, unlike guardrails, contextConfig and analyticsConfig. Sending a callWindow is also how an agent still reporting business_hours is moved onto a real window.

overrides
object | null

Who this agent says it is on a call. Replaces the stored overrides wholesale rather than merging field by field, exactly like guardrails and contextConfig — so send every field you want kept, and a field you omit reverts to the company your API key belongs to. Send null to clear them entirely.

Response

id
string<uuid>
required

Agent ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

name
string
required

Agent name

Example:

"Frontend Developer Interview"

type
enum<string>
required

Type of the agent

Available options:
UNDEFINED,
ONLINE,
PHONE
Example:

"ONLINE"

focus
enum<string>
required

Focus of the agent. GENERIC: job-optional, for a conversation that is not about a particular job. SCREENING: a hiring screen against a job's requirements. OUTREACH: a first call to gauge interest. LANGUAGE_TEST: language proficiency.

Available options:
GENERIC,
SCREENING,
OUTREACH,
LANGUAGE_TEST
Example:

"SCREENING"

language
enum<string>
required

Language of the conversation

Available options:
UNDEFINED,
EN,
JA,
ZH,
DE,
HI,
FR,
KO,
PT,
IT,
ES,
ID,
NL,
TR,
FIL,
PL,
SV,
BG,
RO,
AR,
CS,
EL,
FI,
HR,
MS,
SK,
DA,
TA,
UK,
RU,
HU,
NO,
VI
Example:

"EN"

duration
number
required

Duration of the conversation in minutes

Example:

30

createdAt
string<date-time>
required

Agent creation timestamp (UTC)

Example:

"2025-11-20T10:30:00Z"

updatedAt
string<date-time>
required

Agent last update timestamp (UTC)

Example:

"2025-11-20T10:30:00Z"

questions
string[]

List of questions for the conversation

Example:
instructions
string

Additional instructions for the conversation

Example:

"Focus on technical skills and previous project experience"

voiceId
enum<string>

Voice ID the agent speaks with

Available options:
ALEX,
PETER,
MIRIAM,
SUE,
VIERA,
CASANDRA,
SILVIA,
MICHAEL,
LUKE,
EMMA,
SARAH,
EVA
companyId
string<uuid>

Company ID that owns the agent

Example:

"123e4567-e89b-12d3-a456-426614174000"

metadata
object

Custom metadata

Example:
cefrLevel
enum<string>

CEFR level for language test agents

Available options:
A1,
A2,
B1,
B2,
C1,
C2
Example:

"B1"

backgroundSound
enum<string> | null

Ambient background sound during calls (OFFICE or OFF). Null means no override is set and the default applies.

Available options:
OFF,
OFFICE
Example:

"OFFICE"

flow
object | null

Conversation flow graph, as designed. Null on a template agent.

guardrails
object | null

Rules the agent must obey during the call. Custom agents only; null on a template agent.

contextConfig
object | null

Who the agent is and what the call is about. Custom agents only; null on a template agent.

analyticsConfig
object | null

What the agent extracts, scores, decides and labels after every call. Custom agents only — null on a template agent. Per-question scoring is folded back onto the flow's looping questions rather than returned as an id-keyed map — the same form the write accepts.

callConfig
object

How persistently and when the agent calls. Custom agents only. An agent created before calling windows were configurable reports a callWindow.mode of business_hours.

overrides
object | null

Who this agent says it is on a call, when that is not the company your API key belongs to. Null when it speaks as your own company.