Skip to main content
POST
Publish agent

Authorizations

Authorization
string
header
required

Your workspace secret key, sk_live_ followed by 32 hex characters. Create one in the console under Developers.

Path Parameters

agent_id
string
required

The agent's id (agt_…).

Body

application/json
if_revision
integer
required
Required range: x >= 1

Response

Published

behavior
object
required

How the agent takes turns with the caller, whether it knows the date, and what it does when the caller goes quiet. Always present; agents saved before this block or one of its fields existed read back with the defaults.

features
object
required

The switches this agent sets, as the worker reads them: every value a string (call_budget_secs as its digits). Always returned: {} when there are none, including on agents saved before the field existed.

keyterms
string[]
required

Words speech recognition listens for on this agent's calls. Always returned; [] when there are none.

Maximum array length: 100
Required string length: 1 - 50
secondary_languages
enum<string>[]
required

Other languages callers may speak. Speech recognition listens for them as well as the primary language. Optional; the primary language is never repeated here. Always returned; [] when there are none.

Maximum array length: 4
Available options:
hi,
en,
gu,
mr,
bn,
ta,
te,
kn,
ml,
pa,
od
analysis
null | object

Replace the whole analysis block. Omit output_schema to remove structured extraction. Requires enabled=true to run.

archived
boolean
default:false

Archive to block new calls; false restores availability subject to draft validation. Accepted call snapshots remain unchanged.

background_sound
Available options:
off,
office
booking
object

The agent's booking window: which days, and at what hours, 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, or today after closing time) with that day's opening hours, 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. Present only on agents that have one.

calls_from
null | object

The phone number this agent's outbound calls ring from when the call or its campaign does not choose one; null when unset (the workspace's default pool, else its own number, else the Mirai shared line).

created_at
string<date-time>
draft
boolean
default:false

Drafts may have empty prompt or greeting, but cannot run calls.

emit_processed_webhook
boolean
default:true

Send call.processed when this agent has post-call tools, analysis or a flow (a flow agent's event carries the call's flow outcome). Set false to turn the event off.

emit_queued_webhook
boolean
default:false
end_call
object
first_message
string
Maximum string length: 500
flow
object

Present only on a flow agent.

handoff
object

Live human takeover settings: the number a person dials in from to take one of this agent's calls over. Present only on agents that have one.

id
string
inbound_pre_call_timeout_ms
integer

How long an incoming phone call waits for this agent's pre-call tools before it is answered, in milliseconds (1000-10000). The caller hears ringing meanwhile; the call is answered as soon as the tools finish. When the wait runs out, the tool still running is a timeout and its on_failure decides: continue answers without its values, abort leaves the call unanswered (not charged). Each tool still stops at its own timeout_ms. Unset (or null) is the default of about 2000. Applies to calls to your phone numbers (Plivo, SIP trunk, managed numbers) only; outbound calls are unaffected and WhatsApp calls keep about 2 seconds. Absent when unset.

Required range: 1000 <= x <= 10000
input_schema
object | null

Replace the entire input declaration. Null removes it and restores legacy string variables.

keyterm_spellings
object

GET /v2/agents/{id} only: how the agent's keyterms are written in the scripts of its calls' languages, which its calls also listen for, by term (as stored in keyterms) and then language tag, for example {"Zeton": {"hi-IN": ["ज़ेटन"]}}. Speech recognition on an Indian-language call writes English and brand words in that language's script, so a term typed in English letters is also listened for in the script of the agent's language and secondary_languages (Hindi, Marathi, Gujarati, Punjabi, Bengali, Tamil, Telugu, Kannada, Malayalam, Odia), and a term typed in an Indian script is also listened for in English letters when English is one of them. At most 2 spellings per language. Written automatically in the background a short while after the agent is saved, never stored on the agent and not editable; absent while there are none.

knowledge
object

Present only on an agent with knowledge attached.

language
string
Minimum string length: 1
max_duration_secs
integer
default:300
Required range: 30 <= x <= 1800
name
string
Minimum string length: 1
object
any
revision
integer
system_prompt
string
Maximum string length: 48000
tools
object[]

At most 40 tools: 10 pre_call, 20 on_call, 10 post_call. A PATCH replaces the whole list; null empties it. To edit one tool, use PUT/DELETE /v2/agents/{id}/tools/{name}.

Maximum array length: 40
updated_at
string<date-time>
voice
object
voicemail
object
warnings
object[]

Lines this agent speaks that will come out wrong on calls, worked out each time the agent is read and never stored; absent when there are none. Today one kind: romanized_speech, a line in an Indian language other than Hindi typed in English letters, which the voice reads with English sounds. Checked: first_message and system_prompt's quoted lines (not on a flow agent, which does not use them), end_call.message when end_call is enabled, voicemail.message when voicemail.action is message, every flow node's greeting and the lines its prompt quotes.

Maximum array length: 20