Replaces the agent’s graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed.
Each save is a new agent revision, so you can roll it back. if_revision refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as invalid_flow with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.
PUT
/
v2
/
agents
/
{agent_id}
/
flow
Save a flow on an agent
curl --request PUT \ --url https://sandbox.voice.miraiminds.co/v2/agents/{agent_id}/flow \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "nodes": [ { "id": "persona", "type": "globalNode", "data": { "name": "Persona and rules", "prompt": "You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first." } }, { "id": "identity", "type": "startCall", "data": { "name": "Confirm the customer", "greeting": "नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?", "prompt": "You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm." } }, { "id": "offer_slot", "type": "agentNode", "data": { "name": "Book the service", "prompt": "Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.", "extraction_enabled": true, "extraction_variables": [ { "name": "preferred_day", "type": "string", "prompt": "The day the customer chose for the service, in their words, for example Saturday or 20 August." }, { "name": "callback_time", "type": "string", "prompt": "When the customer asked to be called back, in their words. Empty if they did not ask." } ] } }, { "id": "goodbye", "type": "endCall", "data": { "name": "Close", "prompt": "In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.", "allow_interrupt": false } }, { "id": "not_customer", "type": "endCall", "data": { "name": "Wrong person", "prompt": "Apologise for the trouble and say goodbye. Do not mention the car or the service." } } ], "edges": [ { "id": "e1", "source": "identity", "target": "offer_slot", "data": { "label": "confirmed_identity", "condition": "The caller confirmed they are the customer you asked for." } }, { "id": "e2", "source": "identity", "target": "not_customer", "data": { "label": "wrong_person", "condition": "The caller is someone else, or says it is a wrong number." } }, { "id": "e3", "source": "offer_slot", "target": "goodbye", "data": { "label": "slot_booked", "condition": "The customer named a day for the service and you read it back." } }, { "id": "e4", "source": "offer_slot", "target": "goodbye", "data": { "label": "not_now", "condition": "The customer does not want to book now, and you have asked once when to call back if they were busy." } } ]}'
import requests
url = "https://sandbox.voice.miraiminds.co/v2/agents/{agent_id}/flow"
payload = {
"nodes": [
{
"id": "persona",
"type": "globalNode",
"data": {
"name": "Persona and rules",
"prompt": "You are Ashu, a service advisor at Mirai Motors.
Speak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.
Say one or two short sentences, then listen.
Never promise a discount, a price or a pickup.
When the condition of one of your functions is met, call it at once without saying anything first."
}
},
{
"id": "identity",
"type": "startCall",
"data": {
"name": "Confirm the customer",
"greeting": "नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?",
"prompt": "You have asked whether you are speaking with {{name}}. Wait for the answer.
If they confirm, call confirmed_identity.
If it is someone else or a wrong number, call wrong_person.
Do not mention the car or the service before they confirm."
}
},
{
"id": "offer_slot",
"type": "agentNode",
"data": {
"name": "Book the service",
"prompt": "Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.
When they name a day, read it back once and call slot_booked.
If they are busy, ask once when to call them back, then call not_now.
If they do not want to book at all, call not_now.",
"extraction_enabled": True,
"extraction_variables": [
{
"name": "preferred_day",
"type": "string",
"prompt": "The day the customer chose for the service, in their words, for example Saturday or 20 August."
},
{
"name": "callback_time",
"type": "string",
"prompt": "When the customer asked to be called back, in their words. Empty if they did not ask."
}
]
}
},
{
"id": "goodbye",
"type": "endCall",
"data": {
"name": "Close",
"prompt": "In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.",
"allow_interrupt": False
}
},
{
"id": "not_customer",
"type": "endCall",
"data": {
"name": "Wrong person",
"prompt": "Apologise for the trouble and say goodbye. Do not mention the car or the service."
}
}
],
"edges": [
{
"id": "e1",
"source": "identity",
"target": "offer_slot",
"data": {
"label": "confirmed_identity",
"condition": "The caller confirmed they are the customer you asked for."
}
},
{
"id": "e2",
"source": "identity",
"target": "not_customer",
"data": {
"label": "wrong_person",
"condition": "The caller is someone else, or says it is a wrong number."
}
},
{
"id": "e3",
"source": "offer_slot",
"target": "goodbye",
"data": {
"label": "slot_booked",
"condition": "The customer named a day for the service and you read it back."
}
},
{
"id": "e4",
"source": "offer_slot",
"target": "goodbye",
"data": {
"label": "not_now",
"condition": "The customer does not want to book now, and you have asked once when to call back if they were busy."
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)
const url = 'https://sandbox.voice.miraiminds.co/v2/agents/{agent_id}/flow';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
nodes: [
{
id: 'persona',
type: 'globalNode',
data: {
name: 'Persona and rules',
prompt: 'You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first.'
}
},
{
id: 'identity',
type: 'startCall',
data: {
name: 'Confirm the customer',
greeting: 'नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?',
prompt: 'You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm.'
}
},
{
id: 'offer_slot',
type: 'agentNode',
data: {
name: 'Book the service',
prompt: 'Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.',
extraction_enabled: true,
extraction_variables: [
{
name: 'preferred_day',
type: 'string',
prompt: 'The day the customer chose for the service, in their words, for example Saturday or 20 August.'
},
{
name: 'callback_time',
type: 'string',
prompt: 'When the customer asked to be called back, in their words. Empty if they did not ask.'
}
]
}
},
{
id: 'goodbye',
type: 'endCall',
data: {
name: 'Close',
prompt: 'In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.',
allow_interrupt: false
}
},
{
id: 'not_customer',
type: 'endCall',
data: {
name: 'Wrong person',
prompt: 'Apologise for the trouble and say goodbye. Do not mention the car or the service.'
}
}
],
edges: [
{
id: 'e1',
source: 'identity',
target: 'offer_slot',
data: {
label: 'confirmed_identity',
condition: 'The caller confirmed they are the customer you asked for.'
}
},
{
id: 'e2',
source: 'identity',
target: 'not_customer',
data: {
label: 'wrong_person',
condition: 'The caller is someone else, or says it is a wrong number.'
}
},
{
id: 'e3',
source: 'offer_slot',
target: 'goodbye',
data: {
label: 'slot_booked',
condition: 'The customer named a day for the service and you read it back.'
}
},
{
id: 'e4',
source: 'offer_slot',
target: 'goodbye',
data: {
label: 'not_now',
condition: 'The customer does not want to book now, and you have asked once when to call back if they were busy.'
}
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
{ "revision": 5, "draft": false, "archived": false, "analysis": { "enabled": false }, "id": "agt_01K2M4P7QRSTVWXYZ0A1B2C3", "object": "agent", "name": "सर्विस रिमाइंडर", "system_prompt": "आप आशु हैं, मिराई मोटर्स के सर्विस एडवाइज़र. {{name}} जी की {{vehicle}} की सर्विस {{due_date}} को ड्यू है. हिंदी में बात करें, छोटे वाक्य बोलें, और ग्राहक से सर्विस की तारीख कन्फर्म करें.", "first_message": "नमस्ते, मैं आशु बोल रहा हूं मिराई मोटर्स से. एक मिनट है आपके पास?", "voice": { "voice_id": "ashu", "language": "hi" }, "language": "hi", "max_duration_secs": 300, "end_call": { "enabled": true, "message": "धन्यवाद, आपका दिन शुभ हो.", "confirm": true }, "voicemail": { "action": "hangup" }, "background_sound": { "sound": "off" }, "behavior": { "interruptions": "normal", "adaptive_interruptions": true, "pass_through": [], "date_awareness": true }, "secondary_languages": [ "en" ], "tools": [], "flow": { "nodes": [ { "id": "persona", "type": "globalNode", "data": { "name": "Persona and rules", "prompt": "You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first.", "is_start": false, "allow_interrupt": true, "add_global_prompt": true, "extraction_enabled": false, "extraction_variables": [] } }, { "id": "identity", "type": "startCall", "data": { "name": "Confirm the customer", "prompt": "You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm.", "greeting": "नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?", "is_start": true, "allow_interrupt": true, "add_global_prompt": true, "extraction_enabled": false, "extraction_variables": [] } }, { "id": "offer_slot", "type": "agentNode", "data": { "name": "Book the service", "prompt": "Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.", "is_start": false, "allow_interrupt": true, "add_global_prompt": true, "extraction_enabled": true, "extraction_variables": [ { "name": "preferred_day", "type": "string", "prompt": "The day the customer chose for the service, in their words, for example Saturday or 20 August." }, { "name": "callback_time", "type": "string", "prompt": "When the customer asked to be called back, in their words. Empty if they did not ask." } ] } }, { "id": "goodbye", "type": "endCall", "data": { "name": "Close", "prompt": "In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.", "is_start": false, "allow_interrupt": false, "add_global_prompt": true, "extraction_enabled": false, "extraction_variables": [] } }, { "id": "not_customer", "type": "endCall", "data": { "name": "Wrong person", "prompt": "Apologise for the trouble and say goodbye. Do not mention the car or the service.", "is_start": false, "allow_interrupt": true, "add_global_prompt": true, "extraction_enabled": false, "extraction_variables": [] } } ], "edges": [ { "id": "e1", "source": "identity", "target": "offer_slot", "data": { "label": "confirmed_identity", "condition": "The caller confirmed they are the customer you asked for." } }, { "id": "e2", "source": "identity", "target": "not_customer", "data": { "label": "wrong_person", "condition": "The caller is someone else, or says it is a wrong number." } }, { "id": "e3", "source": "offer_slot", "target": "goodbye", "data": { "label": "slot_booked", "condition": "The customer named a day for the service and you read it back." } }, { "id": "e4", "source": "offer_slot", "target": "goodbye", "data": { "label": "not_now", "condition": "The customer does not want to book now, and you have asked once when to call back if they were busy." } } ] }, "created_at": "2026-08-11T09:14:02Z", "updated_at": "2026-08-11T09:56:02Z"}
{
"details": [
{
"path": "flow.nodes[2].data.tools[0]",
"message": "node \"offer_slot\" offers tool \"check_slots\", which is not an on_call tool of this agent; add it with phase on_call or remove it from the node"
}
],
"error": "invalid_flow"
}
{
"error": {
"code": "conflict",
"message": "agent changed; read its current revision and retry"
}
}
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_…).
Query Parameters
if_revision
integer
required
Optional. The agent revision you read.
Required range: x >= 1
Body
application/json
A node graph: the conversation as nodes with their own instructions and transitions between them. See x-semantics.flow for the rules.
edges
object[]
required
Required array length: 1 - 40 elements
Show child attributes
nodes
object[]
required
Required array length: 2 - 20 elements
Show child attributes
viewport
any
Editor camera. Any JSON; stored and returned as sent.
Response
The agent, now node-based
behavior
object
required
How the agent takes turns with the caller, and whether it knows the date. Always present; agents saved before this block existed read back with the defaults.
Show child attributes
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.
Show child attributes
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.
Show child attributes
archived
boolean
default:false
Archive to block new calls; false restores availability subject to draft validation. Accepted call snapshots remain unchanged.
background_sound
enum<string>object
Available options:
off,
office
booking
object
The agent's booking window: which days 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), 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.
Show child attributes
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).
Show child attributes
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
Show child attributes
first_message
string
Maximum string length: 500
flow
object
Present only on a flow agent.
Show child attributes
id
string
input_schema
object | null
Replace the entire input declaration. Null removes it and restores legacy string variables.
Show child attributes
knowledge
object
Present only on an agent with knowledge attached.
Show child attributes
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
Show child attributes
updated_at
string<date-time>
voice
object
Show child attributes
voicemail
object
Show child attributes
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
Show child attributes
⌘I
Save a flow on an agent
curl --request PUT \ --url https://sandbox.voice.miraiminds.co/v2/agents/{agent_id}/flow \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "nodes": [ { "id": "persona", "type": "globalNode", "data": { "name": "Persona and rules", "prompt": "You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first." } }, { "id": "identity", "type": "startCall", "data": { "name": "Confirm the customer", "greeting": "नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?", "prompt": "You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm." } }, { "id": "offer_slot", "type": "agentNode", "data": { "name": "Book the service", "prompt": "Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.", "extraction_enabled": true, "extraction_variables": [ { "name": "preferred_day", "type": "string", "prompt": "The day the customer chose for the service, in their words, for example Saturday or 20 August." }, { "name": "callback_time", "type": "string", "prompt": "When the customer asked to be called back, in their words. Empty if they did not ask." } ] } }, { "id": "goodbye", "type": "endCall", "data": { "name": "Close", "prompt": "In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.", "allow_interrupt": false } }, { "id": "not_customer", "type": "endCall", "data": { "name": "Wrong person", "prompt": "Apologise for the trouble and say goodbye. Do not mention the car or the service." } } ], "edges": [ { "id": "e1", "source": "identity", "target": "offer_slot", "data": { "label": "confirmed_identity", "condition": "The caller confirmed they are the customer you asked for." } }, { "id": "e2", "source": "identity", "target": "not_customer", "data": { "label": "wrong_person", "condition": "The caller is someone else, or says it is a wrong number." } }, { "id": "e3", "source": "offer_slot", "target": "goodbye", "data": { "label": "slot_booked", "condition": "The customer named a day for the service and you read it back." } }, { "id": "e4", "source": "offer_slot", "target": "goodbye", "data": { "label": "not_now", "condition": "The customer does not want to book now, and you have asked once when to call back if they were busy." } } ]}'
import requests
url = "https://sandbox.voice.miraiminds.co/v2/agents/{agent_id}/flow"
payload = {
"nodes": [
{
"id": "persona",
"type": "globalNode",
"data": {
"name": "Persona and rules",
"prompt": "You are Ashu, a service advisor at Mirai Motors.
Speak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.
Say one or two short sentences, then listen.
Never promise a discount, a price or a pickup.
When the condition of one of your functions is met, call it at once without saying anything first."
}
},
{
"id": "identity",
"type": "startCall",
"data": {
"name": "Confirm the customer",
"greeting": "नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?",
"prompt": "You have asked whether you are speaking with {{name}}. Wait for the answer.
If they confirm, call confirmed_identity.
If it is someone else or a wrong number, call wrong_person.
Do not mention the car or the service before they confirm."
}
},
{
"id": "offer_slot",
"type": "agentNode",
"data": {
"name": "Book the service",
"prompt": "Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.
When they name a day, read it back once and call slot_booked.
If they are busy, ask once when to call them back, then call not_now.
If they do not want to book at all, call not_now.",
"extraction_enabled": True,
"extraction_variables": [
{
"name": "preferred_day",
"type": "string",
"prompt": "The day the customer chose for the service, in their words, for example Saturday or 20 August."
},
{
"name": "callback_time",
"type": "string",
"prompt": "When the customer asked to be called back, in their words. Empty if they did not ask."
}
]
}
},
{
"id": "goodbye",
"type": "endCall",
"data": {
"name": "Close",
"prompt": "In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.",
"allow_interrupt": False
}
},
{
"id": "not_customer",
"type": "endCall",
"data": {
"name": "Wrong person",
"prompt": "Apologise for the trouble and say goodbye. Do not mention the car or the service."
}
}
],
"edges": [
{
"id": "e1",
"source": "identity",
"target": "offer_slot",
"data": {
"label": "confirmed_identity",
"condition": "The caller confirmed they are the customer you asked for."
}
},
{
"id": "e2",
"source": "identity",
"target": "not_customer",
"data": {
"label": "wrong_person",
"condition": "The caller is someone else, or says it is a wrong number."
}
},
{
"id": "e3",
"source": "offer_slot",
"target": "goodbye",
"data": {
"label": "slot_booked",
"condition": "The customer named a day for the service and you read it back."
}
},
{
"id": "e4",
"source": "offer_slot",
"target": "goodbye",
"data": {
"label": "not_now",
"condition": "The customer does not want to book now, and you have asked once when to call back if they were busy."
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)
const url = 'https://sandbox.voice.miraiminds.co/v2/agents/{agent_id}/flow';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
nodes: [
{
id: 'persona',
type: 'globalNode',
data: {
name: 'Persona and rules',
prompt: 'You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first.'
}
},
{
id: 'identity',
type: 'startCall',
data: {
name: 'Confirm the customer',
greeting: 'नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?',
prompt: 'You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm.'
}
},
{
id: 'offer_slot',
type: 'agentNode',
data: {
name: 'Book the service',
prompt: 'Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.',
extraction_enabled: true,
extraction_variables: [
{
name: 'preferred_day',
type: 'string',
prompt: 'The day the customer chose for the service, in their words, for example Saturday or 20 August.'
},
{
name: 'callback_time',
type: 'string',
prompt: 'When the customer asked to be called back, in their words. Empty if they did not ask.'
}
]
}
},
{
id: 'goodbye',
type: 'endCall',
data: {
name: 'Close',
prompt: 'In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.',
allow_interrupt: false
}
},
{
id: 'not_customer',
type: 'endCall',
data: {
name: 'Wrong person',
prompt: 'Apologise for the trouble and say goodbye. Do not mention the car or the service.'
}
}
],
edges: [
{
id: 'e1',
source: 'identity',
target: 'offer_slot',
data: {
label: 'confirmed_identity',
condition: 'The caller confirmed they are the customer you asked for.'
}
},
{
id: 'e2',
source: 'identity',
target: 'not_customer',
data: {
label: 'wrong_person',
condition: 'The caller is someone else, or says it is a wrong number.'
}
},
{
id: 'e3',
source: 'offer_slot',
target: 'goodbye',
data: {
label: 'slot_booked',
condition: 'The customer named a day for the service and you read it back.'
}
},
{
id: 'e4',
source: 'offer_slot',
target: 'goodbye',
data: {
label: 'not_now',
condition: 'The customer does not want to book now, and you have asked once when to call back if they were busy.'
}
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
{ "revision": 5, "draft": false, "archived": false, "analysis": { "enabled": false }, "id": "agt_01K2M4P7QRSTVWXYZ0A1B2C3", "object": "agent", "name": "सर्विस रिमाइंडर", "system_prompt": "आप आशु हैं, मिराई मोटर्स के सर्विस एडवाइज़र. {{name}} जी की {{vehicle}} की सर्विस {{due_date}} को ड्यू है. हिंदी में बात करें, छोटे वाक्य बोलें, और ग्राहक से सर्विस की तारीख कन्फर्म करें.", "first_message": "नमस्ते, मैं आशु बोल रहा हूं मिराई मोटर्स से. एक मिनट है आपके पास?", "voice": { "voice_id": "ashu", "language": "hi" }, "language": "hi", "max_duration_secs": 300, "end_call": { "enabled": true, "message": "धन्यवाद, आपका दिन शुभ हो.", "confirm": true }, "voicemail": { "action": "hangup" }, "background_sound": { "sound": "off" }, "behavior": { "interruptions": "normal", "adaptive_interruptions": true, "pass_through": [], "date_awareness": true }, "secondary_languages": [ "en" ], "tools": [], "flow": { "nodes": [ { "id": "persona", "type": "globalNode", "data": { "name": "Persona and rules", "prompt": "You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first.", "is_start": false, "allow_interrupt": true, "add_global_prompt": true, "extraction_enabled": false, "extraction_variables": [] } }, { "id": "identity", "type": "startCall", "data": { "name": "Confirm the customer", "prompt": "You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm.", "greeting": "नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?", "is_start": true, "allow_interrupt": true, "add_global_prompt": true, "extraction_enabled": false, "extraction_variables": [] } }, { "id": "offer_slot", "type": "agentNode", "data": { "name": "Book the service", "prompt": "Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.", "is_start": false, "allow_interrupt": true, "add_global_prompt": true, "extraction_enabled": true, "extraction_variables": [ { "name": "preferred_day", "type": "string", "prompt": "The day the customer chose for the service, in their words, for example Saturday or 20 August." }, { "name": "callback_time", "type": "string", "prompt": "When the customer asked to be called back, in their words. Empty if they did not ask." } ] } }, { "id": "goodbye", "type": "endCall", "data": { "name": "Close", "prompt": "In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.", "is_start": false, "allow_interrupt": false, "add_global_prompt": true, "extraction_enabled": false, "extraction_variables": [] } }, { "id": "not_customer", "type": "endCall", "data": { "name": "Wrong person", "prompt": "Apologise for the trouble and say goodbye. Do not mention the car or the service.", "is_start": false, "allow_interrupt": true, "add_global_prompt": true, "extraction_enabled": false, "extraction_variables": [] } } ], "edges": [ { "id": "e1", "source": "identity", "target": "offer_slot", "data": { "label": "confirmed_identity", "condition": "The caller confirmed they are the customer you asked for." } }, { "id": "e2", "source": "identity", "target": "not_customer", "data": { "label": "wrong_person", "condition": "The caller is someone else, or says it is a wrong number." } }, { "id": "e3", "source": "offer_slot", "target": "goodbye", "data": { "label": "slot_booked", "condition": "The customer named a day for the service and you read it back." } }, { "id": "e4", "source": "offer_slot", "target": "goodbye", "data": { "label": "not_now", "condition": "The customer does not want to book now, and you have asked once when to call back if they were busy." } } ] }, "created_at": "2026-08-11T09:14:02Z", "updated_at": "2026-08-11T09:56:02Z"}
{
"details": [
{
"path": "flow.nodes[2].data.tools[0]",
"message": "node \"offer_slot\" offers tool \"check_slots\", which is not an on_call tool of this agent; add it with phase on_call or remove it from the node"
}
],
"error": "invalid_flow"
}
{
"error": {
"code": "conflict",
"message": "agent changed; read its current revision and retry"
}
}
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Voice Infra","description":"Voice AI at scale. Developer docs for Voice Infra: voice agents for phone, browser and WhatsApp calls in Hindi, Gujarati, Marathi, Bengali, Tamil, Telugu, Kannada, Malayalam and Hinglish, plus text-to-speech, speech-to-text and language model APIs.","colors":{"primary":"#1B1A18","light":"#F1BC04","dark":"#1B1A18"},"logo":{"light":"https://mintcdn.com/miraiminds-0d8f849e/JBdjZJ2kVWBvRdo8/logo/voice-infra.svg?fit=max\u0026auto=format\u0026n=JBdjZJ2kVWBvRdo8\u0026q=85\u0026s=91e7cd20c6d4dc84e00a031352c7a0ba","dark":"https://mintcdn.com/miraiminds-0d8f849e/JBdjZJ2kVWBvRdo8/logo/voice-infra.svg?fit=max\u0026auto=format\u0026n=JBdjZJ2kVWBvRdo8\u0026q=85\u0026s=91e7cd20c6d4dc84e00a031352c7a0ba","href":"/"},"favicon":"https://mintcdn.com/miraiminds-0d8f849e/6ikEDtOGILVZfy9n/favicon.svg?fit=max\u0026auto=format\u0026n=6ikEDtOGILVZfy9n\u0026q=85\u0026s=d2f01bc6aac2a306ae4afcd11da3a4ef","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","node"],"prefill":true}},"appearance":{"default":"light","strict":true},"background":{"color":{"light":"#FBFAF8","dark":"#151513"}},"navbar":{"links":[{"href":"https://console.voice.miraiminds.co","label":"Sign in"},{"href":"mailto:help@miraiminds.co?subject=Help%20with%20Voice%20Infra","label":"Support"}],"primary":{"type":"button","label":"Start free","href":"https://sandbox.voice.miraiminds.co"}},"footer":{"socials":{"website":"https://voice.miraiminds.co"},"links":[{"header":"Voice Infra","items":[{"label":"Pricing","href":"https://voice.miraiminds.co/pricing"},{"label":"Use cases","href":"https://voice.miraiminds.co/use-cases"},{"label":"Mira TTS","href":"https://voice.miraiminds.co/models/text-to-speech"}]},{"header":"Help","items":[{"label":"help@miraiminds.co","href":"mailto:help@miraiminds.co?subject=Help%20with%20Voice%20Infra"},{"label":"Book a call","href":"https://cal.com/sneh-mehta/15min"}]}]},"seo":{"organization":{"id":"https://voice.miraiminds.co/#organization","name":"mirai minds","url":"https://voice.miraiminds.co","logo":"https://voice.miraiminds.co/icons/icon-512.png"},"indexing":"navigable"},"styling":{"eyebrows":"section","codeblocks":"system","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"miraiminds-0d8f849e","hasAudioNarration":false,"actualSubdomain":"miraiminds-0d8f849e","customDomains":["docs.miraiminds.co"],"gitSource":{"type":"github","owner":"miraiminds","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6afa62fd035667abb3267f87","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API reference","count":155},{"language":"default","tag":"Documentation","count":49},{"language":"default","tag":"Campaigns","count":24},{"language":"default","tag":"Webhooks","count":22},{"language":"default","tag":"Build","count":21},{"language":"default","tag":"Telephony","count":19},{"language":"default","tag":"Calls","count":16},{"language":"default","tag":"Agents","count":13},{"language":"default","tag":"Cookbooks","count":10},{"language":"default","tag":"Tools and secrets","count":10}],"searchSettings":{"maxResults":3}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":":root{--c-paper: #fbfaf8;--c-surface: #ffffff;--c-sunk: #f4f2ee;--c-line: #e7e4dd;--c-line-strong: #d3cec4;--c-ink: #1b1a18;--c-ink-2: #45433d;--c-ink-3: #6f6c65;--c-dark: #151513;--c-dark-line: #2b2a24;--c-on-dark: #f1efe9;--c-on-dark-2: #c4c0b6;--c-on-dark-3: #8b877d;--c-amber: #f1bc04;--ui-dark-fill: rgba(241, 239, 233, 0.07);--ui-dark-raise: #2a2925;--ui-dark-lift: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(241, 239, 233, 0.07);--sans: ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;--mono: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace}:root{--sidebar-width: 15.5rem}@media (min-width: 1280px){:root{--content-width: 42rem}}@media (min-width: 1536px){:root{--content-width: 46rem}}@media (min-width: 1280px){:root:has(#api-playground-2-operation-page){--content-width: 36rem}}@media (min-width: 1600px){:root:has(#api-playground-2-operation-page){--content-width: 40rem}}html,body,button,input,select,textarea,.font-sans{font-family:var(--sans)!important}code,kbd,pre,samp,.font-mono{font-family:var(--mono)!important}body{color:var(--c-ink-2);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}#page-title,#content-area h1,#content-area h2,#content-area h3,#content-area h4{color:var(--c-ink);letter-spacing:-0.02em}#content-area table td,#content-area table th{font-variant-numeric:tabular-nums}#content.mdx-content{font-size:15.5px;line-height:1.65}#content.mdx-content table{font-size:14px;line-height:1.5}#header #page-title{font-size:34px;line-height:1.12;letter-spacing:-0.03em}#header .prose,#header .prose p{font-size:16.5px;line-height:1.6;color:var(--c-ink-2)}#content-area table td code{white-space:nowrap}#header .eyebrow{color:var(--c-ink-3)!important;font-weight:600;letter-spacing:0.01em}html,body{background-color:var(--c-paper)}#navbar>div:first-child,#navbar>div:nth-child(2){background:transparent!important}#content-area a:not([class*=\"card\"]):not(.link):not([data-component-part]){color:var(--c-ink);text-decoration-color:var(--c-line-strong)}#content-area a:not([class*=\"card\"]):hover{text-decoration-color:var(--c-ink)}#content-area :not(pre)>code{background:var(--c-sunk);border:1px solid var(--c-line);color:var(--c-ink);border-radius:6px}@media (min-width: 1024px){#sidebar-content{background:var(--c-dark);border:1px solid var(--c-dark-line);border-radius:16px;margin-left:8px;top:calc(8px + var(--banner-height, 0px))!important;height:calc(100vh - 16px - var(--banner-height, 0px))!important;padding-top:calc(var(--mintlify-slot-header-height, 3.5rem) - 8px);color:var(--c-on-dark-2)}#navbar{pointer-events:none}#navbar a,#navbar button,#navbar input,#navbar [role=\"button\"]{pointer-events:auto}#navbar .nav-logo,#navbar a img{margin-left:4px}#sidebar-content .method-nav-pill>span{background:var(--ui-dark-fill)!important}#sidebar-content .method-nav-pill>span[class*=\"green\"]{color:#4fc08a!important}#sidebar-content .method-nav-pill>span[class*=\"blue\"],#sidebar-content .method-nav-pill>span[class*=\"3064E3\"]{color:#8fb0ff!important}#sidebar-content .method-nav-pill>span[class*=\"yellow\"],#sidebar-content .method-nav-pill>span[class*=\"orange\"]{color:#e8b866!important}#sidebar-content .method-nav-pill>span[class*=\"red\"]{color:#ff8073!important}#sidebar-content .sidebar-group-header,#sidebar-content .sidebar-title{color:var(--c-on-dark-3)!important;font-size:11.5px;font-weight:600;letter-spacing:0.02em}#sidebar-content li>a{color:var(--c-on-dark-2)!important;border-radius:8px!important}#sidebar-content li>a:hover{background:var(--ui-dark-fill)!important;color:var(--c-on-dark)!important}#sidebar-content li[data-active=\"true\"]>a,#sidebar-content li>a[aria-current=\"page\"]{background:var(--ui-dark-raise)!important;box-shadow:var(--ui-dark-lift);color:var(--c-on-dark)!important;text-shadow:none!important}#sidebar-content svg{color:var(--c-on-dark-3)}#sidebar-content #search-bar-entry{background:var(--ui-dark-fill)!important;color:var(--c-on-dark-3)!important;--tw-ring-color: var(--c-dark-line) !important}#sidebar-content #search-bar-entry svg{color:var(--c-on-dark-3)!important}#sidebar-content .almond-nav-bottom-section-divider{background:var(--c-dark-line)!important}#navigation-items>div{mask-image:none!important;-webkit-mask-image:none!important}}#navbar .nav-logo,#navbar a img.nav-logo,#navbar a img{height:44px!important;width:auto!important;max-width:none!important}@media (max-width: 1023px){#navbar .nav-logo,#navbar a img{background:var(--c-dark);border-radius:10px}}#navbar .nav-tabs-item{color:var(--c-ink-3)}#navbar .nav-tabs-item[data-active=\"true\"]{color:var(--c-ink)!important}#navbar .nav-tabs-item[data-active=\"true\"]>div{background:var(--c-amber)!important;height:2px;display:block!important}#topbar-cta-button a,#topbar-cta-button button{background:var(--c-ink)!important;color:var(--c-on-dark)!important;border-radius:8px!important}#content-area [class*=\"card\"]{border-color:var(--c-line)!important;border-radius:12px!important;box-shadow:none!important}#content-area [class*=\"card\"]:hover{border-color:var(--c-line-strong)!important}[data-component-part=\"code-block-root\"],.code-block{border-color:var(--c-line)!important}#content-area a.mm-cta{display:inline-block;background:var(--c-ink);color:var(--c-on-dark)!important;text-decoration:none!important;padding:9px 16px;border-radius:8px;font-weight:600;font-size:14.5px;line-height:1.3;margin:4px 12px 4px 0}#content-area a.mm-cta:hover{background:#000}"}],"page":{"pagePath":"api-reference/flows/save-a-flow-on-an-agent","slug":"/api-reference/flows/save-a-flow-on-an-agent","pageMetadata":{"title":"Save a flow on an agent","description":"Replaces the agent's graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed.\n\nEach save is a new agent revision, so you can roll it back. `if_revision` refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as `invalid_flow` with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v2/agents/{agent_id}/flow","href":"/api-reference/flows/save-a-flow-on-an-agent","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Replaces the agent’s graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Each save is a new agent revision, so you can roll it back. \", _jsx(_components.code, {\n children: \"if_revision\"\n }), \" refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as \", _jsx(_components.code, {\n children: \"invalid_flow\"\n }), \" with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Save a flow on an agent","description":"Replaces the agent's graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed.\n\nEach save is a new agent revision, so you can roll it back. `if_revision` refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as `invalid_flow` with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v2/agents/{agent_id}/flow","href":"/api-reference/flows/save-a-flow-on-an-agent","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"put_agent_flow","summary":"Save a flow on an agent","description":"Replaces the agent's graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed.\n\nEach save is a new agent revision, so you can roll it back. `if_revision` refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as `invalid_flow` with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.","tags":["Flows"],"parameters":["9e285eca-1d42-4b09-b5d8-a84465065064","4dd8e075-f31e-43d2-9945-6ad96ed17b77"],"requestBody":"2d98fac6-a2f8-463d-b676-d5da19018a43","responses":{"200":"070bee43-c283-4b23-b17d-c9e9bcb25d44","400":"66e07d63-1488-43f5-b32c-6ad66b64d2eb","409":"7ddbdb59-9206-4b3b-8d2e-a4e821e75326"},"method":"put","type":"path","servers":["66c2a53b-fc16-4515-8116-d3e7c375fb9b","7666e9c2-9858-4c24-9210-77961e56966e"],"security":["0a319744-0462-402e-82c8-877b8e5fa231"],"path":"/v2/agents/{agent_id}/flow","baseUrlOptions":["https://sandbox.voice.miraiminds.co","https://prod.voice.miraiminds.co"],"title":"Save a flow on an agent","codeSamples":[],"requestExampleLanguages":["bash","python","node"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.edges.items.0.data.condition":"The caller confirmed they are the customer you asked for.","body.edges.items.0.data.label":"confirmed_identity","body.edges.items.0.id":"e1","body.edges.items.0.source":"identity","body.edges.items.0.target":"offer_slot","body.edges.items.1.data.condition":"The caller is someone else, or says it is a wrong number.","body.edges.items.1.data.label":"wrong_person","body.edges.items.1.id":"e2","body.edges.items.1.source":"identity","body.edges.items.1.target":"not_customer","body.edges.items.2.data.condition":"The customer named a day for the service and you read it back.","body.edges.items.2.data.label":"slot_booked","body.edges.items.2.id":"e3","body.edges.items.2.source":"offer_slot","body.edges.items.2.target":"goodbye","body.edges.items.3.data.condition":"The customer does not want to book now, and you have asked once when to call back if they were busy.","body.edges.items.3.data.label":"not_now","body.edges.items.3.id":"e4","body.edges.items.3.source":"offer_slot","body.edges.items.3.target":"goodbye","body.nodes.items.0.data.name":"Persona and rules","body.nodes.items.0.data.prompt":"You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first.","body.nodes.items.0.id":"persona","body.nodes.items.0.type":"globalNode","body.nodes.items.1.data.name":"Confirm the customer","body.nodes.items.1.data.prompt":"You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm.","body.nodes.items.1.data.greeting.oneOf.0":"नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?","body.nodes.items.1.id":"identity","body.nodes.items.1.type":"startCall","body.nodes.items.2.data.name":"Book the service","body.nodes.items.2.data.prompt":"Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.","body.nodes.items.2.data.extraction_enabled":true,"body.nodes.items.2.data.extraction_variables.items.0.name":"preferred_day","body.nodes.items.2.data.extraction_variables.items.0.prompt":"The day the customer chose for the service, in their words, for example Saturday or 20 August.","body.nodes.items.2.data.extraction_variables.items.0.type":"string","body.nodes.items.2.data.extraction_variables.items.1.name":"callback_time","body.nodes.items.2.data.extraction_variables.items.1.prompt":"When the customer asked to be called back, in their words. Empty if they did not ask.","body.nodes.items.2.data.extraction_variables.items.1.type":"string","body.nodes.items.2.id":"offer_slot","body.nodes.items.2.type":"agentNode","body.nodes.items.3.data.name":"Close","body.nodes.items.3.data.prompt":"In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.","body.nodes.items.3.data.allow_interrupt":false,"body.nodes.items.3.id":"goodbye","body.nodes.items.3.type":"endCall","body.nodes.items.4.data.name":"Wrong person","body.nodes.items.4.data.prompt":"Apologise for the trouble and say goodbye. Do not mention the car or the service.","body.nodes.items.4.id":"not_customer","body.nodes.items.4.type":"endCall"}]},"dependencies":{"parameters":{"9e285eca-1d42-4b09-b5d8-a84465065064":{"name":"agent_id","in":"path","required":true,"description":"The agent's id (`agt_…`).","schema":{"type":"string","isRequired":true,"description":"The agent's id (`agt_…`).","uniqueKey":"","typeLabel":"string"},"example":"agt_01K2M4P7QRSTVWXYZ0A1B2C3"},"4dd8e075-f31e-43d2-9945-6ad96ed17b77":{"name":"if_revision","in":"query","required":true,"description":"Optional. The agent revision you read.","schema":{"minimum":1,"type":"integer","isRequired":true,"description":"Optional. The agent revision you read.","uniqueKey":"","typeLabel":"integer"},"example":1}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"description":"A node graph: the conversation as nodes with their own instructions and transitions between them. See x-semantics.flow for the rules.","properties":{"edges":{"items":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"condition":{"description":"When to take it; given to the model as the function's description. Must not be blank.","maxLength":2000,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"edges.items.[INDEX].data.condition","typeLabel":"string"},"label":{"description":"The function name the model calls to take this transition. Unique among the source node's transitions.","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string","isRequired":true,"uniqueKey":"edges.items.[INDEX].data.label","typeLabel":"string"}},"required":["label","condition"],"type":"object","isRequired":true,"uniqueKey":"edges.items.[INDEX].data","typeLabel":"object"},"id":{"description":"Unique in the graph.","minLength":1,"type":"string","isRequired":true,"uniqueKey":"edges.items.[INDEX].id","typeLabel":"string"},"source":{"description":"A node id; not an endCall or the globalNode.","type":"string","isRequired":true,"uniqueKey":"edges.items.[INDEX].source","typeLabel":"string"},"target":{"description":"A node id; not the globalNode.","type":"string","isRequired":true,"uniqueKey":"edges.items.[INDEX].target","typeLabel":"string"},"animated":{"description":"Editor field. Any JSON; stored and returned as sent.","uniqueKey":"edges.items.[INDEX].animated","typeLabel":"any"},"type":{"description":"Editor field. Any JSON; stored and returned as sent.","uniqueKey":"edges.items.[INDEX].type","typeLabel":"any"}},"required":["id","source","target","data"],"type":"object","uniqueKey":"edges.items.[INDEX]","typeLabel":"object"},"maxItems":40,"minItems":1,"type":"array","isRequired":true,"uniqueKey":"edges","typeLabel":"object[]"},"nodes":{"items":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"name":{"maxLength":80,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"nodes.items.[INDEX].data.name","typeLabel":"string"},"prompt":{"description":"The node's instructions, including when to call each outgoing transition. {{variables}} are rendered per call.","maxLength":16000,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"nodes.items.[INDEX].data.prompt","typeLabel":"string"},"add_global_prompt":{"default":true,"type":"boolean","uniqueKey":"nodes.items.[INDEX].data.add_global_prompt","typeLabel":"boolean"},"allow_interrupt":{"default":true,"type":"boolean","uniqueKey":"nodes.items.[INDEX].data.allow_interrupt","typeLabel":"boolean"},"extraction_enabled":{"default":false,"type":"boolean","uniqueKey":"nodes.items.[INDEX].data.extraction_enabled","typeLabel":"boolean"},"extraction_variables":{"default":[],"items":{"additionalProperties":false,"properties":{"name":{"description":"Unique within the node.","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string","isRequired":true,"uniqueKey":"nodes.items.[INDEX].data.extraction_variables.items.[INDEX].name","typeLabel":"string"},"prompt":{"maxLength":2000,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"nodes.items.[INDEX].data.extraction_variables.items.[INDEX].prompt","typeLabel":"string"},"type":{"enum":["string","number","boolean"],"type":"string","isRequired":true,"uniqueKey":"nodes.items.[INDEX].data.extraction_variables.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"required":["name","type","prompt"],"type":"object","uniqueKey":"nodes.items.[INDEX].data.extraction_variables.items.[INDEX]","typeLabel":"object"},"maxItems":12,"type":"array","uniqueKey":"nodes.items.[INDEX].data.extraction_variables","typeLabel":"object[]"},"greeting":{"oneOf":[{"description":"Exact line spoken on entering the node; the start node's greeting opens the call.","maxLength":1500,"type":"string","uniqueKey":"nodes.items.[INDEX].data.greeting.oneOf.0","typeLabel":"string"},{"description":"Exact line spoken on entering the node; the start node's greeting opens the call.","maxLength":1500,"type":"null","uniqueKey":"nodes.items.[INDEX].data.greeting.oneOf.1","typeLabel":"null"}],"uniqueKey":"nodes.items.[INDEX].data.greeting","typeLabel":"string | null"},"is_start":{"description":"Derived from type on save.","type":"boolean","uniqueKey":"nodes.items.[INDEX].data.is_start","typeLabel":"boolean"},"tools":{"oneOf":[{"description":"Names of this agent's on_call tools the node offers the model beside its transitions, in order. startCall and agentNode only; never end_call and never a transition label. Omitted when empty.","items":{"pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string","uniqueKey":"nodes.items.[INDEX].data.tools.oneOf.0.items.[INDEX]","typeLabel":"string"},"maxItems":10,"type":"array","uniqueItems":true,"uniqueKey":"nodes.items.[INDEX].data.tools.oneOf.0","typeLabel":"string[]"},{"description":"Names of this agent's on_call tools the node offers the model beside its transitions, in order. startCall and agentNode only; never end_call and never a transition label. Omitted when empty.","items":{"pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string"},"maxItems":10,"type":"null","uniqueItems":true,"uniqueKey":"nodes.items.[INDEX].data.tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"nodes.items.[INDEX].data.tools","typeLabel":"string[] | null"}},"required":["name","prompt"],"type":"object","isRequired":true,"uniqueKey":"nodes.items.[INDEX].data","typeLabel":"object"},"id":{"description":"Unique in the graph.","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string","isRequired":true,"uniqueKey":"nodes.items.[INDEX].id","typeLabel":"string"},"type":{"description":"startCall opens the call (exactly one); endCall ends it after its reply (at least one, no outgoing transitions); globalNode is a prompt prepended to every node with add_global_prompt (at most one, no transitions).","enum":["startCall","agentNode","endCall","globalNode"],"type":"string","isRequired":true,"uniqueKey":"nodes.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"position":{"description":"Editor layout. Any JSON; stored and returned as sent.","uniqueKey":"nodes.items.[INDEX].position","typeLabel":"any"}},"required":["id","type","data"],"type":"object","uniqueKey":"nodes.items.[INDEX]","typeLabel":"object"},"maxItems":20,"minItems":2,"type":"array","isRequired":true,"uniqueKey":"nodes","typeLabel":"object[]"},"viewport":{"description":"Editor camera. Any JSON; stored and returned as sent.","uniqueKey":"viewport","typeLabel":"any"}},"required":["nodes","edges"],"type":"object","x-max-bytes":100000,"uniqueKey":"","typeLabel":"object"},"examples":{"Save a flow on an agent":{"title":"Save a flow on an agent","summary":"Save a flow on an agent","value":{"nodes":[{"id":"persona","type":"globalNode","data":{"name":"Persona and rules","prompt":"You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first."}},{"id":"identity","type":"startCall","data":{"name":"Confirm the customer","greeting":"नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?","prompt":"You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm."}},{"id":"offer_slot","type":"agentNode","data":{"name":"Book the service","prompt":"Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.","extraction_enabled":true,"extraction_variables":[{"name":"preferred_day","type":"string","prompt":"The day the customer chose for the service, in their words, for example Saturday or 20 August."},{"name":"callback_time","type":"string","prompt":"When the customer asked to be called back, in their words. Empty if they did not ask."}]}},{"id":"goodbye","type":"endCall","data":{"name":"Close","prompt":"In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.","allow_interrupt":false}},{"id":"not_customer","type":"endCall","data":{"name":"Wrong person","prompt":"Apologise for the trouble and say goodbye. Do not mention the car or the service."}}],"edges":[{"id":"e1","source":"identity","target":"offer_slot","data":{"label":"confirmed_identity","condition":"The caller confirmed they are the customer you asked for."}},{"id":"e2","source":"identity","target":"not_customer","data":{"label":"wrong_person","condition":"The caller is someone else, or says it is a wrong number."}},{"id":"e3","source":"offer_slot","target":"goodbye","data":{"label":"slot_booked","condition":"The customer named a day for the service and you read it back."}},{"id":"e4","source":"offer_slot","target":"goodbye","data":{"label":"not_now","condition":"The customer does not want to book now, and you have asked once when to call back if they were busy."}}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"070bee43-c283-4b23-b17d-c9e9bcb25d44":{"description":"The agent, now node-based","content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"behavior":{"additionalProperties":false,"description":"How the agent takes turns with the caller, and whether it knows the date. Always present; agents saved before this block existed read back with the defaults.","properties":{"adaptive_interruptions":{"default":true,"description":"Turn-taking, on by default. The agent decides when the caller has finished speaking: it waits through mid-thought pauses with a short \"hmm\", ignores quieter voices in the background (someone else in the room), and picks up a line it was cut off on if the interruption turns out to be nothing. Turn it off for fixed rules only: the interruptions setting decides how many words cut the agent off, and pass_through words never do.","type":"boolean","isRequired":true,"uniqueKey":"behavior.adaptive_interruptions","typeLabel":"boolean"},"date_awareness":{"default":true,"description":"Date awareness, on by default. The agent knows today's date in the call's timezone (the campaign's, else India), and whenever the caller names a day (\"Saturday\", \"शनिवार\", \"15 तारीख\", \"कल\", \"next Monday\", \"15 November\") it is told the exact date before it replies, so it never works out a date or a weekday itself. A day that does not exist (31 November) is flagged to the agent, and each resolved date is a row in the agent's Logs (prompt). Turn it off only if your own prompt or tools supply dates differently.","type":"boolean","isRequired":true,"uniqueKey":"behavior.date_awareness","typeLabel":"boolean"},"interruptions":{"default":"normal","description":"How easily the caller can cut the agent off while it speaks. easy: one word or about 0.5 s of speech; normal (the default, and the behaviour before this setting existed): two words or about 0.7 s; firm: three words or about 1.2 s; never: the agent always finishes its line, and what the caller said is answered right after. Acknowledgements (haan, ji, ok, hmm and your pass_through words) never interrupt at any setting; a stop word (stop, ruko) interrupts at every setting except never. On a flow agent a node's own allow_interrupt false still applies; never makes every node non-interruptible. Trimmed and lower-cased; any other value, including an empty string, is 400.","enum":["easy","normal","firm","never"],"type":"string","isRequired":true,"uniqueKey":"behavior.interruptions","typeLabel":"enum\u003cstring>"},"pass_through":{"description":"Your own words that never interrupt the agent, such as \"theek\", \"achha\" or \"bilkul\". They are added to the built-in acknowledgements (haan, ji, ok, hmm and their equivalents), which always pass through; a reply made only of these words does not stop the agent. Applies whether adaptive_interruptions is on or off. Each entry is literal text, never a pattern: Unicode-normalised (NFC), trimmed and inner spaces collapsed to one, then 1-40 characters and at most 4 words. Duplicates are removed ignoring case, keeping the first spelling and the order; at most 30 entries. Always returned: [] when there are none, including on agents saved before the field existed.","items":{"maxLength":40,"minLength":1,"type":"string","uniqueKey":"behavior.pass_through.items.[INDEX]","typeLabel":"string"},"maxItems":30,"type":"array","isRequired":true,"uniqueKey":"behavior.pass_through","typeLabel":"string[]"}},"required":["interruptions","adaptive_interruptions","pass_through","date_awareness"],"type":"object","isRequired":true,"uniqueKey":"behavior","typeLabel":"object"},"features":{"additionalProperties":false,"description":"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.","properties":{"call_budget_secs":{"description":"How long this agent's calls usually last, in seconds, as digits.","pattern":"^[0-9]+$","type":"string","uniqueKey":"features.call_budget_secs","typeLabel":"string"},"language_switch":{"description":"on: the caller asks for another of the agent's languages (its language, secondary_languages and English), or keeps speaking one, and the call moves to it before the next reply: speech recognition, the voice and the reply follow. A language the agent does not have is declined in the current one and logged as prompt/language_not_enabled. off (the default): the call stays in the agent's language unless its prompt says otherwise. Not on realtime sessions. A JSON boolean is accepted (true is on).","enum":["off","on"],"type":"string","uniqueKey":"features.language_switch","typeLabel":"enum\u003cstring>"},"llm_timeline":{"description":"on: each request to the reply model ends with the call's timeline (when each of the last six turns started, how long it ran, the silence before it) and the call time now. voice: the same, plus plain-word cues when they apply (the caller cut the agent off, keeps asking, answers slowly, has gone quiet, how much of call_budget_secs is left). Not on node flows or realtime sessions.","enum":["off","on","voice"],"type":"string","uniqueKey":"features.llm_timeline","typeLabel":"enum\u003cstring>"},"repeat_counter":{"description":"on: the reply model is told what the caller has already heard the agent say several times on this call, so it words it differently. shadow: counted and logged, nothing sent. Not on node flows or realtime sessions.","enum":["off","shadow","on"],"type":"string","uniqueKey":"features.repeat_counter","typeLabel":"enum\u003cstring>"},"tts_repeat_vary":{"description":"on: a sentence the caller already heard on this call is rendered fresh, a little faster or slower, instead of replaying the same audio. A JSON boolean is accepted (true is on).","enum":["off","on"],"type":"string","uniqueKey":"features.tts_repeat_vary","typeLabel":"enum\u003cstring>"},"tts_rhythm":{"description":"How each sentence is paced, on our own voices. on: our rules (a routine line flows quicker, a value read back to the caller slower, with pauses where a person recalls it). llm: the reply model starts a sentence with [slow] or [fast], never spoken. off: the voice as it comes.","enum":["off","on","llm"],"type":"string","uniqueKey":"features.tts_rhythm","typeLabel":"enum\u003cstring>"},"turn_bc_choice":{"description":"With adaptive interruptions: on, the turn model chooses the short word the agent says while the caller pauses (\"जी\", \"हाँ\"). shadow: asks and logs, and says today's word.","enum":["off","shadow","on"],"type":"string","uniqueKey":"features.turn_bc_choice","typeLabel":"enum\u003cstring>"},"turn_fusion":{"description":"With adaptive interruptions: on, the voice-end score and the turn model decide together when the caller has finished (a low score holds a reply, a high one answers at once). shadow: logs what it would have done.","enum":["off","shadow","on"],"type":"string","uniqueKey":"features.turn_fusion","typeLabel":"enum\u003cstring>"}},"type":"object","isRequired":true,"uniqueKey":"features","typeLabel":"object"},"secondary_languages":{"description":"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.","items":{"enum":["hi","en","gu","mr","bn","ta","te","kn","ml","pa","od"],"type":"string","uniqueKey":"secondary_languages.items.[INDEX]","typeLabel":"enum\u003cstring>"},"maxItems":4,"type":"array","isRequired":true,"uniqueKey":"secondary_languages","typeLabel":"enum\u003cstring>[]"},"analysis":{"oneOf":[{"type":"null","description":"Replace the whole analysis block. Omit output_schema to remove structured extraction. Requires enabled=true to run.","uniqueKey":"analysis.oneOf.0","typeLabel":"null"},{"type":"object","description":"Replace the whole analysis block. Omit output_schema to remove structured extraction. Requires enabled=true to run.","properties":{"enabled":{"default":false,"description":"Run the analysis after every call that connected; a call that never connected is skipped (not_connected). Default false. On the T1 plan, your workspace's insights setting decides this for each call instead.","type":"boolean","uniqueKey":"analysis.oneOf.1.enabled","typeLabel":"boolean"},"output_schema":{"additionalProperties":false,"description":"The shape of analysis.data: a root object schema from the documented bounded subset. Nested nodes use the same keywords; the server validates depth, node count and keyword/type compatibility. The model's data must satisfy it before the result is published. Not a template: placeholders are not rendered here.","properties":{"type":{"const":"object","isRequired":true,"uniqueKey":"analysis.oneOf.1.output_schema.type","typeLabel":"any"},"additionalProperties":{"default":false,"type":"boolean","uniqueKey":"analysis.oneOf.1.output_schema.\\additionalProperties","typeLabel":"boolean"},"default":{"oneOf":[{}],"uniqueKey":"analysis.oneOf.1.output_schema.default","typeLabel":"any"},"description":{"maxLength":2000,"type":"string","uniqueKey":"analysis.oneOf.1.output_schema.description","typeLabel":"string"},"enum":{"maxItems":100,"type":"array","uniqueKey":"analysis.oneOf.1.output_schema.enum","typeLabel":"array"},"items":{"type":"object","uniqueKey":"analysis.oneOf.1.output_schema.\\items","typeLabel":"object"},"maxItems":{"minimum":0,"type":"integer","uniqueKey":"analysis.oneOf.1.output_schema.maxItems","typeLabel":"integer"},"maxLength":{"minimum":0,"type":"integer","uniqueKey":"analysis.oneOf.1.output_schema.maxLength","typeLabel":"integer"},"maximum":{"type":"number","uniqueKey":"analysis.oneOf.1.output_schema.maximum","typeLabel":"number"},"minItems":{"minimum":0,"type":"integer","uniqueKey":"analysis.oneOf.1.output_schema.minItems","typeLabel":"integer"},"minLength":{"minimum":0,"type":"integer","uniqueKey":"analysis.oneOf.1.output_schema.minLength","typeLabel":"integer"},"minimum":{"type":"number","uniqueKey":"analysis.oneOf.1.output_schema.minimum","typeLabel":"number"},"properties":{"additionalProperties":{"description":"Nested schema node; same supported subset.","type":"object","uniqueKey":"analysis.oneOf.1.output_schema.properties.additionalProperties","typeLabel":"object"},"maxProperties":32,"type":"object","uniqueKey":"analysis.oneOf.1.output_schema.properties","typeLabel":"object"},"required":{"items":{"type":"string","uniqueKey":"analysis.oneOf.1.output_schema.required.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueItems":true,"uniqueKey":"analysis.oneOf.1.output_schema.required","typeLabel":"string[]"}},"required":["type"],"type":"object","uniqueKey":"analysis.oneOf.1.output_schema","typeLabel":"object"},"prompt":{"description":"What the analysis should summarise or extract, in your words: the instruction the model reads beside the transcript. At most 2000 characters. {{variable}} placeholders render with the same rules as system_prompt: the call's variables (for example {{customer_name}}) and pre-call tool outputs as {{tool_name.key}}. A placeholder with no value renders empty. For example: Write the summary in {{summary_language}}.","maxLength":2000,"type":"string","uniqueKey":"analysis.oneOf.1.prompt","typeLabel":"string"},"success_criteria":{"description":"How to decide success: true, false, or null when the conversation does not show it. At most 2000 characters. {{variable}} placeholders render with the same rules as system_prompt: the call's variables (for example {{customer_name}}) and pre-call tool outputs as {{tool_name.key}}. A placeholder with no value renders empty.","maxLength":2000,"type":"string","uniqueKey":"analysis.oneOf.1.success_criteria","typeLabel":"string"},"templates":{"additionalProperties":false,"description":"Pick the follow-up message after the call and fill in its variables. Exactly one of items or fetch. Requires analysis.enabled true.","properties":{"fetch":{"additionalProperties":false,"description":"Read the catalog from your endpoint after every call. Rendered like a post_call HTTP tool's request; secrets as {{ secrets.name }}.","properties":{"url":{"description":"https only, port 443.","maxLength":2048,"type":"string","isRequired":true,"uniqueKey":"analysis.oneOf.1.templates.fetch.url","typeLabel":"string"},"body":{"description":"JSON; POST only. Omitted on a POST: {\"agent_id\",\"call_id\",\"metadata\"}.","uniqueKey":"analysis.oneOf.1.templates.fetch.body","typeLabel":"any"},"headers":{"additionalProperties":{"type":"string","uniqueKey":"analysis.oneOf.1.templates.fetch.headers.additionalProperties","typeLabel":"string"},"description":"Request headers, at most 20. Values are templates, rendered like a post_call tool's request.","maxProperties":20,"type":"object","uniqueKey":"analysis.oneOf.1.templates.fetch.headers","typeLabel":"object"},"items_path":{"description":"Dot path to the list, e.g. Data. Default: a top-level array, else the first array among templates, data, Data, items.","maxLength":256,"type":"string","uniqueKey":"analysis.oneOf.1.templates.fetch.items_path","typeLabel":"string"},"method":{"default":"GET","description":"GET (default) or POST.","enum":["GET","POST"],"type":"string","uniqueKey":"analysis.oneOf.1.templates.fetch.method","typeLabel":"enum\u003cstring>"},"query":{"additionalProperties":{"type":"string","uniqueKey":"analysis.oneOf.1.templates.fetch.query.additionalProperties","typeLabel":"string"},"description":"Query parameters, at most 20, URL-encoded. Values are templates, rendered like a post_call tool's request.","maxProperties":20,"type":"object","uniqueKey":"analysis.oneOf.1.templates.fetch.query","typeLabel":"object"}},"required":["url"],"type":"object","uniqueKey":"analysis.oneOf.1.templates.fetch","typeLabel":"object"},"instructions":{"description":"How to choose, in the business's words.","maxLength":2000,"type":"string","uniqueKey":"analysis.oneOf.1.templates.instructions","typeLabel":"string"},"items":{"description":"The catalog: 1-50 templates. Exactly one of items or fetch.","items":{"additionalProperties":false,"properties":{"name":{"description":"Unique within the catalog.","maxLength":128,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"analysis.oneOf.1.templates.\\items.items.[INDEX].name","typeLabel":"string"},"description":{"description":"What the template is for. The model reads it when choosing.","maxLength":1000,"type":"string","uniqueKey":"analysis.oneOf.1.templates.\\items.items.[INDEX].description","typeLabel":"string"},"language":{"description":"The template's language, as you label it (at most 35 characters). Returned with a selected template.","maxLength":35,"type":"string","uniqueKey":"analysis.oneOf.1.templates.\\items.items.[INDEX].language","typeLabel":"string"},"variables":{"description":"Always returned; [] when the template takes none.","items":{"additionalProperties":false,"properties":{"key":{"description":"Unique within the template.","maxLength":128,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"analysis.oneOf.1.templates.\\items.items.[INDEX].variables.items.[INDEX].key","typeLabel":"string"},"description":{"description":"What this value should hold. The model reads it when filling the template.","maxLength":1000,"type":"string","uniqueKey":"analysis.oneOf.1.templates.\\items.items.[INDEX].variables.items.[INDEX].description","typeLabel":"string"}},"required":["key"],"type":"object","uniqueKey":"analysis.oneOf.1.templates.\\items.items.[INDEX].variables.items.[INDEX]","typeLabel":"object"},"maxItems":30,"type":"array","uniqueKey":"analysis.oneOf.1.templates.\\items.items.[INDEX].variables","typeLabel":"object[]"}},"required":["name"],"type":"object","uniqueKey":"analysis.oneOf.1.templates.\\items.items.[INDEX]","typeLabel":"object"},"maxItems":50,"minItems":1,"type":"array","uniqueKey":"analysis.oneOf.1.templates.\\items","typeLabel":"object[]"}},"type":"object","uniqueKey":"analysis.oneOf.1.templates","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"analysis.oneOf.1","typeLabel":"object"}],"uniqueKey":"analysis","typeLabel":"null | object"},"archived":{"default":false,"description":"Archive to block new calls; false restores availability subject to draft validation. Accepted call snapshots remain unchanged.","type":"boolean","uniqueKey":"archived","typeLabel":"boolean"},"background_sound":{"oneOf":[{"type":"null","uniqueKey":"background_sound.oneOf.0","typeLabel":"null"},{"type":"string","enum":["off","office"],"uniqueKey":"background_sound.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"object","properties":{"sound":{"default":"off","enum":["off","office"],"type":"string","uniqueKey":"background_sound.oneOf.2.sound","typeLabel":"enum\u003cstring>"},"volume":{"maximum":1,"minimum":0,"type":"number","uniqueKey":"background_sound.oneOf.2.volume","typeLabel":"number"}},"additionalProperties":false,"uniqueKey":"background_sound.oneOf.2","typeLabel":"object"}],"uniqueKey":"background_sound","typeLabel":"null | enum\u003cstring> | object"},"booking":{"additionalProperties":false,"description":"The agent's booking window: which days 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), 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.","properties":{"closed_dates":{"default":[],"description":"Single days that cannot be booked, such as holidays, as YYYY-MM-DD. Saved unique and sorted; at most 100.","items":{"format":"date","type":"string","uniqueKey":"booking.closed_dates.items.[INDEX]","typeLabel":"string\u003cdate>"},"maxItems":100,"type":"array","isRequired":true,"uniqueKey":"booking.closed_dates","typeLabel":"string\u003cdate>[]"},"closed_weekdays":{"default":[],"description":"Days of the week that cannot be booked, lower case. Saved unique and in week order; closing all seven is 400.","items":{"enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"type":"string","uniqueKey":"booking.closed_weekdays.items.[INDEX]","typeLabel":"enum\u003cstring>"},"maxItems":6,"type":"array","isRequired":true,"uniqueKey":"booking.closed_weekdays","typeLabel":"enum\u003cstring>[]"},"same_day":{"default":true,"description":"Whether today itself can be booked. Default true.","type":"boolean","isRequired":true,"uniqueKey":"booking.same_day","typeLabel":"boolean"},"window_days":{"default":30,"description":"How far ahead a caller may book: from today (or tomorrow, without same_day) up to this many days after today. Default 30.","maximum":366,"minimum":1,"type":"integer","isRequired":true,"uniqueKey":"booking.window_days","typeLabel":"integer"}},"required":["window_days","same_day","closed_weekdays","closed_dates"],"type":"object","uniqueKey":"booking","typeLabel":"object"},"calls_from":{"oneOf":[{"type":"null","description":"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).","uniqueKey":"calls_from.oneOf.0","typeLabel":"null"},{"type":"object","description":"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).","required":["phone_number_id","number"],"properties":{"number":{"description":"The number in E.164.","type":"string","isRequired":true,"uniqueKey":"calls_from.oneOf.1.number","typeLabel":"string"},"phone_number_id":{"type":"string","isRequired":true,"uniqueKey":"calls_from.oneOf.1.phone_number_id","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"calls_from.oneOf.1","typeLabel":"object"}],"uniqueKey":"calls_from","typeLabel":"null | object"},"created_at":{"format":"date-time","type":"string","uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"draft":{"default":false,"description":"Drafts may have empty prompt or greeting, but cannot run calls.","type":"boolean","uniqueKey":"draft","typeLabel":"boolean"},"emit_processed_webhook":{"default":true,"description":"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.","type":"boolean","uniqueKey":"emit_processed_webhook","typeLabel":"boolean"},"emit_queued_webhook":{"default":false,"type":"boolean","uniqueKey":"emit_queued_webhook","typeLabel":"boolean"},"end_call":{"additionalProperties":false,"properties":{"confirm":{"default":true,"type":"boolean","uniqueKey":"end_call.confirm","typeLabel":"boolean"},"enabled":{"default":true,"type":"boolean","uniqueKey":"end_call.enabled","typeLabel":"boolean"},"message":{"default":"Thanks, have a good day","type":"string","uniqueKey":"end_call.message","typeLabel":"string"}},"type":"object","uniqueKey":"end_call","typeLabel":"object"},"first_message":{"maxLength":500,"type":"string","uniqueKey":"first_message","typeLabel":"string"},"flow":{"additionalProperties":false,"description":"Present only on a flow agent.","properties":{"edges":{"items":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"condition":{"description":"When to take it; given to the model as the function's description. Must not be blank.","maxLength":2000,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"flow.edges.items.[INDEX].data.condition","typeLabel":"string"},"label":{"description":"The function name the model calls to take this transition. Unique among the source node's transitions.","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string","isRequired":true,"uniqueKey":"flow.edges.items.[INDEX].data.label","typeLabel":"string"}},"required":["label","condition"],"type":"object","isRequired":true,"uniqueKey":"flow.edges.items.[INDEX].data","typeLabel":"object"},"id":{"description":"Unique in the graph.","minLength":1,"type":"string","isRequired":true,"uniqueKey":"flow.edges.items.[INDEX].id","typeLabel":"string"},"source":{"description":"A node id; not an endCall or the globalNode.","type":"string","isRequired":true,"uniqueKey":"flow.edges.items.[INDEX].source","typeLabel":"string"},"target":{"description":"A node id; not the globalNode.","type":"string","isRequired":true,"uniqueKey":"flow.edges.items.[INDEX].target","typeLabel":"string"},"animated":{"description":"Editor field. Any JSON; stored and returned as sent.","uniqueKey":"flow.edges.items.[INDEX].animated","typeLabel":"any"},"type":{"description":"Editor field. Any JSON; stored and returned as sent.","uniqueKey":"flow.edges.items.[INDEX].type","typeLabel":"any"}},"required":["id","source","target","data"],"type":"object","uniqueKey":"flow.edges.items.[INDEX]","typeLabel":"object"},"maxItems":40,"minItems":1,"type":"array","isRequired":true,"uniqueKey":"flow.edges","typeLabel":"object[]"},"nodes":{"items":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"name":{"maxLength":80,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"flow.nodes.items.[INDEX].data.name","typeLabel":"string"},"prompt":{"description":"The node's instructions, including when to call each outgoing transition. {{variables}} are rendered per call.","maxLength":16000,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"flow.nodes.items.[INDEX].data.prompt","typeLabel":"string"},"add_global_prompt":{"default":true,"type":"boolean","uniqueKey":"flow.nodes.items.[INDEX].data.add_global_prompt","typeLabel":"boolean"},"allow_interrupt":{"default":true,"type":"boolean","uniqueKey":"flow.nodes.items.[INDEX].data.allow_interrupt","typeLabel":"boolean"},"extraction_enabled":{"default":false,"type":"boolean","uniqueKey":"flow.nodes.items.[INDEX].data.extraction_enabled","typeLabel":"boolean"},"extraction_variables":{"default":[],"items":{"additionalProperties":false,"properties":{"name":{"description":"Unique within the node.","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string","isRequired":true,"uniqueKey":"flow.nodes.items.[INDEX].data.extraction_variables.items.[INDEX].name","typeLabel":"string"},"prompt":{"maxLength":2000,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"flow.nodes.items.[INDEX].data.extraction_variables.items.[INDEX].prompt","typeLabel":"string"},"type":{"enum":["string","number","boolean"],"type":"string","isRequired":true,"uniqueKey":"flow.nodes.items.[INDEX].data.extraction_variables.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"required":["name","type","prompt"],"type":"object","uniqueKey":"flow.nodes.items.[INDEX].data.extraction_variables.items.[INDEX]","typeLabel":"object"},"maxItems":12,"type":"array","uniqueKey":"flow.nodes.items.[INDEX].data.extraction_variables","typeLabel":"object[]"},"greeting":{"oneOf":[{"description":"Exact line spoken on entering the node; the start node's greeting opens the call.","maxLength":1500,"type":"string","uniqueKey":"flow.nodes.items.[INDEX].data.greeting.oneOf.0","typeLabel":"string"},{"description":"Exact line spoken on entering the node; the start node's greeting opens the call.","maxLength":1500,"type":"null","uniqueKey":"flow.nodes.items.[INDEX].data.greeting.oneOf.1","typeLabel":"null"}],"uniqueKey":"flow.nodes.items.[INDEX].data.greeting","typeLabel":"string | null"},"is_start":{"description":"Derived from type on save.","type":"boolean","uniqueKey":"flow.nodes.items.[INDEX].data.is_start","typeLabel":"boolean"},"tools":{"oneOf":[{"description":"Names of this agent's on_call tools the node offers the model beside its transitions, in order. startCall and agentNode only; never end_call and never a transition label. Omitted when empty.","items":{"pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string","uniqueKey":"flow.nodes.items.[INDEX].data.tools.oneOf.0.items.[INDEX]","typeLabel":"string"},"maxItems":10,"type":"array","uniqueItems":true,"uniqueKey":"flow.nodes.items.[INDEX].data.tools.oneOf.0","typeLabel":"string[]"},{"description":"Names of this agent's on_call tools the node offers the model beside its transitions, in order. startCall and agentNode only; never end_call and never a transition label. Omitted when empty.","items":{"pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string"},"maxItems":10,"type":"null","uniqueItems":true,"uniqueKey":"flow.nodes.items.[INDEX].data.tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"flow.nodes.items.[INDEX].data.tools","typeLabel":"string[] | null"}},"required":["name","prompt"],"type":"object","isRequired":true,"uniqueKey":"flow.nodes.items.[INDEX].data","typeLabel":"object"},"id":{"description":"Unique in the graph.","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$","type":"string","isRequired":true,"uniqueKey":"flow.nodes.items.[INDEX].id","typeLabel":"string"},"type":{"description":"startCall opens the call (exactly one); endCall ends it after its reply (at least one, no outgoing transitions); globalNode is a prompt prepended to every node with add_global_prompt (at most one, no transitions).","enum":["startCall","agentNode","endCall","globalNode"],"type":"string","isRequired":true,"uniqueKey":"flow.nodes.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"position":{"description":"Editor layout. Any JSON; stored and returned as sent.","uniqueKey":"flow.nodes.items.[INDEX].position","typeLabel":"any"}},"required":["id","type","data"],"type":"object","uniqueKey":"flow.nodes.items.[INDEX]","typeLabel":"object"},"maxItems":20,"minItems":2,"type":"array","isRequired":true,"uniqueKey":"flow.nodes","typeLabel":"object[]"},"viewport":{"description":"Editor camera. Any JSON; stored and returned as sent.","uniqueKey":"flow.viewport","typeLabel":"any"}},"required":["nodes","edges"],"type":"object","x-max-bytes":100000,"uniqueKey":"flow","typeLabel":"object"},"id":{"type":"string","uniqueKey":"id","typeLabel":"string"},"input_schema":{"oneOf":[{"type":"object","description":"Replace the entire input declaration. Null removes it and restores legacy string variables.","required":["type"],"properties":{"type":{"const":"object","isRequired":true,"uniqueKey":"input_schema.oneOf.0.type","typeLabel":"any"},"additionalProperties":{"default":false,"type":"boolean","uniqueKey":"input_schema.oneOf.0.\\additionalProperties","typeLabel":"boolean"},"default":{"oneOf":[{}],"uniqueKey":"input_schema.oneOf.0.default","typeLabel":"any"},"description":{"maxLength":2000,"type":"string","uniqueKey":"input_schema.oneOf.0.description","typeLabel":"string"},"enum":{"maxItems":100,"type":"array","uniqueKey":"input_schema.oneOf.0.enum","typeLabel":"array"},"items":{"type":"object","uniqueKey":"input_schema.oneOf.0.\\items","typeLabel":"object"},"maxItems":{"minimum":0,"type":"integer","uniqueKey":"input_schema.oneOf.0.maxItems","typeLabel":"integer"},"maxLength":{"minimum":0,"type":"integer","uniqueKey":"input_schema.oneOf.0.maxLength","typeLabel":"integer"},"maximum":{"type":"number","uniqueKey":"input_schema.oneOf.0.maximum","typeLabel":"number"},"minItems":{"minimum":0,"type":"integer","uniqueKey":"input_schema.oneOf.0.minItems","typeLabel":"integer"},"minLength":{"minimum":0,"type":"integer","uniqueKey":"input_schema.oneOf.0.minLength","typeLabel":"integer"},"minimum":{"type":"number","uniqueKey":"input_schema.oneOf.0.minimum","typeLabel":"number"},"properties":{"additionalProperties":{"description":"Nested schema node; same supported subset.","type":"object","uniqueKey":"input_schema.oneOf.0.properties.additionalProperties","typeLabel":"object"},"maxProperties":32,"type":"object","uniqueKey":"input_schema.oneOf.0.properties","typeLabel":"object"},"required":{"items":{"type":"string","uniqueKey":"input_schema.oneOf.0.required.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueItems":true,"uniqueKey":"input_schema.oneOf.0.required","typeLabel":"string[]"}},"additionalProperties":false,"uniqueKey":"input_schema.oneOf.0","typeLabel":"object"},{"type":"null","description":"Replace the entire input declaration. Null removes it and restores legacy string variables.","uniqueKey":"input_schema.oneOf.1","typeLabel":"null"}],"uniqueKey":"input_schema","typeLabel":"object | null"},"knowledge":{"additionalProperties":false,"description":"Present only on an agent with knowledge attached.","properties":{"base_ids":{"description":"Up to 5 knowledge base ids from this workspace. An unknown or deleted id is 400 with its path.","items":{"pattern":"^kb_","type":"string","uniqueKey":"knowledge.base_ids.items.[INDEX]","typeLabel":"string"},"maxItems":5,"type":"array","uniqueItems":true,"uniqueKey":"knowledge.base_ids","typeLabel":"string[]"},"max_chunks":{"default":5,"description":"Most passages given to the model per turn.","maximum":6,"minimum":1,"type":"integer","uniqueKey":"knowledge.max_chunks","typeLabel":"integer"},"min_score":{"oneOf":[{"default":null,"description":"Relevance threshold from 0 to 1. null uses each knowledge base's calibrated threshold.","maximum":1,"minimum":0,"type":"number","uniqueKey":"knowledge.min_score.oneOf.0","typeLabel":"number"},{"default":null,"description":"Relevance threshold from 0 to 1. null uses each knowledge base's calibrated threshold.","maximum":1,"minimum":0,"type":"null","uniqueKey":"knowledge.min_score.oneOf.1","typeLabel":"null"}],"uniqueKey":"knowledge.min_score","typeLabel":"number | null"},"mode":{"default":"auto","description":"auto puts a small knowledge base whole into the conversation and searches a large one every turn; always_retrieve always searches; off keeps the attachment without using it. tool is not available yet (400 knowledge_unavailable).","enum":["auto","always_retrieve","tool","off"],"type":"string","uniqueKey":"knowledge.mode","typeLabel":"enum\u003cstring>"}},"type":"object","uniqueKey":"knowledge","typeLabel":"object"},"language":{"minLength":1,"type":"string","uniqueKey":"language","typeLabel":"string"},"max_duration_secs":{"default":300,"maximum":1800,"minimum":30,"type":"integer","uniqueKey":"max_duration_secs","typeLabel":"integer"},"name":{"minLength":1,"type":"string","uniqueKey":"name","typeLabel":"string"},"object":{"const":"agent","uniqueKey":"object","typeLabel":"any"},"revision":{"type":"integer","uniqueKey":"revision","typeLabel":"integer"},"system_prompt":{"maxLength":48000,"type":"string","uniqueKey":"system_prompt","typeLabel":"string"},"tools":{"description":"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}.","items":{"additionalProperties":false,"description":"One tool on the agent. The minimum is a name, a phase and an https url; every other field has a documented default, and a saved agent reads them back materialised.","properties":{"name":{"description":"Unique per agent. Becomes the tools.\u003cname> namespace and, for an on_call tool, the function name the model calls.","pattern":"^[a-z][a-z0-9_]{1,39}$","type":"string","isRequired":true,"uniqueKey":"tools.items.[INDEX].name","typeLabel":"string"},"phase":{"description":"When the tool runs: pre_call before the call is placed or answered, on_call when the model asks for it during the conversation, post_call after the call ends.","enum":["pre_call","on_call","post_call"],"type":"string","isRequired":true,"uniqueKey":"tools.items.[INDEX].phase","typeLabel":"enum\u003cstring>"},"builtin":{"description":"builtin tools only: the settings for this builtin. See GET /v2/tools/catalog.","type":"object","uniqueKey":"tools.items.[INDEX].builtin","typeLabel":"object"},"condition":{"oneOf":[{"type":"null","description":"null means always run.","uniqueKey":"tools.items.[INDEX].condition.oneOf.0","typeLabel":"null"},{"type":"object","description":"null means always run.","required":["all"],"properties":{"all":{"description":"True when every condition in the list is true.","items":{"$circularRef":"e68385f1-f1bf-4569-9f88-7662391d6e0b"},"minItems":1,"type":"array","isRequired":true,"uniqueKey":"tools.items.[INDEX].condition.oneOf.1.all","typeLabel":"array"}},"additionalProperties":false,"uniqueKey":"tools.items.[INDEX].condition.oneOf.1","typeLabel":"object"},{"type":"object","description":"null means always run.","required":["any"],"properties":{"any":{"description":"True when at least one condition in the list is true.","items":{"$circularRef":"e68385f1-f1bf-4569-9f88-7662391d6e0b"},"minItems":1,"type":"array","isRequired":true,"uniqueKey":"tools.items.[INDEX].condition.oneOf.2.any","typeLabel":"array"}},"additionalProperties":false,"uniqueKey":"tools.items.[INDEX].condition.oneOf.2","typeLabel":"object"},{"type":"object","description":"null means always run.","required":["not"],"properties":{"not":{"oneOf":[{"$circularRef":"e68385f1-f1bf-4569-9f88-7662391d6e0b","isRequired":true}],"isRequired":true,"uniqueKey":"tools.items.[INDEX].condition.oneOf.3.not","typeLabel":"any"}},"additionalProperties":false,"uniqueKey":"tools.items.[INDEX].condition.oneOf.3","typeLabel":"object"},{"type":"object","description":"null means always run.","required":["field","op"],"properties":{"field":{"description":"Dotted path, e.g. vars.priority or tools.lookup.tier. Use .0 for the first item of a list.","type":"string","isRequired":true,"uniqueKey":"tools.items.[INDEX].condition.oneOf.4.field","typeLabel":"string"},"op":{"description":"The comparison. exists, not_exists, is_true and is_false take no value; in and not_in take an array.","enum":["contains","ends_with","eq","exists","gt","gte","in","is_false","is_true","lt","lte","matches","neq","not_contains","not_exists","not_in","starts_with"],"type":"string","isRequired":true,"uniqueKey":"tools.items.[INDEX].condition.oneOf.4.op","typeLabel":"enum\u003cstring>"},"value":{"description":"A string, number or boolean; an array for in/not_in. Omitted for exists/not_exists/is_true/is_false.","uniqueKey":"tools.items.[INDEX].condition.oneOf.4.value","typeLabel":"any"}},"additionalProperties":false,"uniqueKey":"tools.items.[INDEX].condition.oneOf.4","typeLabel":"object"}],"uniqueKey":"tools.items.[INDEX].condition","typeLabel":"null · object · object · object · object"},"description":{"description":"on_call only: what the model is told the tool does.","maxLength":500,"type":"string","uniqueKey":"tools.items.[INDEX].description","typeLabel":"string"},"enabled":{"default":true,"description":"false keeps the tool saved but never runs it. Default true.","type":"boolean","uniqueKey":"tools.items.[INDEX].enabled","typeLabel":"boolean"},"execution":{"default":"sync","description":"sync (default) or async, HTTP tools only. An async on_call tool runs in the background and returns its result when ready (timeout up to 300000 ms). An async pre_call tool starts with the pre-call phase and never holds the dial or the answer (timeout up to 120000 ms, on_failure continue): its outputs reach on_call tool requests, post_call tools and the analysis, and the live conversation as an instruction, once it answers.","enum":["sync","async"],"type":"string","uniqueKey":"tools.items.[INDEX].execution","typeLabel":"enum\u003cstring>"},"kind":{"default":"http","description":"Inferred when omitted: builtin for a catalogued builtin name with no request, http otherwise.","enum":["http","builtin"],"type":"string","uniqueKey":"tools.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"on_failure":{"default":"continue","description":"abort is pre_call only and means do not dial.","enum":["continue","abort"],"type":"string","uniqueKey":"tools.items.[INDEX].on_failure","typeLabel":"enum\u003cstring>"},"parameters":{"description":"on_call only: JSON Schema for the model's arguments. Needs a tier whose model emits native tool calls (t3, t5); saving one on t1 returns 400 tool_style_unsupported.","type":"object","uniqueKey":"tools.items.[INDEX].parameters","typeLabel":"object"},"request":{"additionalProperties":false,"description":"http tools only. Every string is a {{ }} template over the phase's namespaces.","properties":{"url":{"description":"https on port 443. Refused if it resolves to a private, loopback, link-local, CGNAT, multicast or metadata address, or to one of ours.","maxLength":2048,"pattern":"^https://","type":"string","isRequired":true,"uniqueKey":"tools.items.[INDEX].request.url","typeLabel":"string"},"body":{"description":"JSON template; a leaf that is exactly {{= path }} becomes the typed value. Not allowed on GET or DELETE. Omitted on an on_call POST/PUT/PATCH sends the model's arguments.","uniqueKey":"tools.items.[INDEX].request.body","typeLabel":"any"},"headers":{"additionalProperties":{"type":"string","uniqueKey":"tools.items.[INDEX].request.headers.additionalProperties","typeLabel":"string"},"description":"Host, Content-Length, Transfer-Encoding and Connection cannot be set.","type":"object","uniqueKey":"tools.items.[INDEX].request.headers","typeLabel":"object"},"method":{"default":"GET","description":"HTTP method. Default GET.","enum":["GET","POST","PUT","PATCH","DELETE"],"type":"string","uniqueKey":"tools.items.[INDEX].request.method","typeLabel":"enum\u003cstring>"},"query":{"additionalProperties":{"type":"string","uniqueKey":"tools.items.[INDEX].request.query.additionalProperties","typeLabel":"string"},"description":"Values are always URL-encoded.","type":"object","uniqueKey":"tools.items.[INDEX].request.query","typeLabel":"object"}},"required":["url"],"type":"object","uniqueKey":"tools.items.[INDEX].request","typeLabel":"object"},"response":{"additionalProperties":false,"description":"How the HTTP response becomes the tool's result and the values it promotes into variables.","properties":{"select":{"description":"Keys promoted into variables as \u003ctool>.\u003ckey>, each at most 2048 characters.","items":{"type":"string","uniqueKey":"tools.items.[INDEX].response.select.items.[INDEX]","typeLabel":"string"},"maxItems":16,"type":"array","uniqueKey":"tools.items.[INDEX].response.select","typeLabel":"string[]"},"strict":{"default":false,"description":"true makes a non-JSON body a failure instead of {\"text\": …}.","type":"boolean","uniqueKey":"tools.items.[INDEX].response.strict","typeLabel":"boolean"},"transform":{"description":"jq, evaluated with a 100 ms budget and a 64 KB output cap. No input/inputs, no env, no modules. Paths start with a dot (.data.id, not data.id): a save refuses a transform it adds or changes that cannot compile. On a pre_call tool, a top-level call_settings object in the result (after transform) sets this call's voice and languages, and a top-level string system_prompt (at most 48000 characters) or first_message (at most 500) sets this call's system prompt or opening line, as a template whose {{var}} placeholders are filled from the call's variables and pre_call outputs (sync tools only; a request's own system_prompt or first_message wins; flow agents ignore them; a refused value is a receipt warning and never fails the call; never echoed on the call object; the receipt's call_prompt gives each one's length).","type":"string","uniqueKey":"tools.items.[INDEX].response.transform","typeLabel":"string"}},"type":"object","uniqueKey":"tools.items.[INDEX].response","typeLabel":"object"},"retry":{"additionalProperties":false,"description":"Defaults 0 for pre_call and on_call, 2 for post_call. on_call may not retry: a second attempt is another whole timeout of silence for the caller.","properties":{"attempts":{"description":"Retries after the first attempt fails; 0 means one attempt only. The default and the maximum depend on the phase (see retry).","minimum":0,"type":"integer","uniqueKey":"tools.items.[INDEX].retry.attempts","typeLabel":"integer"},"backoff_ms":{"default":500,"description":"Wait between attempts, in milliseconds. Default 500, at most 10000.","maximum":10000,"minimum":0,"type":"integer","uniqueKey":"tools.items.[INDEX].retry.backoff_ms","typeLabel":"integer"}},"type":"object","uniqueKey":"tools.items.[INDEX].retry","typeLabel":"object"},"speak_while":{"description":"on_call only: your own filler line, spoken while the tool runs. Empty means silence.","maxLength":300,"type":"string","uniqueKey":"tools.items.[INDEX].speak_while","typeLabel":"string"},"timeout_ms":{"description":"Defaults and ceilings are per phase: pre_call 5000/15000, on_call 10000/30000, post_call 15000/60000.","minimum":100,"type":"integer","uniqueKey":"tools.items.[INDEX].timeout_ms","typeLabel":"integer"},"when":{"description":"on_call only: the WHEN rule appended to the system prompt.","maxLength":1000,"type":"string","uniqueKey":"tools.items.[INDEX].when","typeLabel":"string"}},"required":["name","phase"],"type":"object","uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"maxItems":40,"type":"array","uniqueKey":"tools","typeLabel":"object[]"},"updated_at":{"format":"date-time","type":"string","uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"voice":{"additionalProperties":false,"properties":{"voice_id":{"type":"string","isRequired":true,"uniqueKey":"voice.voice_id","typeLabel":"string"},"language":{"type":"string","uniqueKey":"voice.language","typeLabel":"string"}},"required":["voice_id"],"type":"object","uniqueKey":"voice","typeLabel":"object"},"voicemail":{"additionalProperties":false,"properties":{"action":{"default":"hangup","enum":["hangup","message"],"type":"string","uniqueKey":"voicemail.action","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"voicemail.message","typeLabel":"string"}},"type":"object","uniqueKey":"voicemail","typeLabel":"object"},"warnings":{"description":"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.","items":{"additionalProperties":false,"properties":{"code":{"description":"What is wrong. romanized_speech: an Indian language typed in English letters.","enum":["romanized_speech"],"type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"language":{"description":"The language the line is in, as read from its words; the agent's own languages decide a tie.","enum":["gu","mr","bn","pa","ta","te","kn","ml","od"],"type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].language","typeLabel":"enum\u003cstring>"},"message":{"description":"One sentence for the person editing the agent, for example: This line is Gujarati typed in English letters. The voice reads English letters with English sounds, so the Gujarati comes out wrong. Write it in Gujarati script.","type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"path":{"description":"Where the line is in this object, for example first_message, end_call.message, system_prompt or flow.nodes[2].data.greeting.","type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].path","typeLabel":"string"},"text":{"description":"The line, at most 160 characters (… marks a cut).","maxLength":160,"type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].text","typeLabel":"string"}},"required":["code","path","language","text","message"],"type":"object","uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"maxItems":20,"type":"array","uniqueKey":"warnings","typeLabel":"object[]"}},"required":["behavior","secondary_languages","features"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"The agent, now node-based":{"title":"The agent, now node-based","summary":"200 — the agent, now node-based","value":{"revision":5,"draft":false,"archived":false,"analysis":{"enabled":false},"id":"agt_01K2M4P7QRSTVWXYZ0A1B2C3","object":"agent","name":"सर्विस रिमाइंडर","system_prompt":"आप आशु हैं, मिराई मोटर्स के सर्विस एडवाइज़र. {{name}} जी की {{vehicle}} की सर्विस {{due_date}} को ड्यू है. हिंदी में बात करें, छोटे वाक्य बोलें, और ग्राहक से सर्विस की तारीख कन्फर्म करें.","first_message":"नमस्ते, मैं आशु बोल रहा हूं मिराई मोटर्स से. एक मिनट है आपके पास?","voice":{"voice_id":"ashu","language":"hi"},"language":"hi","max_duration_secs":300,"end_call":{"enabled":true,"message":"धन्यवाद, आपका दिन शुभ हो.","confirm":true},"voicemail":{"action":"hangup"},"background_sound":{"sound":"off"},"behavior":{"interruptions":"normal","adaptive_interruptions":true,"pass_through":[],"date_awareness":true},"secondary_languages":["en"],"tools":[],"flow":{"nodes":[{"id":"persona","type":"globalNode","data":{"name":"Persona and rules","prompt":"You are Ashu, a service advisor at Mirai Motors.\nSpeak everyday Hindi in Devanagari; common English words such as service, slot and workshop are fine.\nSay one or two short sentences, then listen.\nNever promise a discount, a price or a pickup.\nWhen the condition of one of your functions is met, call it at once without saying anything first.","is_start":false,"allow_interrupt":true,"add_global_prompt":true,"extraction_enabled":false,"extraction_variables":[]}},{"id":"identity","type":"startCall","data":{"name":"Confirm the customer","prompt":"You have asked whether you are speaking with {{name}}. Wait for the answer.\nIf they confirm, call confirmed_identity.\nIf it is someone else or a wrong number, call wrong_person.\nDo not mention the car or the service before they confirm.","greeting":"नमस्ते, मैं मिराई मोटर्स से आशु बोल रहा हूं. क्या मेरी बात {{name}} जी से हो रही है?","is_start":true,"allow_interrupt":true,"add_global_prompt":true,"extraction_enabled":false,"extraction_variables":[]}},{"id":"offer_slot","type":"agentNode","data":{"name":"Book the service","prompt":"Tell them their {{vehicle}} is due for service on {{due_date}}, and ask which day they can bring it to the workshop.\nWhen they name a day, read it back once and call slot_booked.\nIf they are busy, ask once when to call them back, then call not_now.\nIf they do not want to book at all, call not_now.","is_start":false,"allow_interrupt":true,"add_global_prompt":true,"extraction_enabled":true,"extraction_variables":[{"name":"preferred_day","type":"string","prompt":"The day the customer chose for the service, in their words, for example Saturday or 20 August."},{"name":"callback_time","type":"string","prompt":"When the customer asked to be called back, in their words. Empty if they did not ask."}]}},{"id":"goodbye","type":"endCall","data":{"name":"Close","prompt":"In one sentence, repeat what was agreed. Thank them and say goodbye. Do not ask anything else.","is_start":false,"allow_interrupt":false,"add_global_prompt":true,"extraction_enabled":false,"extraction_variables":[]}},{"id":"not_customer","type":"endCall","data":{"name":"Wrong person","prompt":"Apologise for the trouble and say goodbye. Do not mention the car or the service.","is_start":false,"allow_interrupt":true,"add_global_prompt":true,"extraction_enabled":false,"extraction_variables":[]}}],"edges":[{"id":"e1","source":"identity","target":"offer_slot","data":{"label":"confirmed_identity","condition":"The caller confirmed they are the customer you asked for."}},{"id":"e2","source":"identity","target":"not_customer","data":{"label":"wrong_person","condition":"The caller is someone else, or says it is a wrong number."}},{"id":"e3","source":"offer_slot","target":"goodbye","data":{"label":"slot_booked","condition":"The customer named a day for the service and you read it back."}},{"id":"e4","source":"offer_slot","target":"goodbye","data":{"label":"not_now","condition":"The customer does not want to book now, and you have asked once when to call back if they were busy."}}]},"created_at":"2026-08-11T09:14:02Z","updated_at":"2026-08-11T09:56:02Z"}}},"exampleType":"examples"}},"exampleType":"examples"},"66e07d63-1488-43f5-b32c-6ad66b64d2eb":{"description":"A node offers a tool the agent does not have","content":{"application/json":{"examples":{"A node offers a tool the agent does not have":{"title":"A node offers a tool the agent does not have","summary":"400 — a node offers a tool the agent does not have","value":{"details":[{"path":"flow.nodes[2].data.tools[0]","message":"node \"offer_slot\" offers tool \"check_slots\", which is not an on_call tool of this agent; add it with phase on_call or remove it from the node"}],"error":"invalid_flow"}}},"exampleType":"examples"}},"exampleType":"examples"},"7ddbdb59-9206-4b3b-8d2e-a4e821e75326":{"description":"The agent changed since you read it","content":{"application/json":{"examples":{"The agent changed since you read it":{"title":"The agent changed since you read it","summary":"409 — the agent changed since you read it","value":{"error":{"code":"conflict","message":"agent changed; read its current revision and retry"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"0a319744-0462-402e-82c8-877b8e5fa231":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your workspace secret key, `sk_live_` followed by 32 hex characters. Create one in the console under **Developers**.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"66c2a53b-fc16-4515-8116-d3e7c375fb9b":{"url":"https://sandbox.voice.miraiminds.co","description":"Sandbox: trial workspaces, before your company goes live"},"7666e9c2-9858-4c24-9210-77961e56966e":{"url":"https://prod.voice.miraiminds.co","description":"Production: workspaces that have gone live"}},"schemas":{"e68385f1-f1bf-4569-9f88-7662391d6e0b":{"oneOf":[{"type":"object","description":"A condition gates a tool. Combinators all/any/not nest at most 8 deep; at most 64 comparisons. Fields are dotted paths into vars, call, now, tools, args (on_call) or analysis (post_call). secrets are not readable from a condition. A field that is missing at run time compares false.","required":["all"],"properties":{"all":{"description":"True when every condition in the list is true.","items":{"$circularRef":"e68385f1-f1bf-4569-9f88-7662391d6e0b"},"minItems":1,"type":"array","isRequired":true}},"additionalProperties":false},{"type":"object","description":"A condition gates a tool. Combinators all/any/not nest at most 8 deep; at most 64 comparisons. Fields are dotted paths into vars, call, now, tools, args (on_call) or analysis (post_call). secrets are not readable from a condition. A field that is missing at run time compares false.","required":["any"],"properties":{"any":{"description":"True when at least one condition in the list is true.","items":{"$circularRef":"e68385f1-f1bf-4569-9f88-7662391d6e0b"},"minItems":1,"type":"array","isRequired":true}},"additionalProperties":false},{"type":"object","description":"A condition gates a tool. Combinators all/any/not nest at most 8 deep; at most 64 comparisons. Fields are dotted paths into vars, call, now, tools, args (on_call) or analysis (post_call). secrets are not readable from a condition. A field that is missing at run time compares false.","required":["not"],"properties":{"not":{"oneOf":[{"isRequired":true}],"isRequired":true}},"additionalProperties":false},{"type":"object","description":"A condition gates a tool. Combinators all/any/not nest at most 8 deep; at most 64 comparisons. Fields are dotted paths into vars, call, now, tools, args (on_call) or analysis (post_call). secrets are not readable from a condition. A field that is missing at run time compares false.","required":["field","op"],"properties":{"field":{"description":"Dotted path, e.g. vars.priority or tools.lookup.tier. Use .0 for the first item of a list.","type":"string","isRequired":true},"op":{"description":"The comparison. exists, not_exists, is_true and is_false take no value; in and not_in take an array.","enum":["contains","ends_with","eq","exists","gt","gte","in","is_false","is_true","lt","lte","matches","neq","not_contains","not_exists","not_in","starts_with"],"type":"string","isRequired":true},"value":{"description":"A string, number or boolean; an array for in/not_in. Omitted for exists/not_exists/is_true/is_false."}},"additionalProperties":false}]}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Your workspace secret key, `sk_live_` followed by 32 hex characters. Create one in the console under **Developers**.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your workspace secret key, `sk_live_` followed by 32 hex characters. Create one in the console under **Developers**.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"miraiminds-0d8f849e","siteName":"Voice Infra","title":"Save a flow on an agent - Voice Infra","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T16:10:35.607Z","originalFileLocation":"api-reference/flows/save-a-flow-on-an-agent.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Replaces the agent\u0026#x27;s graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed. Each save is a new agent revision, so you can roll it back. if_revision refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as invalid_flow with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Voice Infra\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Save a flow on an agent - Voice Infra\">\u003cmeta data-mint-head property=\"og:description\" content=\"Replaces the agent\u0026#x27;s graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed. Each save is a new agent revision, so you can roll it back. if_revision refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as invalid_flow with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Voice Infra\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://miraiminds-0d8f849e.mintlify.site/_mintlify/api/og/v2?division=Flows\u0026amp;title=Save+a+flow+on+an+agent\u0026amp;description=Replaces+the+agent%27s+graph+without+resending+the+rest+of+the+agent.+It+also+turns+a+single-prompt+agent+into+a+node-based+one.+The+body+is+the+graph%3A+here%2C+the+\u0026amp;theme=5cd066bbcfc5d27ede9dde60\u0026amp;signature=90fcea608b0c4ab3b93a06a2482e28d72ed0be7f07e909441afc9c57430b0242\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Save a flow on an agent - Voice Infra\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Replaces the agent\u0026#x27;s graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed. Each save is a new agent revision, so you can roll it back. if_revision refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as invalid_flow with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://miraiminds-0d8f849e.mintlify.site/_mintlify/api/og/v2?division=Flows\u0026amp;title=Save+a+flow+on+an+agent\u0026amp;description=Replaces+the+agent%27s+graph+without+resending+the+rest+of+the+agent.+It+also+turns+a+single-prompt+agent+into+a+node-based+one.+The+body+is+the+graph%3A+here%2C+the+\u0026amp;theme=5cd066bbcfc5d27ede9dde60\u0026amp;signature=90fcea608b0c4ab3b93a06a2482e28d72ed0be7f07e909441afc9c57430b0242\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/miraiminds-0d8f849e/0jQIS4k-NetLxTYj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Voice Infra\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1B1A18\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/flows/save-a-flow-on-an-agent.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://voice.miraiminds.co/#organization\",\"name\":\"mirai minds\",\"url\":\"https://voice.miraiminds.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://voice.miraiminds.co/icons/icon-512.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.miraiminds.co#website\",\"name\":\"Voice Infra\",\"url\":\"https://docs.miraiminds.co\",\"publisher\":{\"@id\":\"https://voice.miraiminds.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent#webpage\",\"url\":\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent\",\"name\":\"Save a flow on an agent\",\"description\":\"Replaces the agent's graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed. Each save is a new agent revision, so you can roll it back. if_revision refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as invalid_flow with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.\",\"dateModified\":\"2026-11-13T16:10:35.607Z\",\"isPartOf\":{\"@id\":\"https://docs.miraiminds.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Flows\",\"item\":\"https://docs.miraiminds.co/api-reference/flows/transcribe-a-call-recording\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Save a flow on an agent\",\"item\":\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent#apireference\",\"headline\":\"Save a flow on an agent\",\"name\":\"Save a flow on an agent\",\"description\":\"Replaces the agent's graph without resending the rest of the agent. It also turns a single-prompt agent into a node-based one. The body is the graph: here, the one the test above fixed. Each save is a new agent revision, so you can roll it back. if_revision refuses the save if the agent changed since you read it; this collection keeps it up to date from the last agent response. Problems come back as invalid_flow with their paths, including node tools that are not on_call tools of this agent. The new graph applies from the next call.\",\"url\":\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent\",\"mainEntityOfPage\":{\"@id\":\"https://docs.miraiminds.co/api-reference/flows/save-a-flow-on-an-agent#webpage\"},\"dateModified\":\"2026-11-13T16:10:35.607Z\",\"publisher\":{\"@id\":\"https://voice.miraiminds.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.miraiminds.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Voice Infra\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"mirai minds\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/flows/save-a-flow-on-an-agent.md","siteName":"Voice Infra","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API reference","groups":[{"group":"Get started","pages":[{"title":"API reference","sidebarTitle":"Introduction","href":"/api-reference/introduction"},{"title":"Postman collection","sidebarTitle":"Postman collection","href":"/api-reference/postman"}]},{"group":"Agents","pages":[{"title":"Create agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents","href":"/api-reference/agents/create-agent"},{"title":"List agents","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents","href":"/api-reference/agents/list-agents"},{"title":"Get agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/{agent_id}","href":"/api-reference/agents/get-agent"},{"title":"Update agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/agents/{agent_id}","href":"/api-reference/agents/update-agent"},{"title":"Preview agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/{agent_id}/preview","href":"/api-reference/agents/preview-agent"},{"title":"List revisions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/{agent_id}/revisions","href":"/api-reference/agents/list-revisions"},{"title":"Get revision","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/{agent_id}/revisions/{revision}","href":"/api-reference/agents/get-revision"},{"title":"Roll back to a revision","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/{agent_id}/rollback","href":"/api-reference/agents/roll-back-to-a-revision"},{"title":"Publish agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/{agent_id}/publish","href":"/api-reference/agents/publish-agent"},{"title":"List agent logs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/{agent_id}/logs","href":"/api-reference/agents/list-agent-logs"},{"title":"Count agent errors and warnings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/{agent_id}/logs/summary","href":"/api-reference/agents/count-agent-errors-and-warnings"},{"title":"Get the agent schema","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/schema","href":"/api-reference/agents/get-the-agent-schema"},{"title":"Delete agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/agents/{agent_id}","href":"/api-reference/agents/delete-agent"}]},{"group":"Calls","pages":[{"title":"Place a call","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/calls","href":"/api-reference/calls/place-a-call"},{"title":"Start a browser call","sidebarTitle":"Start a browser call","openapi":"POST /v2/calls","href":"/api-reference/calls/start-a-browser-call"},{"title":"Get call","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls/{call_id}","href":"/api-reference/calls/get-call"},{"title":"List calls","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls","href":"/api-reference/calls/list-calls"},{"title":"Count calls","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls/summary","href":"/api-reference/calls/count-calls"},{"title":"How your calls went","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/insights","href":"/api-reference/calls/how-your-calls-went"},{"title":"Stream live events","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls/{call_id}/events","href":"/api-reference/calls/stream-live-events"},{"title":"Send a live control","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/calls/{call_id}/control","href":"/api-reference/calls/send-a-live-control"},{"title":"Get a live control","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls/{call_id}/control/{control_id}","href":"/api-reference/calls/get-a-live-control"},{"title":"Abort call","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/calls/{call_id}/abort","href":"/api-reference/calls/abort-call"},{"title":"Get transcript","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls/{call_id}/transcript","href":"/api-reference/calls/get-transcript"},{"title":"Get recording","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls/{call_id}/recording","href":"/api-reference/calls/get-recording"},{"title":"Get call analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls/{call_id}/analysis","href":"/api-reference/calls/get-call-analysis"},{"title":"Retry call analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/calls/{call_id}/analysis/retry","href":"/api-reference/calls/retry-call-analysis"},{"title":"Resend analysis webhook","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/calls/{call_id}/analysis/delivery/retry","href":"/api-reference/calls/resend-analysis-webhook"},{"title":"Rerun post-call tools","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/calls/{call_id}/post_call/rerun","href":"/api-reference/calls/rerun-post-call-tools"}]},{"group":"Flows","pages":[{"title":"Transcribe a call recording","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/flow/transcribe","href":"/api-reference/flows/transcribe-a-call-recording"},{"title":"Generate a flow","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/flow/generate","href":"/api-reference/flows/generate-a-flow"},{"title":"Validate a flow","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/flow/validate","href":"/api-reference/flows/validate-a-flow"},{"title":"Test and fix a flow","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/flow/refine","href":"/api-reference/flows/test-and-fix-a-flow"},{"title":"Get a flow test","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/flow/refine/{refine_id}","href":"/api-reference/flows/get-a-flow-test"},{"title":"Get an agent's latest flow test","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/{agent_id}/flow/refinement","href":"/api-reference/flows/get-an-agents-latest-flow-test"},{"title":"Cancel a flow test","description":"Stops a running test at once. What the models had already done is charged, and the job ends `canceled` with the rounds that finished. Cancelling a job that has already ended changes nothing and returns it as it is.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/flow/refine/{refine_id}/cancel","href":"/api-reference/flows/cancel-a-flow-test"},{"title":"Save a flow on an agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v2/agents/{agent_id}/flow","href":"/api-reference/flows/save-a-flow-on-an-agent"},{"title":"Get an agent's flow","description":"The agent's graph, with what you need to save it back: `agent_revision` (send it as `if_revision`) and `flow_revision`, a fingerprint that changes whenever the graph does. A single-prompt agent has no graph, so it is a 404.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/agents/{agent_id}/flow","href":"/api-reference/flows/get-an-agents-flow"}]},{"group":"Tools and secrets","pages":[{"title":"Get tool catalog","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/tools/catalog","href":"/api-reference/tools-and-secrets/get-tool-catalog"},{"title":"Store a secret","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v2/secrets/{secret_name}","href":"/api-reference/tools-and-secrets/store-a-secret"},{"title":"List secrets","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/secrets","href":"/api-reference/tools-and-secrets/list-secrets"},{"title":"Add or replace a tool","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v2/agents/{agent_id}/tools/{tool_name}","href":"/api-reference/tools-and-secrets/add-or-replace-a-tool"},{"title":"Test a tool","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/{agent_id}/tools/{tool_name}/test","href":"/api-reference/tools-and-secrets/test-a-tool"},{"title":"Test a condition","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/agents/{agent_id}/conditions/test","href":"/api-reference/tools-and-secrets/test-a-condition"},{"title":"List a call's tool runs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/calls/{call_id}/tool_runs","href":"/api-reference/tools-and-secrets/list-a-calls-tool-runs"},{"title":"Cancel a scheduled callback","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/callbacks/{callback_id}","href":"/api-reference/tools-and-secrets/cancel-a-scheduled-callback"},{"title":"Remove a tool","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/agents/{agent_id}/tools/{tool_name}","href":"/api-reference/tools-and-secrets/remove-a-tool"},{"title":"Delete a secret","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/secrets/{secret_name}","href":"/api-reference/tools-and-secrets/delete-a-secret"}]},{"group":"Campaigns","pages":[{"title":"Create a campaign","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns","href":"/api-reference/campaigns/create-a-campaign"},{"title":"Add contacts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/contacts","href":"/api-reference/campaigns/add-contacts"},{"title":"Remove a contact","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/campaigns/{campaign_id}/contacts/{contact_id}","href":"/api-reference/campaigns/remove-a-contact"},{"title":"Cancel a contact","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/contacts/{contact_id}/cancel","href":"/api-reference/campaigns/cancel-a-contact"},{"title":"Update a campaign","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/campaigns/{campaign_id}","href":"/api-reference/campaigns/update-a-campaign"},{"title":"Start a campaign","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/start","href":"/api-reference/campaigns/start-a-campaign"},{"title":"Get a campaign","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns/{campaign_id}","href":"/api-reference/campaigns/get-a-campaign"},{"title":"List contacts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns/{campaign_id}/contacts","href":"/api-reference/campaigns/list-contacts"},{"title":"List campaigns","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns","href":"/api-reference/campaigns/list-campaigns"},{"title":"List campaign groups","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaign-groups","href":"/api-reference/campaigns/list-campaign-groups"},{"title":"Pause a campaign","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/pause","href":"/api-reference/campaigns/pause-a-campaign"},{"title":"Resume a campaign","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/resume","href":"/api-reference/campaigns/resume-a-campaign"},{"title":"Get the history","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns/{campaign_id}/history","href":"/api-reference/campaigns/get-the-history"},{"title":"Call a contact again","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/contacts/{contact_id}/retry","href":"/api-reference/campaigns/call-a-contact-again"},{"title":"Get the report","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns/{campaign_id}/report","href":"/api-reference/campaigns/get-the-report"},{"title":"Get insights","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns/{campaign_id}/insights","href":"/api-reference/campaigns/get-insights"},{"title":"Rebuild insights","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/insights","href":"/api-reference/campaigns/rebuild-insights"},{"title":"Open the report page","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns/{campaign_id}/insights.html","href":"/api-reference/campaigns/open-the-report-page"},{"title":"Play a call from the report","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns/{campaign_id}/calls/{call_id}/audio","href":"/api-reference/campaigns/play-a-call-from-the-report"},{"title":"Share the report","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/share","href":"/api-reference/campaigns/share-the-report"},{"title":"Get the share link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/campaigns/{campaign_id}/share","href":"/api-reference/campaigns/get-the-share-link"},{"title":"Revoke the share link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/campaigns/{campaign_id}/share","href":"/api-reference/campaigns/revoke-the-share-link"},{"title":"Stop a campaign","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/stop","href":"/api-reference/campaigns/stop-a-campaign"},{"title":"Duplicate a campaign","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/campaigns/{campaign_id}/duplicate","href":"/api-reference/campaigns/duplicate-a-campaign"}]},{"group":"Do-not-call list","pages":[{"title":"Add a number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/dnc","href":"/api-reference/do-not-call-list/add-a-number"},{"title":"List numbers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/dnc","href":"/api-reference/do-not-call-list/list-numbers"},{"title":"Remove a number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/dnc/{phone}","href":"/api-reference/do-not-call-list/remove-a-number"}]},{"group":"Phone numbers","pages":[{"title":"Import a Plivo number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/phone-numbers","href":"/api-reference/phone-numbers/import-a-plivo-number"},{"title":"List phone numbers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/phone-numbers","href":"/api-reference/phone-numbers/list-phone-numbers"},{"title":"Get phone number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/phone-numbers/{phone_number_id}","href":"/api-reference/phone-numbers/get-phone-number"},{"title":"Assign an agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/phone-numbers/{phone_number_id}","href":"/api-reference/phone-numbers/assign-an-agent"},{"title":"Turn on incoming calls","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/phone-numbers/{phone_number_id}/activate","href":"/api-reference/phone-numbers/turn-on-incoming-calls"},{"title":"Rest a number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/phone-numbers/{phone_number_id}/rest","href":"/api-reference/phone-numbers/rest-a-number"},{"title":"Resume a number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/phone-numbers/{phone_number_id}/resume","href":"/api-reference/phone-numbers/resume-a-number"},{"title":"Retire a number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/phone-numbers/{phone_number_id}/retire","href":"/api-reference/phone-numbers/retire-a-number"},{"title":"Number health history","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/phone-numbers/{phone_number_id}/health","href":"/api-reference/phone-numbers/number-health-history"}]},{"group":"Phone pools","pages":[{"title":"Create a pool","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/phone-pools","href":"/api-reference/phone-pools/create-a-pool"},{"title":"List pools","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/phone-pools","href":"/api-reference/phone-pools/list-pools"},{"title":"Get a pool","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/phone-pools/{pool_id}","href":"/api-reference/phone-pools/get-a-pool"},{"title":"Change a pool","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/phone-pools/{pool_id}","href":"/api-reference/phone-pools/change-a-pool"},{"title":"Delete a pool","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/phone-pools/{pool_id}","href":"/api-reference/phone-pools/delete-a-pool"}]},{"group":"Telephony","pages":[{"title":"Get number options","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/options","href":"/api-reference/telephony/get-number-options"},{"title":"Get verification requirements","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/requirements","href":"/api-reference/telephony/get-verification-requirements"},{"title":"Get business verification","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/onboarding","href":"/api-reference/telephony/get-business-verification"},{"title":"Submit business verification","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/telephony/onboarding","href":"/api-reference/telephony/submit-business-verification"},{"title":"Refresh business verification","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/telephony/onboarding/{onboarding_id}/refresh","href":"/api-reference/telephony/refresh-business-verification"},{"title":"List business verifications","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/compliances","href":"/api-reference/telephony/list-business-verifications"},{"title":"List cities with numbers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/available-cities","href":"/api-reference/telephony/list-cities-with-numbers"},{"title":"Search available numbers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/available-numbers","href":"/api-reference/telephony/search-available-numbers"},{"title":"Quote a number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/telephony/quotes","href":"/api-reference/telephony/quote-a-number"},{"title":"Rent the quoted number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/telephony/rentals/{rental_id}/purchase","href":"/api-reference/telephony/rent-the-quoted-number"},{"title":"List rentals","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/rentals","href":"/api-reference/telephony/list-rentals"},{"title":"Get rental","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/rentals/{rental_id}","href":"/api-reference/telephony/get-rental"},{"title":"Change auto-renewal","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/telephony/rentals/{rental_id}","href":"/api-reference/telephony/change-auto-renewal"},{"title":"Connect your Plivo account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/telephony/connections","href":"/api-reference/telephony/connect-your-plivo-account"},{"title":"List Plivo connections","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/connections","href":"/api-reference/telephony/list-plivo-connections"},{"title":"Get Plivo connection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/connections/{connection_id}","href":"/api-reference/telephony/get-plivo-connection"},{"title":"List numbers in your Plivo account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/telephony/connections/{connection_id}/numbers","href":"/api-reference/telephony/list-numbers-in-your-plivo-account"},{"title":"Disable Plivo connection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/telephony/connections/{connection_id}","href":"/api-reference/telephony/disable-plivo-connection"},{"title":"Verify Plivo connection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/telephony/connections/{connection_id}/verify","href":"/api-reference/telephony/verify-plivo-connection"}]},{"group":"Transcriptions","pages":[{"title":"Create a transcription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/transcriptions","href":"/api-reference/transcriptions/create-a-transcription"},{"title":"Get a transcription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/transcriptions/{transcription_id}","href":"/api-reference/transcriptions/get-a-transcription"},{"title":"List transcriptions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/transcriptions","href":"/api-reference/transcriptions/list-transcriptions"}]},{"group":"Speech to text","pages":[{"title":"Transcribe a recording","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/stt","href":"/api-reference/speech-to-text/transcribe-a-recording"},{"title":"Mint stream tokens","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/stt/stream/tokens","href":"/api-reference/speech-to-text/mint-stream-tokens"},{"title":"List requests","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/stt/requests","href":"/api-reference/speech-to-text/list-requests"},{"title":"Get a request","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/stt/requests/{stt_request_id}","href":"/api-reference/speech-to-text/get-a-request"}]},{"group":"Text to speech","pages":[{"title":"Text to speech","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/tts","href":"/api-reference/text-to-speech/text-to-speech"},{"title":"List my TTS requests","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/tts/requests","href":"/api-reference/text-to-speech/list-my-tts-requests"},{"title":"Get a TTS request","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/tts/requests/{tts_request_id}","href":"/api-reference/text-to-speech/get-a-tts-request"},{"title":"Mint stream tokens","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/tts/stream/tokens","href":"/api-reference/text-to-speech/mint-stream-tokens"}]},{"group":"Wallet","pages":[{"title":"Get wallet","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/wallet","href":"/api-reference/wallet/get-wallet"},{"title":"List wallet transactions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/wallet/transactions","href":"/api-reference/wallet/list-wallet-transactions"}]},{"group":"Webhooks","pages":[{"title":"List event types","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/event-types","href":"/api-reference/webhooks/list-event-types"},{"title":"Create a destination","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/webhooks/endpoints","href":"/api-reference/webhooks/create-a-destination"},{"title":"List destinations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/endpoints","href":"/api-reference/webhooks/list-destinations"},{"title":"Get a destination","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/endpoints/{webhook_endpoint_id}","href":"/api-reference/webhooks/get-a-destination"},{"title":"Update a destination","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/webhooks/endpoints/{webhook_endpoint_id}","href":"/api-reference/webhooks/update-a-destination"},{"title":"Delete a destination","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/webhooks/endpoints/{webhook_endpoint_id}","href":"/api-reference/webhooks/delete-a-destination"},{"title":"Rotate the signing secret","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/webhooks/endpoints/{webhook_endpoint_id}/rotate-secret","href":"/api-reference/webhooks/rotate-the-signing-secret"},{"title":"Send a test event","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/webhooks/endpoints/{webhook_endpoint_id}/test","href":"/api-reference/webhooks/send-a-test-event"},{"title":"Subscribe a destination to events","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/webhooks/subscriptions","href":"/api-reference/webhooks/subscribe-a-destination-to-events"},{"title":"List subscriptions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/subscriptions","href":"/api-reference/webhooks/list-subscriptions"},{"title":"Get a subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/subscriptions/{webhook_subscription_id}","href":"/api-reference/webhooks/get-a-subscription"},{"title":"Change events or pause","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/webhooks/subscriptions/{webhook_subscription_id}","href":"/api-reference/webhooks/change-events-or-pause"},{"title":"Delete a subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v2/webhooks/subscriptions/{webhook_subscription_id}","href":"/api-reference/webhooks/delete-a-subscription"},{"title":"List events","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/events","href":"/api-reference/webhooks/list-events"},{"title":"Get an event","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/events/{webhook_event_id}","href":"/api-reference/webhooks/get-an-event"},{"title":"List deliveries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/deliveries","href":"/api-reference/webhooks/list-deliveries"},{"title":"Get a delivery","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/deliveries/{webhook_delivery_id}","href":"/api-reference/webhooks/get-a-delivery"},{"title":"List delivery attempts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/deliveries/{webhook_delivery_id}/attempts","href":"/api-reference/webhooks/list-delivery-attempts"},{"title":"Retry a delivery","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/webhooks/deliveries/{webhook_delivery_id}/retry","href":"/api-reference/webhooks/retry-a-delivery"},{"title":"Get webhook settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/settings","href":"/api-reference/webhooks/get-webhook-settings"},{"title":"Set the low-balance alert level","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/webhooks/settings","href":"/api-reference/webhooks/set-the-low-balance-alert-level"},{"title":"List call webhook_url deliveries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/webhooks/call-deliveries","href":"/api-reference/webhooks/list-call-webhook_url-deliveries"}]},{"group":"Sub-workspaces","pages":[{"title":"Create a sub-workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/workspaces","href":"/api-reference/sub-workspaces/create-a-sub-workspace"},{"title":"List sub-workspaces","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/workspaces","href":"/api-reference/sub-workspaces/list-sub-workspaces"},{"title":"Get a sub-workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/workspaces/{sub_workspace_id}","href":"/api-reference/sub-workspaces/get-a-sub-workspace"},{"title":"Update a sub-workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v2/workspaces/{sub_workspace_id}","href":"/api-reference/sub-workspaces/update-a-sub-workspace"},{"title":"Archive a sub-workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/workspaces/{sub_workspace_id}/archive","href":"/api-reference/sub-workspaces/archive-a-sub-workspace"},{"title":"Restore a sub-workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/workspaces/{sub_workspace_id}/restore","href":"/api-reference/sub-workspaces/restore-a-sub-workspace"},{"title":"Onboard a custom brand (v1)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/workspace/onboard/custom","href":"/api-reference/sub-workspaces/onboard-a-custom-brand-v1"},{"title":"Onboard a Shopify brand (v1)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v2/workspace/onboard/shopify","href":"/api-reference/sub-workspaces/onboard-a-shopify-brand-v1"}]},{"group":"Reference","pages":[{"title":"List voices","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/voices","href":"/api-reference/reference/list-voices"},{"title":"Get the API contract","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v2/schema","href":"/api-reference/reference/get-the-api-contract"}]}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks/overview"}]}]},"basePath":"","title":"Save a flow on an agent - Voice Infra","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-BIYvYBgk.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js","Markdown-CEfymfIH.js","clsx-Dq9TQuNi.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-D2J8knkn.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BgZ2ThuU.js"]}