curl --request POST \ --url https://api.instaview.sk/agents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "composerSessionId": "9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90", "name": "Senior Developer Phone Screen", "type": "ONLINE", "focus": "SCREENING", "language": "EN", "duration": 30, "questions": [ "Tell me about a challenging project you worked on" ], "instructions": "Focus on communication skills and team fit", "companyPhoneNumberId": "123e4567-e89b-12d3-a456-426614174000", "metadata": { "department": "Sales", "internalId": "AGENT-001" }, "cefrLevel": "B1", "backgroundSound": "OFFICE", "contextConfig": { "role": "an account executive for Acme", "communicationStyle": "concise and direct", "callToAction": "book a 30-minute demo", "useContactContext": true }, "analyticsConfig": { "extractionTargets": [ { "label": "Budget confirmed", "type": "bool", "key": "budget_confirmed", "enumValues": [ "hot", "warm", "cold" ], "ideal": "A confirmed budget of at least 10k", "importance": "PREFERRED", "weight": 40 } ], "scoringCriteria": [ { "label": "Handled objections", "description": "Acknowledged the objection and answered it with a concrete example", "key": "handled_objections", "importance": "PREFERRED", "weight": 40 } ], "outcomes": [ { "label": "Meeting booked", "description": "The contact agreed to a specific date and time", "key": "meeting_booked" } ], "outputTags": [ { "label": "Needs follow-up", "key": "needs_followup", "description": "The contact asked to be called back" } ], "capture": { "recording": true, "transcript": true, "summary": true, "qa": true, "evaluation": true, "sentiment": true } }, "callConfig": {}, "overrides": { "companyName": "Acme Manufacturing", "companyDescription": "Acme makes industrial fasteners and employs 400 people across Slovakia." }}'
import requests
url = "https://api.instaview.sk/agents"
payload = {
"composerSessionId": "9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90",
"name": "Senior Developer Phone Screen",
"type": "ONLINE",
"focus": "SCREENING",
"language": "EN",
"duration": 30,
"questions": ["Tell me about a challenging project you worked on"],
"instructions": "Focus on communication skills and team fit",
"companyPhoneNumberId": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"department": "Sales",
"internalId": "AGENT-001"
},
"cefrLevel": "B1",
"backgroundSound": "OFFICE",
"contextConfig": {
"role": "an account executive for Acme",
"communicationStyle": "concise and direct",
"callToAction": "book a 30-minute demo",
"useContactContext": True
},
"analyticsConfig": {
"extractionTargets": [
{
"label": "Budget confirmed",
"type": "bool",
"key": "budget_confirmed",
"enumValues": ["hot", "warm", "cold"],
"ideal": "A confirmed budget of at least 10k",
"importance": "PREFERRED",
"weight": 40
}
],
"scoringCriteria": [
{
"label": "Handled objections",
"description": "Acknowledged the objection and answered it with a concrete example",
"key": "handled_objections",
"importance": "PREFERRED",
"weight": 40
}
],
"outcomes": [
{
"label": "Meeting booked",
"description": "The contact agreed to a specific date and time",
"key": "meeting_booked"
}
],
"outputTags": [
{
"label": "Needs follow-up",
"key": "needs_followup",
"description": "The contact asked to be called back"
}
],
"capture": {
"recording": True,
"transcript": True,
"summary": True,
"qa": True,
"evaluation": True,
"sentiment": True
}
},
"callConfig": {},
"overrides": {
"companyName": "Acme Manufacturing",
"companyDescription": "Acme makes industrial fasteners and employs 400 people across Slovakia."
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
composerSessionId: '9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90',
name: 'Senior Developer Phone Screen',
type: 'ONLINE',
focus: 'SCREENING',
language: 'EN',
duration: 30,
questions: ['Tell me about a challenging project you worked on'],
instructions: 'Focus on communication skills and team fit',
companyPhoneNumberId: '123e4567-e89b-12d3-a456-426614174000',
metadata: {department: 'Sales', internalId: 'AGENT-001'},
cefrLevel: 'B1',
backgroundSound: 'OFFICE',
contextConfig: {
role: 'an account executive for Acme',
communicationStyle: 'concise and direct',
callToAction: 'book a 30-minute demo',
useContactContext: true
},
analyticsConfig: {
extractionTargets: [
{
label: 'Budget confirmed',
type: 'bool',
key: 'budget_confirmed',
enumValues: ['hot', 'warm', 'cold'],
ideal: 'A confirmed budget of at least 10k',
importance: 'PREFERRED',
weight: 40
}
],
scoringCriteria: [
{
label: 'Handled objections',
description: 'Acknowledged the objection and answered it with a concrete example',
key: 'handled_objections',
importance: 'PREFERRED',
weight: 40
}
],
outcomes: [
{
label: 'Meeting booked',
description: 'The contact agreed to a specific date and time',
key: 'meeting_booked'
}
],
outputTags: [
{
label: 'Needs follow-up',
key: 'needs_followup',
description: 'The contact asked to be called back'
}
],
capture: {
recording: true,
transcript: true,
summary: true,
qa: true,
evaluation: true,
sentiment: true
}
},
callConfig: {},
overrides: {
companyName: 'Acme Manufacturing',
companyDescription: 'Acme makes industrial fasteners and employs 400 people across Slovakia.'
}
})
};
fetch('https://api.instaview.sk/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instaview.sk/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'composerSessionId' => '9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90',
'name' => 'Senior Developer Phone Screen',
'type' => 'ONLINE',
'focus' => 'SCREENING',
'language' => 'EN',
'duration' => 30,
'questions' => [
'Tell me about a challenging project you worked on'
],
'instructions' => 'Focus on communication skills and team fit',
'companyPhoneNumberId' => '123e4567-e89b-12d3-a456-426614174000',
'metadata' => [
'department' => 'Sales',
'internalId' => 'AGENT-001'
],
'cefrLevel' => 'B1',
'backgroundSound' => 'OFFICE',
'contextConfig' => [
'role' => 'an account executive for Acme',
'communicationStyle' => 'concise and direct',
'callToAction' => 'book a 30-minute demo',
'useContactContext' => true
],
'analyticsConfig' => [
'extractionTargets' => [
[
'label' => 'Budget confirmed',
'type' => 'bool',
'key' => 'budget_confirmed',
'enumValues' => [
'hot',
'warm',
'cold'
],
'ideal' => 'A confirmed budget of at least 10k',
'importance' => 'PREFERRED',
'weight' => 40
]
],
'scoringCriteria' => [
[
'label' => 'Handled objections',
'description' => 'Acknowledged the objection and answered it with a concrete example',
'key' => 'handled_objections',
'importance' => 'PREFERRED',
'weight' => 40
]
],
'outcomes' => [
[
'label' => 'Meeting booked',
'description' => 'The contact agreed to a specific date and time',
'key' => 'meeting_booked'
]
],
'outputTags' => [
[
'label' => 'Needs follow-up',
'key' => 'needs_followup',
'description' => 'The contact asked to be called back'
]
],
'capture' => [
'recording' => true,
'transcript' => true,
'summary' => true,
'qa' => true,
'evaluation' => true,
'sentiment' => true
]
],
'callConfig' => [
],
'overrides' => [
'companyName' => 'Acme Manufacturing',
'companyDescription' => 'Acme makes industrial fasteners and employs 400 people across Slovakia.'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.instaview.sk/agents"
payload := strings.NewReader("{\n \"composerSessionId\": \"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90\",\n \"name\": \"Senior Developer Phone Screen\",\n \"type\": \"ONLINE\",\n \"focus\": \"SCREENING\",\n \"language\": \"EN\",\n \"duration\": 30,\n \"questions\": [\n \"Tell me about a challenging project you worked on\"\n ],\n \"instructions\": \"Focus on communication skills and team fit\",\n \"companyPhoneNumberId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"metadata\": {\n \"department\": \"Sales\",\n \"internalId\": \"AGENT-001\"\n },\n \"cefrLevel\": \"B1\",\n \"backgroundSound\": \"OFFICE\",\n \"contextConfig\": {\n \"role\": \"an account executive for Acme\",\n \"communicationStyle\": \"concise and direct\",\n \"callToAction\": \"book a 30-minute demo\",\n \"useContactContext\": true\n },\n \"analyticsConfig\": {\n \"extractionTargets\": [\n {\n \"label\": \"Budget confirmed\",\n \"type\": \"bool\",\n \"key\": \"budget_confirmed\",\n \"enumValues\": [\n \"hot\",\n \"warm\",\n \"cold\"\n ],\n \"ideal\": \"A confirmed budget of at least 10k\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"scoringCriteria\": [\n {\n \"label\": \"Handled objections\",\n \"description\": \"Acknowledged the objection and answered it with a concrete example\",\n \"key\": \"handled_objections\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"outcomes\": [\n {\n \"label\": \"Meeting booked\",\n \"description\": \"The contact agreed to a specific date and time\",\n \"key\": \"meeting_booked\"\n }\n ],\n \"outputTags\": [\n {\n \"label\": \"Needs follow-up\",\n \"key\": \"needs_followup\",\n \"description\": \"The contact asked to be called back\"\n }\n ],\n \"capture\": {\n \"recording\": true,\n \"transcript\": true,\n \"summary\": true,\n \"qa\": true,\n \"evaluation\": true,\n \"sentiment\": true\n }\n },\n \"callConfig\": {},\n \"overrides\": {\n \"companyName\": \"Acme Manufacturing\",\n \"companyDescription\": \"Acme makes industrial fasteners and employs 400 people across Slovakia.\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.instaview.sk/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"composerSessionId\": \"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90\",\n \"name\": \"Senior Developer Phone Screen\",\n \"type\": \"ONLINE\",\n \"focus\": \"SCREENING\",\n \"language\": \"EN\",\n \"duration\": 30,\n \"questions\": [\n \"Tell me about a challenging project you worked on\"\n ],\n \"instructions\": \"Focus on communication skills and team fit\",\n \"companyPhoneNumberId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"metadata\": {\n \"department\": \"Sales\",\n \"internalId\": \"AGENT-001\"\n },\n \"cefrLevel\": \"B1\",\n \"backgroundSound\": \"OFFICE\",\n \"contextConfig\": {\n \"role\": \"an account executive for Acme\",\n \"communicationStyle\": \"concise and direct\",\n \"callToAction\": \"book a 30-minute demo\",\n \"useContactContext\": true\n },\n \"analyticsConfig\": {\n \"extractionTargets\": [\n {\n \"label\": \"Budget confirmed\",\n \"type\": \"bool\",\n \"key\": \"budget_confirmed\",\n \"enumValues\": [\n \"hot\",\n \"warm\",\n \"cold\"\n ],\n \"ideal\": \"A confirmed budget of at least 10k\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"scoringCriteria\": [\n {\n \"label\": \"Handled objections\",\n \"description\": \"Acknowledged the objection and answered it with a concrete example\",\n \"key\": \"handled_objections\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"outcomes\": [\n {\n \"label\": \"Meeting booked\",\n \"description\": \"The contact agreed to a specific date and time\",\n \"key\": \"meeting_booked\"\n }\n ],\n \"outputTags\": [\n {\n \"label\": \"Needs follow-up\",\n \"key\": \"needs_followup\",\n \"description\": \"The contact asked to be called back\"\n }\n ],\n \"capture\": {\n \"recording\": true,\n \"transcript\": true,\n \"summary\": true,\n \"qa\": true,\n \"evaluation\": true,\n \"sentiment\": true\n }\n },\n \"callConfig\": {},\n \"overrides\": {\n \"companyName\": \"Acme Manufacturing\",\n \"companyDescription\": \"Acme makes industrial fasteners and employs 400 people across Slovakia.\"\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.instaview.sk/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"composerSessionId\": \"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90\",\n \"name\": \"Senior Developer Phone Screen\",\n \"type\": \"ONLINE\",\n \"focus\": \"SCREENING\",\n \"language\": \"EN\",\n \"duration\": 30,\n \"questions\": [\n \"Tell me about a challenging project you worked on\"\n ],\n \"instructions\": \"Focus on communication skills and team fit\",\n \"companyPhoneNumberId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"metadata\": {\n \"department\": \"Sales\",\n \"internalId\": \"AGENT-001\"\n },\n \"cefrLevel\": \"B1\",\n \"backgroundSound\": \"OFFICE\",\n \"contextConfig\": {\n \"role\": \"an account executive for Acme\",\n \"communicationStyle\": \"concise and direct\",\n \"callToAction\": \"book a 30-minute demo\",\n \"useContactContext\": true\n },\n \"analyticsConfig\": {\n \"extractionTargets\": [\n {\n \"label\": \"Budget confirmed\",\n \"type\": \"bool\",\n \"key\": \"budget_confirmed\",\n \"enumValues\": [\n \"hot\",\n \"warm\",\n \"cold\"\n ],\n \"ideal\": \"A confirmed budget of at least 10k\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"scoringCriteria\": [\n {\n \"label\": \"Handled objections\",\n \"description\": \"Acknowledged the objection and answered it with a concrete example\",\n \"key\": \"handled_objections\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"outcomes\": [\n {\n \"label\": \"Meeting booked\",\n \"description\": \"The contact agreed to a specific date and time\",\n \"key\": \"meeting_booked\"\n }\n ],\n \"outputTags\": [\n {\n \"label\": \"Needs follow-up\",\n \"key\": \"needs_followup\",\n \"description\": \"The contact asked to be called back\"\n }\n ],\n \"capture\": {\n \"recording\": true,\n \"transcript\": true,\n \"summary\": true,\n \"qa\": true,\n \"evaluation\": true,\n \"sentiment\": true\n }\n },\n \"callConfig\": {},\n \"overrides\": {\n \"companyName\": \"Acme Manufacturing\",\n \"companyDescription\": \"Acme makes industrial fasteners and employs 400 people across Slovakia.\"\n }\n}"
response = http.request(request)
puts response.read_body
{ "id": "123e4567-e89b-12d3-a456-426614174000", "name": "Frontend Developer Interview", "type": "ONLINE", "focus": "SCREENING", "language": "EN", "duration": 30, "createdAt": "2025-11-20T10:30:00Z", "updatedAt": "2025-11-20T10:30:00Z", "questions": [ "What is your experience with React?" ], "instructions": "Focus on technical skills and previous project experience", "voiceId": "ALEX", "companyId": "123e4567-e89b-12d3-a456-426614174000", "metadata": { "department": "Sales" }, "cefrLevel": "B1", "backgroundSound": "OFFICE", "flow": { "firstMessage": { "type": "first_message", "text": "Hi {{contact.firstName}}, do you have two minutes?", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "label": "Qualify budget" }, "sections": [ { "type": "sequential", "prompt": "Introduce yourself and explain why you are calling.", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "label": "Qualify budget" } ], "lastMessage": { "type": "last_message", "text": "Thanks for your time — have a great day!", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "label": "Qualify budget" }, "schemaVersion": "1.0.0" }, "guardrails": { "rules": [ "Never quote a price", "Never promise a delivery date" ] }, "contextConfig": { "role": "an account executive for Acme", "communicationStyle": "concise and direct", "callToAction": "book a 30-minute demo", "useContactContext": true }, "analyticsConfig": { "extractionTargets": [ { "label": "Budget confirmed", "type": "bool", "key": "budget_confirmed", "enumValues": [ "hot", "warm", "cold" ], "ideal": "A confirmed budget of at least 10k", "importance": "PREFERRED", "weight": 40 } ], "scoringCriteria": [ { "label": "Handled objections", "description": "Acknowledged the objection and answered it with a concrete example", "key": "handled_objections", "importance": "PREFERRED", "weight": 40 } ], "outcomes": [ { "label": "Meeting booked", "description": "The contact agreed to a specific date and time", "key": "meeting_booked" } ], "outputTags": [ { "label": "Needs follow-up", "key": "needs_followup", "description": "The contact asked to be called back" } ], "capture": { "recording": true, "transcript": true, "summary": true, "qa": true, "evaluation": true, "sentiment": true } }, "callConfig": { "retryPolicy": { "maxAttempts": 3 }, "callWindow": { "mode": "custom", "days": [ "mon", "tue", "wed", "thu", "fri" ], "start": "09:00", "end": "18:00", "timezoneAnchor": { "mode": "contact", "timezone": "Europe/Bratislava", "fallbackTimezone": "Europe/Bratislava" } } }, "overrides": { "companyName": "Acme Manufacturing", "companyDescription": "Acme makes industrial fasteners and employs 400 people across Slovakia." }}
Agents
Create Agent
Creates a new agent scoped to the API key’s company. Send a flow (with optional guardrails and contextConfig) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template focus.
POST
/
agents
Create agent
curl --request POST \ --url https://api.instaview.sk/agents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "composerSessionId": "9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90", "name": "Senior Developer Phone Screen", "type": "ONLINE", "focus": "SCREENING", "language": "EN", "duration": 30, "questions": [ "Tell me about a challenging project you worked on" ], "instructions": "Focus on communication skills and team fit", "companyPhoneNumberId": "123e4567-e89b-12d3-a456-426614174000", "metadata": { "department": "Sales", "internalId": "AGENT-001" }, "cefrLevel": "B1", "backgroundSound": "OFFICE", "contextConfig": { "role": "an account executive for Acme", "communicationStyle": "concise and direct", "callToAction": "book a 30-minute demo", "useContactContext": true }, "analyticsConfig": { "extractionTargets": [ { "label": "Budget confirmed", "type": "bool", "key": "budget_confirmed", "enumValues": [ "hot", "warm", "cold" ], "ideal": "A confirmed budget of at least 10k", "importance": "PREFERRED", "weight": 40 } ], "scoringCriteria": [ { "label": "Handled objections", "description": "Acknowledged the objection and answered it with a concrete example", "key": "handled_objections", "importance": "PREFERRED", "weight": 40 } ], "outcomes": [ { "label": "Meeting booked", "description": "The contact agreed to a specific date and time", "key": "meeting_booked" } ], "outputTags": [ { "label": "Needs follow-up", "key": "needs_followup", "description": "The contact asked to be called back" } ], "capture": { "recording": true, "transcript": true, "summary": true, "qa": true, "evaluation": true, "sentiment": true } }, "callConfig": {}, "overrides": { "companyName": "Acme Manufacturing", "companyDescription": "Acme makes industrial fasteners and employs 400 people across Slovakia." }}'
import requests
url = "https://api.instaview.sk/agents"
payload = {
"composerSessionId": "9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90",
"name": "Senior Developer Phone Screen",
"type": "ONLINE",
"focus": "SCREENING",
"language": "EN",
"duration": 30,
"questions": ["Tell me about a challenging project you worked on"],
"instructions": "Focus on communication skills and team fit",
"companyPhoneNumberId": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"department": "Sales",
"internalId": "AGENT-001"
},
"cefrLevel": "B1",
"backgroundSound": "OFFICE",
"contextConfig": {
"role": "an account executive for Acme",
"communicationStyle": "concise and direct",
"callToAction": "book a 30-minute demo",
"useContactContext": True
},
"analyticsConfig": {
"extractionTargets": [
{
"label": "Budget confirmed",
"type": "bool",
"key": "budget_confirmed",
"enumValues": ["hot", "warm", "cold"],
"ideal": "A confirmed budget of at least 10k",
"importance": "PREFERRED",
"weight": 40
}
],
"scoringCriteria": [
{
"label": "Handled objections",
"description": "Acknowledged the objection and answered it with a concrete example",
"key": "handled_objections",
"importance": "PREFERRED",
"weight": 40
}
],
"outcomes": [
{
"label": "Meeting booked",
"description": "The contact agreed to a specific date and time",
"key": "meeting_booked"
}
],
"outputTags": [
{
"label": "Needs follow-up",
"key": "needs_followup",
"description": "The contact asked to be called back"
}
],
"capture": {
"recording": True,
"transcript": True,
"summary": True,
"qa": True,
"evaluation": True,
"sentiment": True
}
},
"callConfig": {},
"overrides": {
"companyName": "Acme Manufacturing",
"companyDescription": "Acme makes industrial fasteners and employs 400 people across Slovakia."
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
composerSessionId: '9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90',
name: 'Senior Developer Phone Screen',
type: 'ONLINE',
focus: 'SCREENING',
language: 'EN',
duration: 30,
questions: ['Tell me about a challenging project you worked on'],
instructions: 'Focus on communication skills and team fit',
companyPhoneNumberId: '123e4567-e89b-12d3-a456-426614174000',
metadata: {department: 'Sales', internalId: 'AGENT-001'},
cefrLevel: 'B1',
backgroundSound: 'OFFICE',
contextConfig: {
role: 'an account executive for Acme',
communicationStyle: 'concise and direct',
callToAction: 'book a 30-minute demo',
useContactContext: true
},
analyticsConfig: {
extractionTargets: [
{
label: 'Budget confirmed',
type: 'bool',
key: 'budget_confirmed',
enumValues: ['hot', 'warm', 'cold'],
ideal: 'A confirmed budget of at least 10k',
importance: 'PREFERRED',
weight: 40
}
],
scoringCriteria: [
{
label: 'Handled objections',
description: 'Acknowledged the objection and answered it with a concrete example',
key: 'handled_objections',
importance: 'PREFERRED',
weight: 40
}
],
outcomes: [
{
label: 'Meeting booked',
description: 'The contact agreed to a specific date and time',
key: 'meeting_booked'
}
],
outputTags: [
{
label: 'Needs follow-up',
key: 'needs_followup',
description: 'The contact asked to be called back'
}
],
capture: {
recording: true,
transcript: true,
summary: true,
qa: true,
evaluation: true,
sentiment: true
}
},
callConfig: {},
overrides: {
companyName: 'Acme Manufacturing',
companyDescription: 'Acme makes industrial fasteners and employs 400 people across Slovakia.'
}
})
};
fetch('https://api.instaview.sk/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instaview.sk/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'composerSessionId' => '9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90',
'name' => 'Senior Developer Phone Screen',
'type' => 'ONLINE',
'focus' => 'SCREENING',
'language' => 'EN',
'duration' => 30,
'questions' => [
'Tell me about a challenging project you worked on'
],
'instructions' => 'Focus on communication skills and team fit',
'companyPhoneNumberId' => '123e4567-e89b-12d3-a456-426614174000',
'metadata' => [
'department' => 'Sales',
'internalId' => 'AGENT-001'
],
'cefrLevel' => 'B1',
'backgroundSound' => 'OFFICE',
'contextConfig' => [
'role' => 'an account executive for Acme',
'communicationStyle' => 'concise and direct',
'callToAction' => 'book a 30-minute demo',
'useContactContext' => true
],
'analyticsConfig' => [
'extractionTargets' => [
[
'label' => 'Budget confirmed',
'type' => 'bool',
'key' => 'budget_confirmed',
'enumValues' => [
'hot',
'warm',
'cold'
],
'ideal' => 'A confirmed budget of at least 10k',
'importance' => 'PREFERRED',
'weight' => 40
]
],
'scoringCriteria' => [
[
'label' => 'Handled objections',
'description' => 'Acknowledged the objection and answered it with a concrete example',
'key' => 'handled_objections',
'importance' => 'PREFERRED',
'weight' => 40
]
],
'outcomes' => [
[
'label' => 'Meeting booked',
'description' => 'The contact agreed to a specific date and time',
'key' => 'meeting_booked'
]
],
'outputTags' => [
[
'label' => 'Needs follow-up',
'key' => 'needs_followup',
'description' => 'The contact asked to be called back'
]
],
'capture' => [
'recording' => true,
'transcript' => true,
'summary' => true,
'qa' => true,
'evaluation' => true,
'sentiment' => true
]
],
'callConfig' => [
],
'overrides' => [
'companyName' => 'Acme Manufacturing',
'companyDescription' => 'Acme makes industrial fasteners and employs 400 people across Slovakia.'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.instaview.sk/agents"
payload := strings.NewReader("{\n \"composerSessionId\": \"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90\",\n \"name\": \"Senior Developer Phone Screen\",\n \"type\": \"ONLINE\",\n \"focus\": \"SCREENING\",\n \"language\": \"EN\",\n \"duration\": 30,\n \"questions\": [\n \"Tell me about a challenging project you worked on\"\n ],\n \"instructions\": \"Focus on communication skills and team fit\",\n \"companyPhoneNumberId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"metadata\": {\n \"department\": \"Sales\",\n \"internalId\": \"AGENT-001\"\n },\n \"cefrLevel\": \"B1\",\n \"backgroundSound\": \"OFFICE\",\n \"contextConfig\": {\n \"role\": \"an account executive for Acme\",\n \"communicationStyle\": \"concise and direct\",\n \"callToAction\": \"book a 30-minute demo\",\n \"useContactContext\": true\n },\n \"analyticsConfig\": {\n \"extractionTargets\": [\n {\n \"label\": \"Budget confirmed\",\n \"type\": \"bool\",\n \"key\": \"budget_confirmed\",\n \"enumValues\": [\n \"hot\",\n \"warm\",\n \"cold\"\n ],\n \"ideal\": \"A confirmed budget of at least 10k\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"scoringCriteria\": [\n {\n \"label\": \"Handled objections\",\n \"description\": \"Acknowledged the objection and answered it with a concrete example\",\n \"key\": \"handled_objections\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"outcomes\": [\n {\n \"label\": \"Meeting booked\",\n \"description\": \"The contact agreed to a specific date and time\",\n \"key\": \"meeting_booked\"\n }\n ],\n \"outputTags\": [\n {\n \"label\": \"Needs follow-up\",\n \"key\": \"needs_followup\",\n \"description\": \"The contact asked to be called back\"\n }\n ],\n \"capture\": {\n \"recording\": true,\n \"transcript\": true,\n \"summary\": true,\n \"qa\": true,\n \"evaluation\": true,\n \"sentiment\": true\n }\n },\n \"callConfig\": {},\n \"overrides\": {\n \"companyName\": \"Acme Manufacturing\",\n \"companyDescription\": \"Acme makes industrial fasteners and employs 400 people across Slovakia.\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.instaview.sk/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"composerSessionId\": \"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90\",\n \"name\": \"Senior Developer Phone Screen\",\n \"type\": \"ONLINE\",\n \"focus\": \"SCREENING\",\n \"language\": \"EN\",\n \"duration\": 30,\n \"questions\": [\n \"Tell me about a challenging project you worked on\"\n ],\n \"instructions\": \"Focus on communication skills and team fit\",\n \"companyPhoneNumberId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"metadata\": {\n \"department\": \"Sales\",\n \"internalId\": \"AGENT-001\"\n },\n \"cefrLevel\": \"B1\",\n \"backgroundSound\": \"OFFICE\",\n \"contextConfig\": {\n \"role\": \"an account executive for Acme\",\n \"communicationStyle\": \"concise and direct\",\n \"callToAction\": \"book a 30-minute demo\",\n \"useContactContext\": true\n },\n \"analyticsConfig\": {\n \"extractionTargets\": [\n {\n \"label\": \"Budget confirmed\",\n \"type\": \"bool\",\n \"key\": \"budget_confirmed\",\n \"enumValues\": [\n \"hot\",\n \"warm\",\n \"cold\"\n ],\n \"ideal\": \"A confirmed budget of at least 10k\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"scoringCriteria\": [\n {\n \"label\": \"Handled objections\",\n \"description\": \"Acknowledged the objection and answered it with a concrete example\",\n \"key\": \"handled_objections\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"outcomes\": [\n {\n \"label\": \"Meeting booked\",\n \"description\": \"The contact agreed to a specific date and time\",\n \"key\": \"meeting_booked\"\n }\n ],\n \"outputTags\": [\n {\n \"label\": \"Needs follow-up\",\n \"key\": \"needs_followup\",\n \"description\": \"The contact asked to be called back\"\n }\n ],\n \"capture\": {\n \"recording\": true,\n \"transcript\": true,\n \"summary\": true,\n \"qa\": true,\n \"evaluation\": true,\n \"sentiment\": true\n }\n },\n \"callConfig\": {},\n \"overrides\": {\n \"companyName\": \"Acme Manufacturing\",\n \"companyDescription\": \"Acme makes industrial fasteners and employs 400 people across Slovakia.\"\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.instaview.sk/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"composerSessionId\": \"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90\",\n \"name\": \"Senior Developer Phone Screen\",\n \"type\": \"ONLINE\",\n \"focus\": \"SCREENING\",\n \"language\": \"EN\",\n \"duration\": 30,\n \"questions\": [\n \"Tell me about a challenging project you worked on\"\n ],\n \"instructions\": \"Focus on communication skills and team fit\",\n \"companyPhoneNumberId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"metadata\": {\n \"department\": \"Sales\",\n \"internalId\": \"AGENT-001\"\n },\n \"cefrLevel\": \"B1\",\n \"backgroundSound\": \"OFFICE\",\n \"contextConfig\": {\n \"role\": \"an account executive for Acme\",\n \"communicationStyle\": \"concise and direct\",\n \"callToAction\": \"book a 30-minute demo\",\n \"useContactContext\": true\n },\n \"analyticsConfig\": {\n \"extractionTargets\": [\n {\n \"label\": \"Budget confirmed\",\n \"type\": \"bool\",\n \"key\": \"budget_confirmed\",\n \"enumValues\": [\n \"hot\",\n \"warm\",\n \"cold\"\n ],\n \"ideal\": \"A confirmed budget of at least 10k\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"scoringCriteria\": [\n {\n \"label\": \"Handled objections\",\n \"description\": \"Acknowledged the objection and answered it with a concrete example\",\n \"key\": \"handled_objections\",\n \"importance\": \"PREFERRED\",\n \"weight\": 40\n }\n ],\n \"outcomes\": [\n {\n \"label\": \"Meeting booked\",\n \"description\": \"The contact agreed to a specific date and time\",\n \"key\": \"meeting_booked\"\n }\n ],\n \"outputTags\": [\n {\n \"label\": \"Needs follow-up\",\n \"key\": \"needs_followup\",\n \"description\": \"The contact asked to be called back\"\n }\n ],\n \"capture\": {\n \"recording\": true,\n \"transcript\": true,\n \"summary\": true,\n \"qa\": true,\n \"evaluation\": true,\n \"sentiment\": true\n }\n },\n \"callConfig\": {},\n \"overrides\": {\n \"companyName\": \"Acme Manufacturing\",\n \"companyDescription\": \"Acme makes industrial fasteners and employs 400 people across Slovakia.\"\n }\n}"
response = http.request(request)
puts response.read_body
{ "id": "123e4567-e89b-12d3-a456-426614174000", "name": "Frontend Developer Interview", "type": "ONLINE", "focus": "SCREENING", "language": "EN", "duration": 30, "createdAt": "2025-11-20T10:30:00Z", "updatedAt": "2025-11-20T10:30:00Z", "questions": [ "What is your experience with React?" ], "instructions": "Focus on technical skills and previous project experience", "voiceId": "ALEX", "companyId": "123e4567-e89b-12d3-a456-426614174000", "metadata": { "department": "Sales" }, "cefrLevel": "B1", "backgroundSound": "OFFICE", "flow": { "firstMessage": { "type": "first_message", "text": "Hi {{contact.firstName}}, do you have two minutes?", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "label": "Qualify budget" }, "sections": [ { "type": "sequential", "prompt": "Introduce yourself and explain why you are calling.", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "label": "Qualify budget" } ], "lastMessage": { "type": "last_message", "text": "Thanks for your time — have a great day!", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "label": "Qualify budget" }, "schemaVersion": "1.0.0" }, "guardrails": { "rules": [ "Never quote a price", "Never promise a delivery date" ] }, "contextConfig": { "role": "an account executive for Acme", "communicationStyle": "concise and direct", "callToAction": "book a 30-minute demo", "useContactContext": true }, "analyticsConfig": { "extractionTargets": [ { "label": "Budget confirmed", "type": "bool", "key": "budget_confirmed", "enumValues": [ "hot", "warm", "cold" ], "ideal": "A confirmed budget of at least 10k", "importance": "PREFERRED", "weight": 40 } ], "scoringCriteria": [ { "label": "Handled objections", "description": "Acknowledged the objection and answered it with a concrete example", "key": "handled_objections", "importance": "PREFERRED", "weight": 40 } ], "outcomes": [ { "label": "Meeting booked", "description": "The contact agreed to a specific date and time", "key": "meeting_booked" } ], "outputTags": [ { "label": "Needs follow-up", "key": "needs_followup", "description": "The contact asked to be called back" } ], "capture": { "recording": true, "transcript": true, "summary": true, "qa": true, "evaluation": true, "sentiment": true } }, "callConfig": { "retryPolicy": { "maxAttempts": 3 }, "callWindow": { "mode": "custom", "days": [ "mon", "tue", "wed", "thu", "fri" ], "start": "09:00", "end": "18:00", "timezoneAnchor": { "mode": "contact", "timezone": "Europe/Bratislava", "fallbackTimezone": "Europe/Bratislava" } } }, "overrides": { "companyName": "Acme Manufacturing", "companyDescription": "Acme makes industrial fasteners and employs 400 people across Slovakia." }}
Creates an agent — the AI that runs a call — scoped to the API key’s company. An agent holds the voice, the conversation it will have, and what it should extract from it.
An agent conducts the conversation with your contact. Give it a voice, a focus (or a custom flow of your own), the questions it should ask and how to judge the answers. One agent can run any number of conversations.
Note: The duration field is specified in minutes (maximum 180 minutes).
{ "name": "Senior Engineer Technical Interview", "type": "ONLINE", "focus": "SCREENING", "language": "EN", "duration": 30, "questions": [ "Describe your experience with system design", "Explain how you would scale a web application", "Tell me about a challenging technical problem you solved" ], "instructions": "Focus on technical depth and accuracy, problem-solving approach, and communication clarity"}
When creating an agent with type: "PHONE", you must provide a valid companyPhoneNumberId. This ID corresponds to a phone number assigned to your company that the agent will use for calls.
{ "name": "Phone Screening Agent", "type": "PHONE", "focus": "SCREENING", "language": "EN", "duration": 15, "companyPhoneNumberId": "123e4567-e89b-12d3-a456-426614174000", "questions": [ "Are you available for a 30-minute call next week?", "What is your expected salary range?" ]}
focus sets what kind of call the agent runs. Four are supported, all of them hiring-shaped; for anything else send a flow instead and the agent becomes a custom one with no focus at all:
GENERIC: job-optional. The conversation is not about a particular job, so no job assignment is needed — talent-pool building, general outreach, a first call before anyone is matched to a role.
SCREENING: a hiring screen, evaluating the contact against a job’s requirements.
OUTREACH: a first call to gauge interest and re-engage people already in your database.
LANGUAGE_TEST: language proficiency, scored against CEFR.
{ "name": "Talent Pool Agent", "type": "ONLINE", "focus": "GENERIC", "language": "EN", "duration": 30, "questions": [ "Tell me about your career goals", "What type of opportunities are you looking for?" ]}
GENERIC is job-optional: a conversation using focus: "GENERIC" does not need a job, and
the contact may hold any number of job assignments — they are simply not used. You may
still attach a job explicitly if you want the conversation recorded against one. Custom agents
(created with a flow) are jobless rather than job-optional and reject an attached job
outright. See the Create Conversation
documentation for more details.
By default an agent introduces itself as the company your API key belongs to. If you call on behalf of your own customers, overrides lets each agent speak as one of them instead:
{ "name": "Acme Warehouse Screening", "type": "PHONE", "focus": "SCREENING", "language": "EN", "duration": 15, "companyPhoneNumberId": "123e4567-e89b-12d3-a456-426614174000", "overrides": { "companyName": "Acme Manufacturing", "companyDescription": "Acme makes industrial fasteners and employs 400 people across Slovakia." }}
Both fields are optional and each falls back to your own company profile. It works on any agent — template or custom — and is picked up on the next call, with nothing to recompile.
Send both fields together. They fall back independently, so companyName on its own
leaves your own company’s description in place — the agent introduces itself as Acme and
then describes you. If your company profile has a description, override both.
Only what the agent says changes. The agent still belongs to your company, and
billing, analytics and phone-number routing all keep it — as does the address an
invitation to a web conversation is sent from. The company named inside that invitation follows the
override, so the email and the call that follows it agree. You are responsible for having
the right to speak in the name you send.
That builds exactly the agent the preview showed. Send fields alongside it to override parts of it — { "composerSessionId": "…", "name": "Backend Screen v2" } — or post the preview’s agent object yourself, with the session id attached, if you edited it locally first. Anything you send wins over the preview.While composerSessionId is present, name, type, language and duration are optional: the session already has them.
The design conversation comes with it. The messages that produced the agent are
attached to it, so opening that agent in InstaView shows how it was built and lets someone
keep editing it by hand.
Instead of picking a focus and a list of questions, you can design the whole conversation yourself by sending a flow. An agent created with a flow is a custom agent: it runs the conversation you designed rather than one of the built-in templates, which is what makes it usable outside hiring — sales outreach, support callbacks, operations checks.A flow is a firstMessage, one or more sections, and a lastMessage. sections is the body of the conversation: every step you can add on the builder canvas is one entry in that array, and its type decides the rest of its shape.
Step in the visual builder
type
Purpose
Topic / agenda
sequential
A topic to cover, written as a free-text prompt
Question set
looping
A list of questions, each with an optional idealAnswer to score it against
Conditional route
conditional
branches, each with a label, a condition and its own nested blocks
Do not send focus with a flow. An agent that carries a flow is custom by
definition, so its focus is derived — sending both is rejected.
Ids and schemaVersion are assigned by InstaView. Do not send id,
defaultBranchId or schemaVersion anywhere in the flow; a request that does is
rejected. To give a conditional a fallthrough route, set defaultBranch to the
label of the branch it should fall through to. A flow read back from the API
contains the assigned ids and version, so strip all three before sending it again —
everything you authored, defaultBranch included, comes back as you wrote it, so a
stripped flow re-creates the same conversation.
Three optional objects configure a custom agent, and are accepted only together with a flow:
guardrails — { "rules": [...] }, things the agent must always or never do (max 50).
contextConfig — who the agent is (role, communicationStyle), what the call is for (callToAction), and whether the agent is told what you know about the person it is calling (useContactContext).
communicationStyle is one of a fixed set — professional, friendly, warm and empathetic, assertive, concise and direct, enthusiastic, casual — the same list the visual builder offers, so an agent created over the API stays editable there.
You do not describe your company here. The description on your company profile is
given to every custom agent automatically, and resolved at the moment of each call — so
editing the profile reaches the next call without touching a single agent. It also means
one agent can call on behalf of several companies and introduce each correctly. To have an
agent speak as a different company, use overrides.
{ "name": "Outbound Discovery Call", "type": "PHONE", "language": "EN", "duration": 10, "companyPhoneNumberId": "123e4567-e89b-12d3-a456-426614174000", "flow": { "firstMessage": { "type": "first_message", "text": "Hi {{contact.first_name}}, do you have two minutes?" }, "sections": [ { "type": "sequential", "label": "Intro", "prompt": "Introduce yourself and why you are calling." }, { "type": "looping", "questions": [ { "question": "What are you using today?", "idealAnswer": "Names a competing tool" }, { "question": "What is your timeline?", "idealAnswer": "Within this quarter" } ] }, { "type": "conditional", "defaultBranch": "Not now", "branches": [ { "label": "Interested", "condition": { "type": "intent", "description": "wants to see a demo" }, "blocks": [{ "type": "sequential", "prompt": "Offer two slots this week and confirm one." }] }, { "label": "Not now", "condition": { "type": "intent", "description": "declines or asks to be contacted later" }, "blocks": [{ "type": "sequential", "prompt": "Ask when to follow up and thank them." }] } ] } ], "lastMessage": { "type": "last_message", "text": "Thanks for your time — have a great day!" } }, "guardrails": { "rules": ["Never quote a price", "Never promise a delivery date"] }, "contextConfig": { "role": "an account executive for Acme", "communicationStyle": "concise and direct", "callToAction": "book a 30-minute demo", "useContactContext": true }}
contextConfig.useContactContext gives the agent a short summary of what you hold about each
contact, built per call — so one agent serves a whole list and each call is told about the
person actually on the line.
It comes in two halves, and the difference is worth knowing when you decide what to store. A
short platform-decided set of fields goes into the agent’s prompt, so it is always known.
Everything else the contact has a value for is generated into a document the agent can query
mid-call, alongside any files on the contact. A prompt line is spent on every call; a document
entry costs nothing until the agent looks it up — but it is only used if the agent thinks to
look.There is nothing per-field to curate. Define fields, store values, turn the switch on.
// 1. Define a fieldPOST /contact-fields{ "key": "plan_name", "label": "Plan", "dataType": "string" }// 2. Store a value for a contactPATCH /contacts/{id}{ "fields": { "plan_name": "Growth" } }// 3. Turn it on for the agentPATCH /agents/{id}{ "contextConfig": { "useContactContext": true } }
The agent is told it may refer to the summary and must not volunteer it unprompted,
list what it holds, or explain how it knows. It is also told the summary is data rather than
instructions, so a value that reads like a command is ignored.
Fields marked isPii reach neither half. They are excluded from the prompt and from the
document, which is what keeps email and phone off every call without anyone deciding. To
let one through, set allowPiiInContext on that field and the value joins both. There are
cases where that is the point — an amount owed on a collections call — and cases where it
is a liability. Nothing turns it on for you.
A contact’s document is generated the first time a context-enabled agent is scheduled to
call them, and refreshed before a later call when a value or the catalog has changed. An
immediate ad-hoc call for a contact nobody has called before runs prompt-only rather than
waiting on it, and the document is ready for the next one.
Everything the visual builder can put in a conversation is expressed inside sections — the API is not a reduced version of the builder. A section is an object with a type, and type selects which other fields it carries. In the schema reference on the right this is a oneOf on the sections items, which renders collapsed, so the four shapes are written out here in full.label is optional on every section and is only a name for the step; it is what the builder shows on the canvas. id is assigned by InstaView — never send one.
A step written as a free-text instruction, for when you want the agent to cover something in its own words rather than ask a fixed question. Supports {{contact.*}} variables.
{ "type": "sequential", "label": "Intro", "prompt": "Introduce yourself, say you are calling about their trial, and ask if now is a good time."}
A list of questions the agent works through. One block can hold several questions; use separate blocks when you want them in different places in the conversation.question is the only required field. idealAnswer is what a good answer looks like, and it is optional: a question without one is still asked, just never scored. That is how you write a question set with no right answers, such as an internal survey or a satisfaction check.importance and weight are how a question joins the agent’s match score: set either one to score it (REQUIRED gates the score, PREFERRED contributes by weight), and a question with neither is asked but not scored. They sit on the question itself rather than in analyticsConfig because a question is addressed by an id InstaView assigns, which you cannot know while writing the flow.
{ "type": "looping", "label": "Qualify", "questions": [ { "question": "What are you using today?", "idealAnswer": "Names a competing tool" }, { "question": "What is your timeline?", "idealAnswer": "Within this quarter", "importance": "REQUIRED", "weight": 40 } ]}
Splits the conversation. The agent evaluates the branches in order and follows exactly one; blocks is the route it then works through.blocks holds sections of any type, including another conditional, which is how you build a decision tree. condition is usually { "type": "intent", "description": "..." } — a plain-language intent the agent reads off the conversation — and may instead be an expression for a deterministic test on an extracted field. defaultBranch is the fallthrough taken when no condition matches, and it addresses the branch by its label, because branch ids are assigned by InstaView.The condition is what the agent routes on, so it has to be one it can read. Every entry in branches must be an object to begin with (CONDITIONAL_BRANCH_NOT_AN_OBJECT), and every branch needs a condition of one of those two shapes: a missing or non-object condition is a 422 (CONDITIONAL_CONDITION_MISSING), a type that is neither intent nor expression is CONDITIONAL_CONDITION_TYPE_UNKNOWN, and a condition of a known type missing what that type needs — an intent without a description, an expression without a field, with an operator outside the documented set, or with no value for an operator other than EXISTS — is CONDITIONAL_CONDITION_INVALID. The path names the branch, e.g. sections[0].branches[1].condition. The condition on the branch you nominate as defaultBranch is checked like any other: it is not read while that branch is the fallthrough, but moving defaultBranch elsewhere later would put it back in charge of a route.
{ "type": "conditional", "label": "Interest check", "defaultBranch": "Not now", "branches": [ { "label": "Interested", "condition": { "type": "intent", "description": "wants to see a demo" }, "blocks": [ { "type": "sequential", "prompt": "Offer two slots this week and confirm one." }, { "type": "looping", "questions": [ { "question": "Who else should join the demo?", "idealAnswer": "Names a decision maker" } ] } ] }, { "label": "Not now", "condition": { "type": "intent", "description": "declines or asks to be contacted later" }, "blocks": [{ "type": "sequential", "prompt": "Ask when to follow up and thank them." }] } ]}
Ends the agent’s part of the call and transfers it to a phone number. phoneNumber is required and must be E.164 (+, country code, no spaces or dashes) and a real number for that country: the right length and leading digits for its numbering plan, so +42190012345, a Slovak mobile one digit short, is rejected even though it has the E.164 shape. Either problem is a 422 with HUMAN_HANDOFF_INVALID_NUMBER on the block. A number the dialler could not use is rejected at design time rather than at the moment of transfer.message is the line the caller hears as the call is transferred to this number, and it is optional — omit it and InstaView supplies a neutral line in the call’s language. That default says only that a transfer is happening: the block knows a number and nothing else, so it cannot claim who picks up. Send a message when you do know. It supports {{contact.*}} and {{system.*}} variables like any other text in a flow. A message that resolves to nothing on a call, because it held only variables and none had a value, falls back to the neutral line, so the transfer is never silent. Sending message as an empty string is rejected rather than treated as absent, so clearing the field cannot silently give you the default back.Write message so it is true on every transfer to this number. A caller who asks for a person before the flow reaches this step can be transferred here too, and hear this line. Describe the transfer (“I’ll put you through to our sales team now”) rather than what came before it (“Your card is blocked now, I’ll put you through”). Anything the agent should say only at this point of the flow belongs in the step before the handoff. The agent says that step in a turn of its own and transfers once the caller has responded, so a spoken step before a handoff adds one exchange to the call. The transfer itself carries no words but message.Blocks that share a phoneNumber share one line. A number has a single line, taken from the first handoff block that names it, reading the flow top to bottom with each branch in order. It is heard on every transfer to that number, including one made at a later block. A later block’s message is never heard. If the first block has no message, the neutral line is used even when a later block has one. To give a number a line of your own, put it on the first block that names the number.
{ "type": "human_handoff", "label": "Sales", "phoneNumber": "+421900123456", "message": "I'll put you through to Martin on our sales team now, one moment."}
A handoff block also changes what happens when somebody asks for a person away from that
step. Every agent carries a standing rule for “can I speak to a human?”; on a flow with no
handoff it says a colleague will be in touch and ends the call, and on a flow that has one it
transfers instead, wherever in the conversation the request comes. Where it can, the agent
chooses the destination by label, and the caller can then hear that number’s line: the
message of the first block that names it, or the neutral line if that block has none. That
is why a message has to make sense away from its step.
The transfer is final, and it is the end of the conversation. InstaView hands the
call to the carrier and leaves it (a cold transfer), so the agent does not come back:
nothing after a human_handoff ever runs, including your lastMessage. The conversation
settles as completed with the call recorded as forwarded, and the transcript covers your
agent’s part of the call only — what the two people then say to each other is not ours to
record.Because such a step could never run, a handoff must be the last block in its own list,
and a sibling after it is rejected with HUMAN_HANDOFF_NOT_LAST. That is scoped to
immediate siblings: a handoff ending one branch of a conditional says nothing about the
sections after that conditional, which the other branches still reach.
PHONE agents only. An ONLINE agent has no call to transfer, so a flow carrying a
handoff is rejected with a 422 (HUMAN_HANDOFF_NOT_PHONE) rather than creating an
agent with a step that could never fire.
A handoff may sit inside a conditional branch, which is the useful shape: route on intent, then transfer to the number that fits. Two branches transferring to the same number are one destination, not two — handoffs are deduplicated by number.
A flow that can reach two numbers needs a label on every handoff, and they must
differ. The agent is offered all reachable destinations at once and chooses between them
by label — the number is deliberately never in its prompt — so two destinations described
alike would make the choice a coin flip that lands a caller on the wrong team. Missing
labels are HUMAN_HANDOFF_LABEL_REQUIRED and a collision is
HUMAN_HANDOFF_LABEL_DUPLICATE. A single-destination flow needs no label: there is nothing
to tell apart. Two blocks pointing at the same number are one destination, so they may
share a label, or go without one.
There is no fallback number. Once the carrier has the call InstaView is no longer on
it, so nothing can notice that the destination was busy and try a second one. “Try sales,
otherwise support” is a conditional the agent routes on while it still has the call,
not a property of the handoff.
These four types are the whole set. The schema reserves nothing beyond them, so any
other value in type is simply an unknown block: it comes back as UNKNOWN_BLOCK_TYPE
in the errors array, alongside every other fault in the document.A type may still be added to the schema before it works, and while it is in that state
sending one is rejected with a 422 naming the block and the types you may use instead.
That list is generated from what is actually built, so it is the authoritative answer to
what a section may be at any given moment.
The flow is validated when you create the agent, using the same rules as the visual builder — an invalid flow is rejected with 422, rather than failing later when a call is placed.The rejection carries an errors array with every problem found in the document, so fixing a flow does not take one request per fault. Each entry has a machine-readable code and the path of the offending node in the flow you sent, which is what to anchor an editor or an error list to.
Match on the codes you handle, and fall back on message for the rest. The set of
codes grows as the flow schema does, and a new one is added without a major version.
path is the anchor, and the only one. Block ids are assigned by InstaView when a
flow is stored, so a flow that was just rejected has none to report — errors address
the document you sent, by position.
Not every 422 on this route is a flow-validation failure — one of the size limits above, a block type that is not available yet, or a companyPhoneNumberId that is not yours, is also a 422. Those carry a message and noerrors array, so treat errors as optional:
{ "statusCode": 422, "message": "Branch blocks at sections[2].branches[0] exceeds the maximum of 50 (received 51).", "traceId": "6a707aee000000000c1e285eefed9980"}
analyticsConfig says what should come back after every call. Without it a custom agent places a call and returns a transcript; with it you get structured data your own systems can act on. Like guardrails and contextConfig, it is accepted only alongside a flow.
Field
What it does
extractionTargets
The values to pull out of each call. A target with an ideal also counts toward the match score.
scoringCriteria
Holistic judgements over the whole call — “handled objections”, “built rapport”.
outcomes
Did the call achieve what it was for? Decided met / not met per call.
outputTags
Labels the AI may assign to a call.
capture
Which qualitative artefacts to produce (summary, Q&A, evaluation, sentiment, recording, transcript). All default to true.
{ // …name, type, language, duration, flow as above… "analyticsConfig": { "extractionTargets": [ { "key": "budget_confirmed", "label": "Budget confirmed", "type": "bool", "ideal": "A confirmed budget of at least 10k", "importance": "REQUIRED", "weight": 50 }, { "label": "Current tool", "type": "string" } ], "scoringCriteria": [ { "label": "Handled objections", "description": "Acknowledged the objection and answered it with a concrete example", "weight": 20 } ], "outcomes": [ { "label": "Meeting booked", "description": "The contact agreed to a specific date and time" } ], "outputTags": [{ "label": "Needs follow-up", "description": "The contact asked to be called back" }], "capture": { "sentiment": false } }}
Every item has a key — the name its results come back under. Set it if your integration reads results by name. A key you choose is stable; a derived one is not:
Omit key and InstaView derives a slug of label (Budget confirmed → budget_confirmed). Convenient, but renaming the label later silently moves the results to a new key, and your consumer breaks with a 200. Two labels that slug to the same thing get a numeric suffix — Budget and Budget? become budget and budget_2, in the order you listed them.
Send key and it is used verbatim, whatever you do to the label afterwards. Letters, digits and underscores, up to 64 characters, unique within its list — a duplicate you sent is rejected with 400 rather than quietly renamed, and __proto__, constructor and prototype are refused because they cannot be used as field names in the results.
Editing the agent in the visual builder re-derives each key from its label, so a key you
chose over the API can be replaced by someone editing that agent in the UI.
Questions join the match score inline, on the question itself — not through analyticsConfig:
{ "type": "looping", "questions": [ { "question": "What are you using today?", "idealAnswer": "Names a competing tool", "importance": "REQUIRED", "weight": 30 }, { "question": "What is your timeline?", "idealAnswer": "Within this quarter" }, { "question": "How has the rollout felt so far?" } ]}
Only the first question is scored. The second carries an idealAnswer but no importance or weight, so it stays out of the score — nothing is scored that you did not ask for. The third has no idealAnswer at all, so it cannot be scored even if you set importance on it.
This is inline for the same reason ids are assigned by us: a question is addressed by an
id InstaView mints, which you cannot know while writing the flow. Reading the agent back
returns the same inline form, so a round-trip works.
Weights are relative, not a budget — 50 / 30 / 20 and 5 / 3 / 2 score identically. Results report each item’s share as a percentage.The results arrive as analytics on the conversation (Get Conversation) and on the analysis.completedwebhook.
callConfig answers two questions: how many times a contact who does not answer is called, and when the agent is allowed to dial.
Field
What it does
retryPolicy.maxAttempts
Attempts per contact, counting the first, 1–5. Reschedules the contact asks for come out of this budget; a network failure that never reached them does not.
callWindow.days
Days the agent may call on, from mon … sun.
callWindow.start / callWindow.end
Local hours the agent may call between, "HH:mm" on a 24-hour clock. end is exclusive and must be later in the day than start.
callWindow.timezoneAnchor
Whose clock start and end are on. This is the field that decides what the hours actually mean.
Omit callConfig and a new agent calls Mon–Fri, 09:00–18:00, in each contact’s own timezone, three attempts each.
timezoneAnchor.mode is either contact or fixed.With contact, the contact’s timezone is detected from their phone number, down to the area code — not from their country. On one list, a +1 212 number is called at 09:00 in New York, a +1 310 number at 09:00 in Los Angeles, and a +1 602 number at 09:00 in Phoenix, which does not observe daylight saving at all. The same holds inside any country that spans zones: +7 4212 is Vladivostok rather than Moscow, +55 92 is Manaus rather than São Paulo, +52 664 is Tijuana rather than Mexico City.
With fixed, every contact is called on one named IANA zone, wherever they are — the right choice when the hours belong to your own operation rather than to the person being called.
A timezone is validated against the runtime’s own timezone database, so a plausible-looking but nonexistent zone is a 422 on this request rather than a schedule that quietly never fires.
Some prefixes cover more than one timezone. An Australian +61 8 number could be in
Adelaide or Perth, up to two hours apart, and a phone number cannot tell you which. In that
case the agent waits until the hours you set are correct in every contact’s zone rather
than picking one — so an uncertain contact is called a little later, never two hours too
early. timezoneAnchor.fallbackTimezone (default Europe/Bratislava) covers the rarer case
where a number resolves to no timezone at all.
A narrow window over a wide prefix can leave no valid moment at all. Requiring the hours to
be correct in every contact’s zone means a short window over zones far enough apart never lines
up: 09:00–10:00 cannot be true in both Adelaide and Perth at once. When that happens the
contact is called anyway rather than left uncalled indefinitely, and the call is recorded as
having gone out outside the window. Widening the window, or pinning the anchor to fixed, is
how you avoid it.
Retries land inside the same window, so a contact is never called back outside the hours you set.
A time you name yourself is not moved. The window bounds the times we choose: when a
conversation created with no scheduleTime goes out, and every retry after a call that did not
connect. Pass a scheduleTime on POST /conversations, or a time on either call-attempt
route, and the call is placed then even if the window is shut, because you have told us
something the window cannot know. If you would rather your window always won, keep sending
times inside it: an appointment your contact agreed to is usually the case where you want the
override, and a bulk import is usually the case where you want to omit scheduleTime and let
the window place the call.
That is a legacy preset meaning Mon–Fri, 08:00–20:00, in the contact’s own timezone — the hours those agents were already being called within, so nothing about their dialling changed when calling windows shipped. You cannot select it; sending a callWindow is how such an agent is moved onto a real one.
Those hours are not a new restriction and not a widening. Before agents carried a window, the
hours were attached to the phone number instead, and every number was created with exactly
this schedule. The preset reproduces it so that migrating changes nothing you can observe. The
practical difference between it and a window you set yourself is that you cannot edit it, and
that its timezone anchor is fixed to the contact.
Any text in a flow — messages, prompts, questions — may contain {{contact.<key>}} placeholders. They are not filled in when you create the agent: the agent is compiled once and the placeholders are resolved per call, so one agent serves every person you call.Seven keys are always available. The first four come from the contact on the conversation; the rest come from your company profile and the agent itself:
Key
Value
{{contact.first_name}}
The contact’s first name
{{contact.last_name}}
The contact’s last name
{{contact.email}}
The contact’s email
{{contact.phone}}
The contact’s phone number
{{contact.company_name}}
Your company’s name
{{contact.company_description}}
The description on your company profile
{{contact.agent_name}}
The voice agent’s own name
{{contact.company_name}} is your company, not theirs. It resolves from the company
placing the call, so "I see you work at {{contact.company_name}}" is a fluent sentence that is
wrong on every single call, and nothing rejects it. The contact’s own employer is an ordinary
catalogued field — organization in the default catalog — set per contact like any other.
You can add your own. Send them as fields when you create the contact, then reference them by key:
// …then, in the flow:{ "type": "sequential", "prompt": "Confirm order {{contact.order_number}} renews on {{contact.renewal_date}}." }
Keys are a-z, 0-9 and _, and each one has to be a field in your company’s catalog —
read GET /contact-fields for the ones
you have, or pass ?createMissingFields=true on the contact write to have a new key defined
for you. A key with no value resolves to an empty string rather than being spoken aloud, so a
missing variable degrades quietly — but write prompts that still read correctly without it.
The seven system keys above are reserved: sending one in fields is a 422 naming the key,
not a write that quietly does nothing. first_name, last_name, email and phone are set
through their own properties on the contact; the other three are resolved by the platform and
cannot hold a per-contact value at all.
An eighth reserved key exists and is deliberately not in the table above. {{contact.profile}} is
the whole rendered summary of what we know about the contact — the block
contextConfig.useContactContext puts in the agent’s prompt, a paragraph rather than a value. The
agent is given it on its own when that switch is on, so there is nothing to gain by writing the
token, and putting it in a message or a prompt makes the agent read that paragraph out loud. Like
the other reserved keys it cannot hold a per-contact value: sending profile in fields is a
422.
A second namespace, {{system.<key>}}, is filled from the platform’s clock rather than from the
contact. It works anywhere {{contact.*}} does and needs no setup:
Key
Value
Example
{{system.today}}
Today’s date, in the contact’s own timezone
2026-09-10
{{system.now}}
The contact’s local date and time
2026-09-10 14:30
{{system.day_of_week}}
The English weekday name, which the agent says in the call’s language
Thursday
{ "type": "sequential", "prompt": "Offer a slot: today is {{system.day_of_week}}, so suggest early next week." }
The timezone is derived from the contact’s phone number, falling back to UTC when the number
resolves to none. Every agent is separately told the current date and time whether or not it uses
these, so reach for them only when a line has to state a date or a day.
A key with no value resolves to nothing, in both namespaces. The placeholder disappears from
the line — it is never read out as a token, and the agent is never told a value was missing. So
"Am I through to {{contact.organization}}?" is spoken as "Am I through to?" for a contact
with no organisation. The agent is instructed to reword around the hole, but the reliable fix is
to write the sentence so it survives losing the value: put the token where it can be dropped, or
ask instead of asserting.
Agents are automatically scoped to your API key’s company. You can only access
and use agents that belong to your company. ATS keys can access agents from
companies they manage by specifying the companyId query parameter.
Create this agent from a composer session (POST /agents/composer). Send it alone to build exactly what the preview showed, or alongside your own fields to override parts of it — anything you send wins. The session's conversation is attached to the new agent. While it is present, name, type, language and duration are optional: the session already has them.
Focus of the agent. GENERIC: job-optional, for a conversation that is not about a particular job. SCREENING: a hiring screen against a job's requirements. OUTREACH: a first call to gauge interest. LANGUAGE_TEST: language proficiency. Required unless a conversation flow is provided: an agent with a flow is a custom agent, whose focus is derived rather than selected. Sending both is rejected.
Additional instructions for the conversation. Compiled into the agent's prompt as its own reference section, for a CUSTOM (flow) agent as well as a template one, so this is where reference material the agent must state accurately belongs: prices, stock, lead times, opening hours, policy.
Conversation flow graph. Providing it makes this a custom agent, so focus must be omitted. guardrails and contextConfig are accepted only alongside a flow. Validated on write: an invalid flow is rejected with 422 rather than failing when a call is placed.
What to extract, score, decide and label after every call. Accepted only alongside a flow — sending it for an agent that will not be custom is rejected. Per-question scoring is set inline on the flow's looping questions, not here.
How persistently and when the agent calls: how many attempts a contact who does not answer gets, and the days, local hours and timezone the agent may dial in. Accepted only alongside a flow. Omitted, a new agent calls Mon–Fri 09:00–18:00 in each contact's own timezone.
Who this agent says it is on a call. By default it introduces itself as the company your API key belongs to; send this to have it speak for one of your own customers instead. Unlike guardrails and contextConfig, this is accepted with or without a flow.
Focus of the agent. GENERIC: job-optional, for a conversation that is not about a particular job. SCREENING: a hiring screen against a job's requirements. OUTREACH: a first call to gauge interest. LANGUAGE_TEST: language proficiency.
Additional instructions for the conversation. Compiled into the agent's prompt as its own reference section, for a CUSTOM (flow) agent as well as a template one, so this is where reference material the agent must state accurately belongs: prices, stock, lead times, opening hours, policy.
Example:
"Focus on technical skills and previous project experience"
What the agent extracts, scores, decides and labels after every call. Custom agents only — null on a template agent. Per-question scoring is folded back onto the flow's looping questions rather than returned as an id-keyed map — the same form the write accepts.
How persistently and when the agent calls. Custom agents only. An agent created before calling windows were configurable reports a callWindow.mode of business_hours.
Who this agent says it is on a call, when that is not the company your API key belongs to. Null when it speaks as your own company.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"InstaView API","colors":{"primary":"#2741F9","light":"#4D5FFF","dark":"#1D34C4"},"logo":{"light":"https://mintcdn.com/instaview/srYC_WLR3UAwt0PY/logo/light.svg?fit=max\u0026auto=format\u0026n=srYC_WLR3UAwt0PY\u0026q=85\u0026s=a941bc948e20b3503a55e49b4438bfd8","dark":"https://mintcdn.com/instaview/srYC_WLR3UAwt0PY/logo/dark.svg?fit=max\u0026auto=format\u0026n=srYC_WLR3UAwt0PY\u0026q=85\u0026s=fbf32075feea3b5f404b1aef04c449ea"},"favicon":"https://mintcdn.com/instaview/srYC_WLR3UAwt0PY/favicon.svg?fit=max\u0026auto=format\u0026n=srYC_WLR3UAwt0PY\u0026q=85\u0026s=1499b591dcea46419afceafb5b77004e","api":{"playground":{}},"navbar":{"links":[{"href":"https://support.instaview.sk","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.instaview.sk"}},"footer":{"socials":{"github":"https://github.com/StarIC-s-r-o","linkedin":"https://www.linkedin.com/company/instaviewai"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"instaview","hasAudioNarration":false,"actualSubdomain":"instaview","customDomains":["docs.instaview.sk"],"gitSource":{"type":"github","owner":"staric-s-r-o","repo":"instaview","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adb630a25769d6ebcdc21d7","collectionId":"9e3238e9-e795-4633-9eb1-2fa50fb2b100","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adb630a25769d6ebcdc21d7"},"entitlements":{},"buildId":"6adb630a25769d6ebcdc21d7","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"API Reference","count":75},{"language":"default","tag":"Documentation","count":20},{"language":"default","tag":"Changelog","count":13},{"language":"default","tag":"Runs","count":10},{"language":"default","tag":"2026","count":10},{"language":"default","tag":"Resources","count":9},{"language":"default","tag":"Agents","count":8},{"language":"default","tag":"Conversations","count":8},{"language":"default","tag":"Sourcing","count":8},{"language":"default","tag":"Webhooks","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"editor-v7-file-tree","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/agents/create-agent","slug":"/api-reference/agents/create-agent","pageMetadata":{"title":"Create Agent","openapi":"POST /agents","description":"Creates a new agent scoped to the API key's company. Send a `flow` (with optional `guardrails` and `contextConfig`) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template `focus`.","href":"/api-reference/agents/create-agent"},"description":{"compiledSource":"\"use strict\";\nconst {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(_components.p, {\n children: [\"Creates a new agent scoped to the API key’s company. Send a \", _jsx(_components.code, {\n children: \"flow\"\n }), \" (with optional \", _jsx(_components.code, {\n children: \"guardrails\"\n }), \" and \", _jsx(_components.code, {\n children: \"contextConfig\"\n }), \") to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template \", _jsx(_components.code, {\n children: \"focus\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,Info,Note,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Creates an agent — the AI that runs a call — scoped to the API key’s company. An agent holds the voice, the conversation it will have, and what it should extract from it.`}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`An agent conducts the conversation with your contact. Give it a voice, a `,_jsx(_components.code,{children:`focus`}),` (or a custom `,_jsx(_components.code,{children:`flow`}),` of your own), the questions it should ask and how to judge the answers. One agent can run any number of conversations.`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-cases`,children:`Use Cases`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Technical Screening`}),`: Create agents for technical skill assessments`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Behavioural screens`}),`: Configure agents for soft skills evaluation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Culture Fit Assessment`}),`: Set up agents to evaluate cultural alignment`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Initial Screening`}),`: Create quick screening agents for high-volume applications`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`basic-agent-creation`,children:`Basic Agent Creation`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Technical Screening Agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ONLINE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"focus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SCREENING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Tell me about your React experience\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Explain microservices architecture\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`comprehensive-agent-configuration`,children:`Comprehensive Agent Configuration`}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note:`}),` The `,_jsx(_components.code,{children:`duration`}),` field is specified in minutes (maximum 180 minutes).`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Senior Engineer Technical Interview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ONLINE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"focus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SCREENING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe your experience with system design\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Explain how you would scale a web application\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Tell me about a challenging technical problem you solved\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"instructions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Focus on technical depth and accuracy, problem-solving approach, and communication clarity\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`phone-agents`,children:`Phone Agents`}),`\n`,_jsxs(_components.p,{children:[`When creating an agent with `,_jsx(_components.code,{children:`type: \"PHONE\"`}),`, you must provide a valid `,_jsx(_components.code,{children:`companyPhoneNumberId`}),`. This ID corresponds to a phone number assigned to your company that the agent will use for calls.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Phone Screening Agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PHONE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"focus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SCREENING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"companyPhoneNumberId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-12d3-a456-426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Are you available for a 30-minute call next week?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"What is your expected salary range?\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`background-sound`,children:`Background Sound`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`backgroundSound`}),` to control the ambient noise played to the contact during calls.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`OFFICE`})}),_jsx(_components.td,{children:`Subtle office ambient noise (default)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`OFF`})}),_jsx(_components.td,{children:`Complete silence`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Phone Screening Agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PHONE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"focus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SCREENING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"companyPhoneNumberId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-12d3-a456-426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"backgroundSound\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OFFICE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Are you available for a 30-minute call next week?\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`voice-options`,children:`Voice Options`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ALEX`}),` (Male)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`PETER`}),` (Male)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`MIRIAM`}),` (Female)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`SUE`}),` (Female)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`VIERA`}),` (Female)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CASANDRA`}),` (Female)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`SILVIA`}),` (Female)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`MICHAEL`}),` (Male)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`LUKE`}),` (Male)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`EMMA`}),` (Female)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`SARAH`}),` (Female)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`EVA`}),` (Female)`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`agent-focus`,children:`Agent Focus`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`focus`}),` sets what kind of call the agent runs. Four are supported, all of them hiring-shaped; for anything else send a `,_jsx(_components.code,{children:`flow`}),` instead and the agent becomes a custom one with no focus at all:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`GENERIC`}),`: job-optional. The conversation is not about a particular job, so no job assignment is needed — talent-pool building, general outreach, a first call before anyone is matched to a role.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`SCREENING`}),`: a hiring screen, evaluating the contact against a job’s requirements.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`OUTREACH`}),`: a first call to gauge interest and re-engage people already in your database.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`LANGUAGE_TEST`}),`: language proficiency, scored against CEFR.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-with-focus`,children:`Example with Focus`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Talent Pool Agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ONLINE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"focus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GENERIC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Tell me about your career goals\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"What type of opportunities are you looking for?\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`GENERIC is job-optional`}),`: a conversation using `,_jsx(_components.code,{children:`focus: \"GENERIC\"`}),` does not need a job, and\nthe contact may hold any number of job assignments — they are simply not used. You may\nstill attach a job explicitly if you want the conversation recorded against one. Custom agents\n(created with a `,_jsx(_components.code,{children:`flow`}),`) are job`,_jsx(_components.strong,{children:`less`}),` rather than job-optional and reject an attached job\noutright. See the `,_jsx(_components.a,{href:`/api-reference/conversations/create-conversation`,children:`Create Conversation`}),`\ndocumentation for more details.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`speaking-for-another-company`,children:`Speaking for Another Company`}),`\n`,_jsxs(_components.p,{children:[`By default an agent introduces itself as the company your API key belongs to. If you call on behalf of your own customers, `,_jsx(_components.code,{children:`overrides`}),` lets each agent speak as one of them instead:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Acme Warehouse Screening\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PHONE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"focus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SCREENING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"companyPhoneNumberId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-12d3-a456-426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"overrides\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"companyName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Acme Manufacturing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"companyDescription\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Acme makes industrial fasteners and employs 400 people across Slovakia.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Both fields are optional and each falls back to your own company profile. It works on any agent — template or custom — and is picked up on the next call, with nothing to recompile.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Send both fields together.`}),` They fall back independently, so `,_jsx(_components.code,{children:`companyName`}),` on its own\nleaves your own company’s description in place — the agent introduces itself as Acme and\nthen describes you. If your company profile has a description, override both.`]})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Only what the agent says changes.`}),` The agent still belongs to your company, and\nbilling, analytics and phone-number routing all keep it — as does the address an\ninvitation to a web conversation is sent from. The company `,_jsx(_components.em,{children:`named inside`}),` that invitation follows the\noverride, so the email and the call that follows it agree. You are responsible for having\nthe right to speak in the name you send.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`creating-from-a-composer-session`,children:`Creating from a Composer Session`}),`\n`,_jsxs(_components.p,{children:[`If you would rather describe the agent than write a `,_jsx(_components.code,{children:`flow`}),`, `,_jsx(_components.a,{href:`/api-reference/agents/compose-agent`,children:`design it first`}),` and create it from the session you get back:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"composerSessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`That builds exactly the agent the preview showed. Send fields alongside it to override parts of it — `,_jsx(_components.code,{children:`{ \"composerSessionId\": \"…\", \"name\": \"Backend Screen v2\" }`}),` — or post the preview’s `,_jsx(_components.code,{children:`agent`}),` object yourself, with the session id attached, if you edited it locally first. Anything you send wins over the preview.`]}),`\n`,_jsxs(_components.p,{children:[`While `,_jsx(_components.code,{children:`composerSessionId`}),` is present, `,_jsx(_components.code,{children:`name`}),`, `,_jsx(_components.code,{children:`type`}),`, `,_jsx(_components.code,{children:`language`}),` and `,_jsx(_components.code,{children:`duration`}),` are optional: the session already has them.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The design conversation comes with it.`}),` The messages that produced the agent are\nattached to it, so opening that agent in InstaView shows how it was built and lets someone\nkeep editing it by hand.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`custom-agents`,children:`Custom Agents`}),`\n`,_jsxs(_components.p,{children:[`Instead of picking a `,_jsx(_components.code,{children:`focus`}),` and a list of `,_jsx(_components.code,{children:`questions`}),`, you can design the whole conversation yourself by sending a `,_jsx(_components.code,{children:`flow`}),`. An agent created with a flow is a `,_jsx(_components.strong,{children:`custom agent`}),`: it runs the conversation you designed rather than one of the built-in templates, which is what makes it usable outside hiring — sales outreach, support callbacks, operations checks.`]}),`\n`,_jsxs(_components.p,{children:[`A flow is a `,_jsx(_components.code,{children:`firstMessage`}),`, one or more `,_jsx(_components.code,{children:`sections`}),`, and a `,_jsx(_components.code,{children:`lastMessage`}),`. `,_jsx(_components.code,{children:`sections`}),` is the body of the conversation: every step you can add on the builder canvas is one entry in that array, and its `,_jsx(_components.code,{children:`type`}),` decides the rest of its shape.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Step in the visual builder`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.th,{children:`Purpose`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Topic / agenda`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`sequential`})}),_jsxs(_components.td,{children:[`A topic to cover, written as a free-text `,_jsx(_components.code,{children:`prompt`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Question set`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`looping`})}),_jsxs(_components.td,{children:[`A list of `,_jsx(_components.code,{children:`questions`}),`, each with an optional `,_jsx(_components.code,{children:`idealAnswer`}),` to score it against`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Conditional route`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`conditional`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`branches`}),`, each with a `,_jsx(_components.code,{children:`label`}),`, a `,_jsx(_components.code,{children:`condition`}),` and its own nested `,_jsx(_components.code,{children:`blocks`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Each shape is written out in `,_jsx(_components.a,{href:`#section-types`,children:`Section types`}),` below.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Do not send `,_jsx(_components.code,{children:`focus`}),` with a `,_jsx(_components.code,{children:`flow`}),`.`]}),` An agent that carries a flow is custom by\ndefinition, so its focus is derived — sending both is rejected.`]})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Ids and `,_jsx(_components.code,{children:`schemaVersion`}),` are assigned by InstaView.`]}),` Do not send `,_jsx(_components.code,{children:`id`}),`,\n`,_jsx(_components.code,{children:`defaultBranchId`}),` or `,_jsx(_components.code,{children:`schemaVersion`}),` anywhere in the flow; a request that does is\nrejected. To give a conditional a fallthrough route, set `,_jsx(_components.code,{children:`defaultBranch`}),` to the\n`,_jsx(_components.strong,{children:`label`}),` of the branch it should fall through to. A flow read back from the API\ncontains the assigned ids and version, so strip all three before sending it again —\neverything you authored, `,_jsx(_components.code,{children:`defaultBranch`}),` included, comes back as you wrote it, so a\nstripped flow re-creates the same conversation.`]})}),`\n`,_jsxs(_components.p,{children:[`Three optional objects configure a custom agent, and are accepted only together with a `,_jsx(_components.code,{children:`flow`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`guardrails`}),` — `,_jsx(_components.code,{children:`{ \"rules\": [...] }`}),`, things the agent must always or never do (max 50).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`contextConfig`}),` — who the agent is (`,_jsx(_components.code,{children:`role`}),`, `,_jsx(_components.code,{children:`communicationStyle`}),`), what the call is for (`,_jsx(_components.code,{children:`callToAction`}),`), and whether the agent is told what you know about the person it is calling (`,_jsx(_components.code,{children:`useContactContext`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`callConfig`}),` — how persistently the agent calls, and when. See `,_jsx(_components.a,{href:`#retries-and-calling-hours`,children:`Retries and calling hours`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`communicationStyle`}),` is one of a fixed set — `,_jsx(_components.code,{children:`professional`}),`, `,_jsx(_components.code,{children:`friendly`}),`, `,_jsx(_components.code,{children:`warm and empathetic`}),`, `,_jsx(_components.code,{children:`assertive`}),`, `,_jsx(_components.code,{children:`concise and direct`}),`, `,_jsx(_components.code,{children:`enthusiastic`}),`, `,_jsx(_components.code,{children:`casual`}),` — the same list the visual builder offers, so an agent created over the API stays editable there.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`You do not describe your company here.`}),` The description on your company profile is\ngiven to every custom agent automatically, and resolved at the moment of each call — so\nediting the profile reaches the next call without touching a single agent. It also means\none agent can call on behalf of several companies and introduce each correctly. To have an\nagent speak as a `,_jsx(_components.em,{children:`different`}),` company, use `,_jsx(_components.a,{href:`#speaking-for-another-company`,children:_jsx(_components.code,{children:`overrides`})}),`.`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`44`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`44`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Outbound Discovery Call\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PHONE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"companyPhoneNumberId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-12d3-a456-426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"flow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"firstMessage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Hi {{contact.first_name}}, do you have two minutes?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sections\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sequential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Intro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Introduce yourself and why you are calling.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"looping\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"What are you using today?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"idealAnswer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Names a competing tool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"What is your timeline?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"idealAnswer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Within this quarter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"conditional\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"defaultBranch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Not now\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"branches\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Interested\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"condition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"intent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"wants to see a demo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"blocks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sequential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Offer two slots this week and confirm one.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Not now\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"condition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"intent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"declines or asks to be contacted later\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"blocks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sequential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Ask when to follow up and thank them.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"lastMessage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Thanks for your time — have a great day!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guardrails\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rules\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Never quote a price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Never promise a delivery date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contextConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"an account executive for Acme\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"communicationStyle\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"concise and direct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"callToAction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"book a 30-minute demo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"useContactContext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`telling-the-agent-about-the-person-it-is-calling`,children:`Telling the agent about the person it is calling`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`contextConfig.useContactContext`}),` gives the agent a short summary of what you hold about each\ncontact, built `,_jsx(_components.strong,{children:`per call`}),` — so one agent serves a whole list and each call is told about the\nperson actually on the line.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"contextConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"an account executive for Acme\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"useContactContext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`It comes in two halves, and the difference is worth knowing when you decide what to store. A\nshort platform-decided set of fields goes into the agent’s `,_jsx(_components.strong,{children:`prompt`}),`, so it is always known.\nEverything else the contact has a value for is generated into a `,_jsx(_components.strong,{children:`document the agent can query\nmid-call`}),`, alongside any files on the contact. A prompt line is spent on every call; a document\nentry costs nothing until the agent looks it up — but it is only used if the agent thinks to\nlook.`]}),`\n`,_jsx(_components.p,{children:`There is nothing per-field to curate. Define fields, store values, turn the switch on.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 1. Define a field`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` /`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`contact`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fields`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"plan_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Plan\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dataType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 2. Store a value for a contact`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`PATCH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` /`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`contacts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"plan_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Growth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 3. Turn it on for the agent`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`PATCH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` /`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`agents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"contextConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"useContactContext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`The agent is told it `,_jsx(_components.strong,{children:`may refer to`}),` the summary and `,_jsx(_components.strong,{children:`must not volunteer it unprompted`}),`,\nlist what it holds, or explain how it knows. It is also told the summary is data rather than\ninstructions, so a value that reads like a command is ignored.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Fields marked `,_jsx(_components.code,{children:`isPii`}),` reach neither half.`]}),` They are excluded from the prompt and from the\ndocument, which is what keeps `,_jsx(_components.code,{children:`email`}),` and `,_jsx(_components.code,{children:`phone`}),` off every call without anyone deciding. To\nlet one through, set `,_jsx(_components.code,{children:`allowPiiInContext`}),` on that field and the value joins both. There are\ncases where that is the point — an amount owed on a collections call — and cases where it\nis a liability. Nothing turns it on for you.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`A contact’s document is generated the first time a context-enabled agent is `,_jsx(_components.strong,{children:`scheduled`}),` to\ncall them, and refreshed before a later call when a value or the catalog has changed. An\nimmediate ad-hoc call for a contact nobody has called before runs prompt-only rather than\nwaiting on it, and the document is ready for the next one.`]})}),`\n`,_jsxs(_components.p,{children:[`Off unless set. See\n`,_jsx(_components.a,{href:`/api-reference/contact-fields/list-contact-fields`,children:`List Contact Fields`}),` for the catalog, and\n`,_jsx(_components.a,{href:`/api-reference/contacts/update-contact`,children:`Update Contact`}),` for the values.`]}),`\n`,_jsx(Heading,{level:`3`,id:`section-types`,children:`Section types`}),`\n`,_jsxs(_components.p,{children:[`Everything the visual builder can put in a conversation is expressed inside `,_jsx(_components.code,{children:`sections`}),` — the API is not a reduced version of the builder. A section is an object with a `,_jsx(_components.code,{children:`type`}),`, and `,_jsx(_components.code,{children:`type`}),` selects which other fields it carries. In the schema reference on the right this is a `,_jsx(_components.code,{children:`oneOf`}),` on the `,_jsx(_components.code,{children:`sections`}),` items, which renders collapsed, so the four shapes are written out here in full.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`label`}),` is optional on every section and is only a name for the step; it is what the builder shows on the canvas. `,_jsx(_components.code,{children:`id`}),` is assigned by InstaView — never send one.`]}),`\n`,_jsxs(Heading,{level:`4`,id:`sequential-—-a-topic-to-cover`,children:[_jsx(_components.code,{children:`sequential`}),` — a topic to cover`]}),`\n`,_jsxs(_components.p,{children:[`A step written as a free-text instruction, for when you want the agent to cover something in its own words rather than ask a fixed question. Supports `,_jsx(_components.code,{children:`{{contact.*}}`}),` variables.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sequential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Intro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Introduce yourself, say you are calling about their trial, and ask if now is a good time.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`4`,id:`looping-—-a-set-of-questions`,children:[_jsx(_components.code,{children:`looping`}),` — a set of questions`]}),`\n`,_jsx(_components.p,{children:`A list of questions the agent works through. One block can hold several questions; use separate blocks when you want them in different places in the conversation.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`question`}),` is the only required field. `,_jsx(_components.code,{children:`idealAnswer`}),` is what a good answer looks like, and it is optional: a question without one is still asked, just never scored. That is how you write a question set with no right answers, such as an internal survey or a satisfaction check.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`importance`}),` and `,_jsx(_components.code,{children:`weight`}),` are how a question joins the agent’s match score: set either one to score it (`,_jsx(_components.code,{children:`REQUIRED`}),` gates the score, `,_jsx(_components.code,{children:`PREFERRED`}),` contributes by weight), and a question with neither is asked but not scored. They sit on the question itself rather than in `,_jsx(_components.code,{children:`analyticsConfig`}),` because a question is addressed by an id InstaView assigns, which you cannot know while writing the flow.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"looping\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Qualify\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What are you using today?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"idealAnswer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Names a competing tool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What is your timeline?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"idealAnswer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Within this quarter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"importance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"REQUIRED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"weight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`40`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`4`,id:`conditional-—-take-a-different-route`,children:[_jsx(_components.code,{children:`conditional`}),` — take a different route`]}),`\n`,_jsxs(_components.p,{children:[`Splits the conversation. The agent evaluates the branches in order and follows exactly one; `,_jsx(_components.code,{children:`blocks`}),` is the route it then works through.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`blocks`}),` holds sections of any type, including another `,_jsx(_components.code,{children:`conditional`}),`, which is how you build a decision tree. `,_jsx(_components.code,{children:`condition`}),` is usually `,_jsx(_components.code,{children:`{ \"type\": \"intent\", \"description\": \"...\" }`}),` — a plain-language intent the agent reads off the conversation — and may instead be an `,_jsx(_components.code,{children:`expression`}),` for a deterministic test on an extracted field. `,_jsx(_components.code,{children:`defaultBranch`}),` is the fallthrough taken when no condition matches, and it addresses the branch by its `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`label`})}),`, because branch ids are assigned by InstaView.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The condition is what the agent routes on, so it has to be one it can read.`}),` Every entry in `,_jsx(_components.code,{children:`branches`}),` must be an object to begin with (`,_jsx(_components.code,{children:`CONDITIONAL_BRANCH_NOT_AN_OBJECT`}),`), and every branch needs a condition of one of those two shapes: a missing or non-object condition is a `,_jsx(_components.code,{children:`422`}),` (`,_jsx(_components.code,{children:`CONDITIONAL_CONDITION_MISSING`}),`), a `,_jsx(_components.code,{children:`type`}),` that is neither `,_jsx(_components.code,{children:`intent`}),` nor `,_jsx(_components.code,{children:`expression`}),` is `,_jsx(_components.code,{children:`CONDITIONAL_CONDITION_TYPE_UNKNOWN`}),`, and a condition of a known type missing what that type needs — an `,_jsx(_components.code,{children:`intent`}),` without a `,_jsx(_components.code,{children:`description`}),`, an `,_jsx(_components.code,{children:`expression`}),` without a `,_jsx(_components.code,{children:`field`}),`, with an operator outside the documented set, or with no `,_jsx(_components.code,{children:`value`}),` for an operator other than `,_jsx(_components.code,{children:`EXISTS`}),` — is `,_jsx(_components.code,{children:`CONDITIONAL_CONDITION_INVALID`}),`. The `,_jsx(_components.code,{children:`path`}),` names the branch, e.g. `,_jsx(_components.code,{children:`sections[0].branches[1].condition`}),`. The condition on the branch you nominate as `,_jsx(_components.code,{children:`defaultBranch`}),` is checked like any other: it is not read while that branch is the fallthrough, but moving `,_jsx(_components.code,{children:`defaultBranch`}),` elsewhere later would put it back in charge of a route.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"conditional\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Interest check\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"defaultBranch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Not now\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"branches\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Interested\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"condition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"intent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wants to see a demo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"blocks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sequential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Offer two slots this week and confirm one.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"looping\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Who else should join the demo?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"idealAnswer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Names a decision maker\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Not now\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"condition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"intent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"declines or asks to be contacted later\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"blocks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sequential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ask when to follow up and thank them.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`4`,id:`human_handoff-—-hand-the-call-to-a-person`,children:[_jsx(_components.code,{children:`human_handoff`}),` — hand the call to a person`]}),`\n`,_jsxs(_components.p,{children:[`Ends the agent’s part of the call and transfers it to a phone number. `,_jsx(_components.code,{children:`phoneNumber`}),` is required and must be `,_jsx(_components.strong,{children:`E.164`}),` (`,_jsx(_components.code,{children:`+`}),`, country code, no spaces or dashes) and a `,_jsx(_components.strong,{children:`real number for that country`}),`: the right length and leading digits for its numbering plan, so `,_jsx(_components.code,{children:`+42190012345`}),`, a Slovak mobile one digit short, is rejected even though it has the E.164 shape. Either problem is a `,_jsx(_components.code,{children:`422`}),` with `,_jsx(_components.code,{children:`HUMAN_HANDOFF_INVALID_NUMBER`}),` on the block. A number the dialler could not use is rejected at design time rather than at the moment of transfer.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`message`}),` is the line the caller hears as the call is transferred to this number, and it is optional — omit it and InstaView supplies a neutral line in the call’s language. That default says only that a transfer is happening: the block knows a number and nothing else, so it cannot claim who picks up. Send a `,_jsx(_components.code,{children:`message`}),` when you do know. It supports `,_jsx(_components.code,{children:`{{contact.*}}`}),` and `,_jsx(_components.code,{children:`{{system.*}}`}),` variables like any other text in a flow. A `,_jsx(_components.code,{children:`message`}),` that resolves to nothing on a call, because it held only variables and none had a value, falls back to the neutral line, so the transfer is never silent. Sending `,_jsx(_components.code,{children:`message`}),` as an empty string is rejected rather than treated as absent, so clearing the field cannot silently give you the default back.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Write `,_jsx(_components.code,{children:`message`}),` so it is true on every transfer to this number.`]}),` A caller who asks for a person before the flow reaches this step can be transferred here too, and hear this line. Describe the transfer (“I’ll put you through to our sales team now”) rather than what came before it (“Your card is blocked now, I’ll put you through”). Anything the agent should say only at this point of the flow belongs in the step before the handoff. The agent says that step in a turn of its own and transfers once the caller has responded, so a spoken step before a handoff adds one exchange to the call. The transfer itself carries no words but `,_jsx(_components.code,{children:`message`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Blocks that share a `,_jsx(_components.code,{children:`phoneNumber`}),` share one line.`]}),` A number has a single line, taken from the first handoff block that names it, reading the flow top to bottom with each branch in order. It is heard on every transfer to that number, including one made at a later block. A later block’s `,_jsx(_components.code,{children:`message`}),` is never heard. If the first block has no `,_jsx(_components.code,{children:`message`}),`, the neutral line is used even when a later block has one. To give a number a line of your own, put it on the first block that names the number.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"human_handoff\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sales\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phoneNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+421900123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"I'll put you through to Martin on our sales team now, one moment.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A handoff block also changes what happens when somebody asks for a person `,_jsx(_components.strong,{children:`away from`}),` that\nstep. Every agent carries a standing rule for “can I speak to a human?”; on a flow with no\nhandoff it says a colleague will be in touch and ends the call, and on a flow that has one it\ntransfers instead, wherever in the conversation the request comes. Where it can, the agent\nchooses the destination by `,_jsx(_components.code,{children:`label`}),`, and the caller can then hear that number’s line: the\n`,_jsx(_components.code,{children:`message`}),` of the first block that names it, or the neutral line if that block has none. That\nis why a `,_jsx(_components.code,{children:`message`}),` has to make sense away from its step.`]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The transfer is final, and it is the end of the conversation.`}),` InstaView hands the\ncall to the carrier and leaves it (a cold transfer), so the agent does not come back:\n`,_jsxs(_components.strong,{children:[`nothing after a `,_jsx(_components.code,{children:`human_handoff`}),` ever runs`]}),`, including your `,_jsx(_components.code,{children:`lastMessage`}),`. The conversation\nsettles as completed with the call recorded as forwarded, and the transcript covers your\nagent’s part of the call only — what the two people then say to each other is not ours to\nrecord.`]}),_jsxs(_components.p,{children:[`Because such a step could never run, `,_jsx(_components.strong,{children:`a handoff must be the last block in its own list`}),`,\nand a sibling after it is rejected with `,_jsx(_components.code,{children:`HUMAN_HANDOFF_NOT_LAST`}),`. That is scoped to\nimmediate siblings: a handoff ending one branch of a `,_jsx(_components.code,{children:`conditional`}),` says nothing about the\nsections after that conditional, which the other branches still reach.`]})]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`PHONE agents only.`}),` An `,_jsx(_components.code,{children:`ONLINE`}),` agent has no call to transfer, so a flow carrying a\nhandoff is rejected with a `,_jsx(_components.code,{children:`422`}),` (`,_jsx(_components.code,{children:`HUMAN_HANDOFF_NOT_PHONE`}),`) rather than creating an\nagent with a step that could never fire.`]})}),`\n`,_jsxs(_components.p,{children:[`A handoff may sit inside a `,_jsx(_components.code,{children:`conditional`}),` branch, which is the useful shape: route on intent, then transfer to the number that fits. Two branches transferring to the `,_jsx(_components.strong,{children:`same`}),` number are one destination, not two — handoffs are deduplicated by number.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`A flow that can reach two numbers needs a `,_jsx(_components.code,{children:`label`}),` on every handoff, and they must\ndiffer.`]}),` The agent is offered all reachable destinations at once and chooses between them\nby label — the number is deliberately never in its prompt — so two destinations described\nalike would make the choice a coin flip that lands a caller on the wrong team. Missing\nlabels are `,_jsx(_components.code,{children:`HUMAN_HANDOFF_LABEL_REQUIRED`}),` and a collision is\n`,_jsx(_components.code,{children:`HUMAN_HANDOFF_LABEL_DUPLICATE`}),`. A single-destination flow needs no label: there is nothing\nto tell apart. Two blocks pointing at the `,_jsx(_components.em,{children:`same`}),` number are one destination, so they may\nshare a label, or go without one.`]})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`There is no fallback number.`}),` Once the carrier has the call InstaView is no longer on\nit, so nothing can notice that the destination was busy and try a second one. “Try sales,\notherwise support” is a `,_jsx(_components.code,{children:`conditional`}),` the agent routes on `,_jsx(_components.strong,{children:`while it still has the call`}),`,\nnot a property of the handoff.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`limits`,children:`Limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What`}),_jsx(_components.th,{children:`Limit`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sections in a flow`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1–100`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Questions in a `,_jsx(_components.code,{children:`looping`}),` block`]}),_jsx(_components.td,{children:`1–50`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Branches on a `,_jsx(_components.code,{children:`conditional`})]}),_jsx(_components.td,{children:`2–5`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sections in one branch`}),_jsx(_components.td,{children:`up to 50`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Nesting depth of conditionals`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`3`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Exceeding any of these is rejected with `,_jsx(_components.code,{children:`422`}),`.`]}),`\n`,_jsxs(Info,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`These four types are the whole set.`}),` The schema reserves nothing beyond them, so any\nother value in `,_jsx(_components.code,{children:`type`}),` is simply an unknown block: it comes back as `,_jsx(_components.code,{children:`UNKNOWN_BLOCK_TYPE`}),`\nin the `,_jsx(_components.code,{children:`errors`}),` array, alongside every other fault in the document.`]}),_jsxs(_components.p,{children:[`A type may still be added to the schema before it works, and while it is in that state\nsending one is rejected with a `,_jsx(_components.code,{children:`422`}),` naming the block and the types you may use instead.\nThat list is generated from what is actually built, so it is the authoritative answer to\nwhat a section may be at any given moment.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`flow-validation-errors`,children:`Flow Validation Errors`}),`\n`,_jsxs(_components.p,{children:[`The flow is validated when you create the agent, using the same rules as the visual builder — an invalid flow is rejected with `,_jsx(_components.code,{children:`422`}),`, rather than failing later when a call is placed.`]}),`\n`,_jsxs(_components.p,{children:[`The rejection carries an `,_jsx(_components.code,{children:`errors`}),` array with `,_jsx(_components.strong,{children:`every`}),` problem found in the document, so fixing a flow does not take one request per fault. Each entry has a machine-readable `,_jsx(_components.code,{children:`code`}),` and the `,_jsx(_components.code,{children:`path`}),` of the offending node in the flow `,_jsx(_components.strong,{children:`you sent`}),`, which is what to anchor an editor or an error list to.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"statusCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid conversation flow.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"UNKNOWN_BLOCK_TYPE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Unknown block type: teleport.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sections[2].branches[0].blocks[1]\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SEQUENTIAL_PROMPT_EMPTY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sequential block prompt must not be empty.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sections[0]\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"traceId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6a707aee000000000c1e285eefed9980\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Match on the codes you handle, and fall back on `,_jsx(_components.code,{children:`message`}),` for the rest.`]}),` The set of\ncodes grows as the flow schema does, and a new one is added without a major version.`]})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`path`}),` is the anchor, and the only one.`]}),` Block ids are assigned by InstaView when a\nflow is stored, so a flow that was just rejected has none to report — errors address\nthe document you sent, by position.`]})}),`\n`,_jsxs(_components.p,{children:[`Not every `,_jsx(_components.code,{children:`422`}),` on this route is a flow-validation failure — one of the size limits above, a block type that is not available yet, or a `,_jsx(_components.code,{children:`companyPhoneNumberId`}),` that is not yours, is also a `,_jsx(_components.code,{children:`422`}),`. Those carry a `,_jsx(_components.code,{children:`message`}),` and `,_jsx(_components.strong,{children:`no`}),` `,_jsx(_components.code,{children:`errors`}),` array, so treat `,_jsx(_components.code,{children:`errors`}),` as optional:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"statusCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Branch blocks at sections[2].branches[0] exceeds the maximum of 50 (received 51).\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"traceId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6a707aee000000000c1e285eefed9980\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The same `,_jsx(_components.code,{children:`422`}),` shape is returned by `,_jsx(_components.a,{href:`/api-reference/agents/update-agent`,children:`Update Agent`}),` and by an inline `,_jsx(_components.code,{children:`agent`}),` on `,_jsx(_components.a,{href:`/api-reference/conversations/create-conversation`,children:`Create Conversation`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`analytics`,children:`Analytics`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`analyticsConfig`}),` says what should come back `,_jsx(_components.strong,{children:`after`}),` every call. Without it a custom agent places a call and returns a transcript; with it you get structured data your own systems can act on. Like `,_jsx(_components.code,{children:`guardrails`}),` and `,_jsx(_components.code,{children:`contextConfig`}),`, it is accepted only alongside a `,_jsx(_components.code,{children:`flow`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What it does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`extractionTargets`})}),_jsxs(_components.td,{children:[`The values to pull out of each call. A target with an `,_jsx(_components.code,{children:`ideal`}),` also counts toward the match score.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scoringCriteria`})}),_jsx(_components.td,{children:`Holistic judgements over the whole call — “handled objections”, “built rapport”.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`outcomes`})}),_jsx(_components.td,{children:`Did the call achieve what it was for? Decided met / not met per call.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`outputTags`})}),_jsx(_components.td,{children:`Labels the AI may assign to a call.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`capture`})}),_jsxs(_components.td,{children:[`Which qualitative artefacts to produce (summary, Q\u0026A, evaluation, sentiment, recording, transcript). All default to `,_jsx(_components.code,{children:`true`}),`.`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`28`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`28`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // …name, type, language, duration, flow as above…`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"analyticsConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"extractionTargets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"budget_confirmed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Budget confirmed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ideal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"A confirmed budget of at least 10k\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"importance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"REQUIRED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"weight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 50`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Current tool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scoringCriteria\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Handled objections\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Acknowledged the objection and answered it with a concrete example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"weight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 20`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"outcomes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Meeting booked\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"The contact agreed to a specific date and time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"outputTags\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Needs follow-up\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"The contact asked to be called back\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"capture\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sentiment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`keys-are-yours`,children:`Keys are yours`}),`\n`,_jsxs(_components.p,{children:[`Every item has a `,_jsx(_components.code,{children:`key`}),` — the name its results come back under. `,_jsx(_components.strong,{children:`Set it if your integration reads results by name.`}),` A key you choose is stable; a derived one is not:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Omit `,_jsx(_components.code,{children:`key`}),` and InstaView derives a slug of `,_jsx(_components.code,{children:`label`}),` (`,_jsx(_components.code,{children:`Budget confirmed`}),` → `,_jsx(_components.code,{children:`budget_confirmed`}),`). Convenient, but renaming the label later silently moves the results to a new key, and your consumer breaks with a `,_jsx(_components.code,{children:`200`}),`. Two labels that slug to the same thing get a numeric suffix — `,_jsx(_components.code,{children:`Budget`}),` and `,_jsx(_components.code,{children:`Budget?`}),` become `,_jsx(_components.code,{children:`budget`}),` and `,_jsx(_components.code,{children:`budget_2`}),`, in the order you listed them.`]}),`\n`,_jsxs(_components.li,{children:[`Send `,_jsx(_components.code,{children:`key`}),` and it is used verbatim, whatever you do to the label afterwards. Letters, digits and underscores, up to 64 characters, unique within its list — a duplicate you sent is rejected with `,_jsx(_components.code,{children:`400`}),` rather than quietly renamed, and `,_jsx(_components.code,{children:`__proto__`}),`, `,_jsx(_components.code,{children:`constructor`}),` and `,_jsx(_components.code,{children:`prototype`}),` are refused because they cannot be used as field names in the results.`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Editing the agent in the visual builder re-derives each key from its label, so a key you\nchose over the API can be replaced by someone editing that agent in the UI.`})}),`\n`,_jsx(Heading,{level:`4`,id:`scoring-a-flow-question`,children:`Scoring a flow question`}),`\n`,_jsxs(_components.p,{children:[`Questions join the match score `,_jsx(_components.strong,{children:`inline, on the question itself`}),` — not through `,_jsx(_components.code,{children:`analyticsConfig`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"looping\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"questions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"What are you using today?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"idealAnswer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Names a competing tool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"importance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"REQUIRED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"weight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"What is your timeline?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"idealAnswer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Within this quarter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"How has the rollout felt so far?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Only the first question is scored. The second carries an `,_jsx(_components.code,{children:`idealAnswer`}),` but no `,_jsx(_components.code,{children:`importance`}),` or `,_jsx(_components.code,{children:`weight`}),`, so it stays out of the score — nothing is scored that you did not ask for. The third has no `,_jsx(_components.code,{children:`idealAnswer`}),` at all, so it cannot be scored even if you set `,_jsx(_components.code,{children:`importance`}),` on it.`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`This is inline for the same reason ids are assigned by us: a question is addressed by an\nid InstaView mints, which you cannot know while writing the flow. Reading the agent back\nreturns the same inline form, so a round-trip works.`})}),`\n`,_jsxs(_components.p,{children:[`Weights are `,_jsx(_components.strong,{children:`relative`}),`, not a budget — `,_jsx(_components.code,{children:`50 / 30 / 20`}),` and `,_jsx(_components.code,{children:`5 / 3 / 2`}),` score identically. Results report each item’s share as a percentage.`]}),`\n`,_jsxs(_components.p,{children:[`The results arrive as `,_jsx(_components.code,{children:`analytics`}),` on the conversation (`,_jsx(_components.a,{href:`/api-reference/conversations/get-conversation`,children:`Get Conversation`}),`) and on the `,_jsx(_components.code,{children:`analysis.completed`}),` `,_jsx(_components.a,{href:`/guides/webhooks`,children:`webhook`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`retries-and-calling-hours`,children:`Retries and calling hours`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`callConfig`}),` answers two questions: how many times a contact who does not answer is called, and when the agent is allowed to dial.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What it does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`retryPolicy.maxAttempts`})}),_jsxs(_components.td,{children:[`Attempts per contact, counting the first, `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`5`}),`. Reschedules the contact asks for come out of this budget; a network failure that never reached them does not.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`callWindow.days`})}),_jsxs(_components.td,{children:[`Days the agent may call on, from `,_jsx(_components.code,{children:`mon`}),` … `,_jsx(_components.code,{children:`sun`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`callWindow.start`}),` / `,_jsx(_components.code,{children:`callWindow.end`})]}),_jsxs(_components.td,{children:[`Local hours the agent may call between, `,_jsx(_components.code,{children:`\"HH:mm\"`}),` on a 24-hour clock. `,_jsx(_components.code,{children:`end`}),` is exclusive and must be later in the day than `,_jsx(_components.code,{children:`start`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`callWindow.timezoneAnchor`})}),_jsxs(_components.td,{children:[`Whose clock `,_jsx(_components.code,{children:`start`}),` and `,_jsx(_components.code,{children:`end`}),` are on. This is the field that decides what the hours actually mean.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Omit `,_jsx(_components.code,{children:`callConfig`}),` and a new agent calls `,_jsx(_components.strong,{children:`Mon–Fri, 09:00–18:00, in each contact’s own timezone`}),`, three attempts each.`]}),`\n`,_jsx(Heading,{level:`4`,id:`whose-0900`,children:`Whose 09:00?`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`timezoneAnchor.mode`}),` is either `,_jsx(_components.code,{children:`contact`}),` or `,_jsx(_components.code,{children:`fixed`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`contact`}),`, the contact’s timezone is detected `,_jsx(_components.strong,{children:`from their phone number, down to the area code`}),` — not from their country. On one list, a `,_jsx(_components.code,{children:`+1 212`}),` number is called at 09:00 in New York, a `,_jsx(_components.code,{children:`+1 310`}),` number at 09:00 in Los Angeles, and a `,_jsx(_components.code,{children:`+1 602`}),` number at 09:00 in Phoenix, which does not observe daylight saving at all. The same holds inside any country that spans zones: `,_jsx(_components.code,{children:`+7 4212`}),` is Vladivostok rather than Moscow, `,_jsx(_components.code,{children:`+55 92`}),` is Manaus rather than São Paulo, `,_jsx(_components.code,{children:`+52 664`}),` is Tijuana rather than Mexico City.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // …name, type, language, duration, flow as above…`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"callConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"retryPolicy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"maxAttempts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"callWindow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"days\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mon\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"tue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"thu\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fri\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"start\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"09:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"end\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"18:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"timezoneAnchor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contact\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`fixed`}),`, every contact is called on one named IANA zone, wherever they are — the right choice when the hours belong to your own operation rather than to the person being called.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"callConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"callWindow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"days\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mon\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"tue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"thu\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fri\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"start\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"09:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"end\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"17:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"timezoneAnchor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"fixed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"timezone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Europe/Bratislava\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A timezone is validated against the runtime’s own timezone database, so a plausible-looking but nonexistent zone is a `,_jsx(_components.code,{children:`422`}),` on this request rather than a schedule that quietly never fires.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Some prefixes cover more than one timezone.`}),` An Australian `,_jsx(_components.code,{children:`+61 8`}),` number could be in\nAdelaide or Perth, up to two hours apart, and a phone number cannot tell you which. In that\ncase the agent waits until the hours you set are correct in `,_jsx(_components.strong,{children:`every`}),` contact’s zone rather\nthan picking one — so an uncertain contact is called a little later, never two hours too\nearly. `,_jsx(_components.code,{children:`timezoneAnchor.fallbackTimezone`}),` (default `,_jsx(_components.code,{children:`Europe/Bratislava`}),`) covers the rarer case\nwhere a number resolves to no timezone at all.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`A narrow window over a wide prefix can leave no valid moment at all.`}),` Requiring the hours to\nbe correct in every contact’s zone means a short window over zones far enough apart never lines\nup: `,_jsx(_components.code,{children:`09:00`}),`–`,_jsx(_components.code,{children:`10:00`}),` cannot be true in both Adelaide and Perth at once. When that happens the\ncontact is `,_jsx(_components.strong,{children:`called anyway`}),` rather than left uncalled indefinitely, and the call is recorded as\nhaving gone out outside the window. Widening the window, or pinning the anchor to `,_jsx(_components.code,{children:`fixed`}),`, is\nhow you avoid it.`]})}),`\n`,_jsx(_components.p,{children:`Retries land inside the same window, so a contact is never called back outside the hours you set.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`A time you name yourself is not moved.`}),` The window bounds the times `,_jsx(_components.em,{children:`we`}),` choose: when a\nconversation created with no `,_jsx(_components.code,{children:`scheduleTime`}),` goes out, and every retry after a call that did not\nconnect. Pass a `,_jsx(_components.code,{children:`scheduleTime`}),` on `,_jsx(_components.a,{href:`/api-reference/conversations/create-conversation`,children:_jsx(_components.code,{children:`POST /conversations`})}),`, or a time on either call-attempt\nroute, and the call is placed then even if the window is shut, because you have told us\nsomething the window cannot know. If you would rather your window always won, keep sending\ntimes inside it: an appointment your contact agreed to is usually the case where you want the\noverride, and a bulk import is usually the case where you want to omit `,_jsx(_components.code,{children:`scheduleTime`}),` and let\nthe window place the call.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`agents-created-before-calling-windows-existed`,children:`Agents created before calling windows existed`}),`\n`,_jsxs(_components.p,{children:[`An agent from before this was configurable reports a `,_jsx(_components.code,{children:`callWindow.mode`}),` of `,_jsx(_components.code,{children:`business_hours`}),` and no other window fields:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"callConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"retryPolicy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"maxAttempts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"callWindow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"business_hours\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`That is a legacy preset meaning `,_jsx(_components.strong,{children:`Mon–Fri, 08:00–20:00, in the contact’s own timezone`}),` — the hours those agents were already being called within, so nothing about their dialling changed when calling windows shipped. You cannot select it; sending a `,_jsx(_components.code,{children:`callWindow`}),` is how such an agent is moved onto a real one.`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Those hours are not a new restriction and not a widening. Before agents carried a window, the\nhours were attached to the phone number instead, and every number was created with exactly\nthis schedule. The preset reproduces it so that migrating changes nothing you can observe. The\npractical difference between it and a window you set yourself is that you cannot edit it, and\nthat its timezone anchor is fixed to the contact.`})}),`\n`,_jsx(Heading,{level:`3`,id:`contact-variables`,children:`Contact Variables`}),`\n`,_jsxs(_components.p,{children:[`Any text in a flow — messages, prompts, questions — may contain `,_jsx(_components.code,{children:`{{contact.\u003ckey>}}`}),` placeholders. They are `,_jsx(_components.strong,{children:`not`}),` filled in when you create the agent: the agent is compiled once and the placeholders are resolved per call, so one agent serves every person you call.`]}),`\n`,_jsx(_components.p,{children:`Seven keys are always available. The first four come from the contact on the conversation; the rest come from your company profile and the agent itself:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Key`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{contact.first_name}}`})}),_jsx(_components.td,{children:`The contact’s first name`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{contact.last_name}}`})}),_jsx(_components.td,{children:`The contact’s last name`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{contact.email}}`})}),_jsx(_components.td,{children:`The contact’s email`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{contact.phone}}`})}),_jsx(_components.td,{children:`The contact’s phone number`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{contact.company_name}}`})}),_jsx(_components.td,{children:`Your company’s name`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{contact.company_description}}`})}),_jsx(_components.td,{children:`The description on your company profile`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{contact.agent_name}}`})}),_jsx(_components.td,{children:`The voice agent’s own name`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`{{contact.company_name}}`}),` is `,_jsx(_components.em,{children:`your`}),` company, not theirs.`]}),` It resolves from the company\nplacing the call, so `,_jsx(_components.code,{children:`\"I see you work at {{contact.company_name}}\"`}),` is a fluent sentence that is\nwrong on every single call, and nothing rejects it. The contact’s own employer is an ordinary\ncatalogued field — `,_jsx(_components.code,{children:`organization`}),` in the default catalog — set per contact like any other.`]})}),`\n`,_jsxs(_components.p,{children:[`You can add your own. Send them as `,_jsx(_components.code,{children:`fields`}),` when you create the contact, then reference them by key:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` /`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`contacts`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"firstName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Jana\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"lastName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Novák\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"phoneNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+421900123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"fields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"order_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"AB-99\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"renewal_date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"12 September\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// …then, in the flow:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sequential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Confirm order {{contact.order_number}} renews on {{contact.renewal_date}}.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Keys are `,_jsx(_components.code,{children:`a-z`}),`, `,_jsx(_components.code,{children:`0-9`}),` and `,_jsx(_components.code,{children:`_`}),`, and each one has to be a field in your company’s catalog —\nread `,_jsx(_components.a,{href:`/api-reference/contact-fields/list-contact-fields`,children:_jsx(_components.code,{children:`GET /contact-fields`})}),` for the ones\nyou have, or pass `,_jsx(_components.code,{children:`?createMissingFields=true`}),` on the contact write to have a new key defined\nfor you. A key with no value resolves to an empty string rather than being spoken aloud, so a\nmissing variable degrades quietly — but write prompts that still read correctly without it.\nThe seven system keys above are reserved: sending one in `,_jsx(_components.code,{children:`fields`}),` is a `,_jsx(_components.code,{children:`422`}),` naming the key,\nnot a write that quietly does nothing. `,_jsx(_components.code,{children:`first_name`}),`, `,_jsx(_components.code,{children:`last_name`}),`, `,_jsx(_components.code,{children:`email`}),` and `,_jsx(_components.code,{children:`phone`}),` are set\nthrough their own properties on the contact; the other three are resolved by the platform and\ncannot hold a per-contact value at all.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`contact-profile`,children:_jsx(_components.code,{children:`{{contact.profile}}`})}),`\n`,_jsxs(_components.p,{children:[`An eighth reserved key exists and is deliberately not in the table above. `,_jsx(_components.code,{children:`{{contact.profile}}`}),` is\nthe whole `,_jsx(_components.strong,{children:`rendered summary`}),` of what we know about the contact — the block\n`,_jsx(_components.code,{children:`contextConfig.useContactContext`}),` puts in the agent’s prompt, a paragraph rather than a value. The\nagent is given it on its own when that switch is on, so there is nothing to gain by writing the\ntoken, and putting it in a message or a prompt makes the agent read that paragraph out loud. Like\nthe other reserved keys it cannot hold a per-contact value: sending `,_jsx(_components.code,{children:`profile`}),` in `,_jsx(_components.code,{children:`fields`}),` is a\n`,_jsx(_components.code,{children:`422`}),`.`]}),`\n`,_jsx(Heading,{level:`4`,id:`system-variables`,children:`System Variables`}),`\n`,_jsxs(_components.p,{children:[`A second namespace, `,_jsx(_components.code,{children:`{{system.\u003ckey>}}`}),`, is filled from the platform’s clock rather than from the\ncontact. It works anywhere `,_jsx(_components.code,{children:`{{contact.*}}`}),` does and needs no setup:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Key`}),_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Example`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{system.today}}`})}),_jsx(_components.td,{children:`Today’s date, in the contact’s own timezone`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2026-09-10`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{system.now}}`})}),_jsx(_components.td,{children:`The contact’s local date and time`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2026-09-10 14:30`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{system.day_of_week}}`})}),_jsx(_components.td,{children:`The English weekday name, which the agent says in the call’s language`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Thursday`})})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sequential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Offer a slot: today is {{system.day_of_week}}, so suggest early next week.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The timezone is derived from the contact’s phone number, falling back to UTC when the number\nresolves to none. Every agent is separately told the current date and time whether or not it uses\nthese, so reach for them only when a line has to `,_jsx(_components.strong,{children:`state`}),` a date or a day.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`A key with no value resolves to nothing, in both namespaces.`}),` The placeholder disappears from\nthe line — it is never read out as a token, and the agent is never told a value was missing. So\n`,_jsx(_components.code,{children:`\"Am I through to {{contact.organization}}?\"`}),` is spoken as `,_jsx(_components.code,{children:`\"Am I through to?\"`}),` for a contact\nwith no organisation. The agent is instructed to reword around the hole, but the reliable fix is\nto write the sentence so it survives losing the value: put the token where it can be dropped, or\nask instead of asserting.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`company-scoping`,children:`Company Scoping`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Agents are automatically scoped to your API key’s company. You can only access\nand use agents that belong to your company. ATS keys can access agents from\ncompanies they manage by specifying the `,_jsx(_components.code,{children:`companyId`}),` query parameter.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`related-resources`,children:`Related Resources`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Agents Resource Guide`,icon:`robot`,href:`/guides/resources/agents`,children:_jsx(_components.p,{children:`Learn about agent configuration and best practices`})}),_jsx(Card,{title:`Conversations Resource Guide`,icon:`microphone`,href:`/guides/resources/conversations`,children:_jsx(_components.p,{children:`See how a conversation uses an agent`})}),_jsx(Card,{title:`API Reference`,icon:`code`,href:`/api-reference/agents/list-agents`,children:_jsx(_components.p,{children:`List and manage your agents`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Agent","openapi":"POST /agents","description":"Creates a new agent scoped to the API key's company. Send a `flow` (with optional `guardrails` and `contextConfig`) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template `focus`.","href":"/api-reference/agents/create-agent"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Use Cases","slug":"use-cases","depth":2,"children":[]},{"title":"Basic Agent Creation","slug":"basic-agent-creation","depth":2,"children":[]},{"title":"Comprehensive Agent Configuration","slug":"comprehensive-agent-configuration","depth":2,"children":[]},{"title":"Phone Agents","slug":"phone-agents","depth":2,"children":[]},{"title":"Background Sound","slug":"background-sound","depth":2,"children":[]},{"title":"Voice Options","slug":"voice-options","depth":2,"children":[]},{"title":"Agent Focus","slug":"agent-focus","depth":2,"children":[{"title":"Example with Focus","slug":"example-with-focus","depth":3,"children":[]}]},{"title":"Speaking for Another Company","slug":"speaking-for-another-company","depth":2,"children":[]},{"title":"Creating from a Composer Session","slug":"creating-from-a-composer-session","depth":2,"children":[]},{"title":"Custom Agents","slug":"custom-agents","depth":2,"children":[{"title":"Telling the agent about the person it is calling","slug":"telling-the-agent-about-the-person-it-is-calling","depth":3,"children":[]},{"title":"Section types","slug":"section-types","depth":3,"children":[]},{"title":"sequential — a topic to cover","slug":"sequential-—-a-topic-to-cover","depth":4,"children":[]},{"title":"looping — a set of questions","slug":"looping-—-a-set-of-questions","depth":4,"children":[]},{"title":"conditional — take a different route","slug":"conditional-—-take-a-different-route","depth":4,"children":[]},{"title":"human_handoff — hand the call to a person","slug":"human_handoff-—-hand-the-call-to-a-person","depth":4,"children":[]},{"title":"Limits","slug":"limits","depth":4,"children":[]},{"title":"Flow Validation Errors","slug":"flow-validation-errors","depth":3,"children":[]},{"title":"Analytics","slug":"analytics","depth":3,"children":[]},{"title":"Keys are yours","slug":"keys-are-yours","depth":4,"children":[]},{"title":"Scoring a flow question","slug":"scoring-a-flow-question","depth":4,"children":[]},{"title":"Retries and calling hours","slug":"retries-and-calling-hours","depth":3,"children":[]},{"title":"Whose 09:00?","slug":"whose-0900","depth":4,"children":[]},{"title":"Agents created before calling windows existed","slug":"agents-created-before-calling-windows-existed","depth":4,"children":[]},{"title":"Contact Variables","slug":"contact-variables","depth":3,"children":[]},{"title":"{{contact.profile}}","slug":"contact-profile","depth":4,"children":[]},{"title":"System Variables","slug":"system-variables","depth":4,"children":[]}]},{"title":"Company Scoping","slug":"company-scoping","depth":2,"children":[]},{"title":"Related Resources","slug":"related-resources","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Creates a new agent scoped to the API key's company. Send a `flow` (with optional `guardrails` and `contextConfig`) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template `focus`.","operationId":"PublicAgentsController_createAgent_v1","parameters":["f17df3a8-fc5b-48a6-a42d-ef24c23838c2"],"requestBody":"ec9983fc-7eb7-4385-bbe9-ee0274a056e6","responses":{"201":"529146aa-cf2f-47b4-bad0-79b43a822bb2","422":"83d54df8-3014-4ff7-81fc-4d001965082b"},"security":["81180ae0-09bf-4cd7-b044-f69dbf101d84"],"summary":"Create agent","tags":["Agents"],"method":"post","type":"path","servers":["fefe9da2-a252-4644-8424-0eaff357a7a8"],"path":"/agents","baseUrlOptions":["https://api.instaview.sk"],"title":"Create agent","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"f17df3a8-fc5b-48a6-a42d-ef24c23838c2":{"name":"companyId","required":false,"in":"query","description":"Required for ATS API keys to specify which company to access. Ignored for standard company API keys.","schema":{"type":"string","isRequired":false,"description":"Required for ATS API keys to specify which company to access. Ignored for standard company API keys.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["composerSessionId"],"properties":{"composerSessionId":{"type":"string","format":"uuid","description":"Create this agent from a composer session (`POST /agents/composer`). Send it alone to build exactly what the preview showed, or alongside your own fields to override parts of it — anything you send wins. The session's conversation is attached to the new agent. While it is present, `name`, `type`, `language` and `duration` are optional: the session already has them.","example":"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90","isRequired":true,"uniqueKey":"oneOf.0.composerSessionId","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Agent name","example":"Senior Developer Phone Screen","minLength":2,"maxLength":100,"uniqueKey":"oneOf.0.name","typeLabel":"string"},"type":{"type":"string","description":"Type of the agent","enum":["UNDEFINED","ONLINE","PHONE"],"example":"ONLINE","uniqueKey":"oneOf.0.type","typeLabel":"enum\u003cstring>"},"focus":{"type":"string","description":"Focus of the agent. GENERIC: job-optional, for a conversation that is not about a particular job. SCREENING: a hiring screen against a job's requirements. OUTREACH: a first call to gauge interest. LANGUAGE_TEST: language proficiency. Required unless a conversation `flow` is provided: an agent with a flow is a custom agent, whose focus is derived rather than selected. Sending both is rejected.","enum":["GENERIC","SCREENING","OUTREACH","LANGUAGE_TEST"],"example":"SCREENING","uniqueKey":"oneOf.0.focus","typeLabel":"enum\u003cstring>"},"language":{"type":"string","description":"Language of the conversation","enum":["UNDEFINED","EN","JA","ZH","DE","HI","FR","KO","PT","IT","ES","ID","NL","TR","FIL","PL","SV","BG","RO","AR","CS","EL","FI","HR","MS","SK","DA","TA","UK","RU","HU","NO","VI"],"example":"EN","uniqueKey":"oneOf.0.language","typeLabel":"enum\u003cstring>"},"duration":{"type":"number","description":"Duration of the conversation in minutes","example":30,"minimum":1,"maximum":180,"uniqueKey":"oneOf.0.duration","typeLabel":"number"},"questions":{"description":"List of questions for the conversation","example":["Tell me about a challenging project you worked on"],"type":"array","items":{"type":"string","uniqueKey":"oneOf.0.questions.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.0.questions","typeLabel":"string[]"},"instructions":{"type":"string","description":"Additional instructions for the conversation. Compiled into the agent's prompt as its own reference section, for a CUSTOM (flow) agent as well as a template one, so this is where reference material the agent must state accurately belongs: prices, stock, lead times, opening hours, policy.","example":"Focus on communication skills and team fit","uniqueKey":"oneOf.0.instructions","typeLabel":"string"},"voiceId":{"type":"string","description":"Voice ID the agent speaks with","enum":["ALEX","PETER","MIRIAM","SUE","VIERA","CASANDRA","SILVIA","MICHAEL","LUKE","EMMA","SARAH","EVA"],"uniqueKey":"oneOf.0.voiceId","typeLabel":"enum\u003cstring>"},"companyPhoneNumberId":{"type":"string","description":"ID of the company phone number assignment to use for calls from this agent (CompanyPhoneNumber.id)","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000","uniqueKey":"oneOf.0.companyPhoneNumberId","typeLabel":"string\u003cuuid>"},"metadata":{"type":"object","description":"Custom metadata for the agent (max 10KB, 5 levels deep, 50 keys)","example":{"department":"Sales","internalId":"AGENT-001"},"uniqueKey":"oneOf.0.metadata","typeLabel":"object"},"cefrLevel":{"type":"string","description":"CEFR level for language test agents","enum":["A1","A2","B1","B2","C1","C2"],"example":"B1","uniqueKey":"oneOf.0.cefrLevel","typeLabel":"enum\u003cstring>"},"backgroundSound":{"type":"string","description":"Ambient background sound during calls (`OFFICE` or `OFF`). Defaults to `OFFICE` when omitted.","enum":["OFF","OFFICE"],"example":"OFFICE","uniqueKey":"oneOf.0.backgroundSound","typeLabel":"enum\u003cstring>"},"flow":{"type":"object","description":"Conversation flow graph. Providing it makes this a custom agent, so `focus` must be omitted. `guardrails` and `contextConfig` are accepted only alongside a flow. Validated on write: an invalid flow is rejected with `422` rather than failing when a call is placed.","required":["firstMessage","sections","lastMessage"],"properties":{"firstMessage":{"type":"object","description":"What the agent says first. Supports `{{contact.*}}` variables, injected per call.","required":["type","text"],"properties":{"type":{"type":"string","enum":["first_message"],"isRequired":true,"uniqueKey":"oneOf.0.flow.firstMessage.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The opening line.","example":"Hi {{contact.firstName}}, do you have two minutes?","isRequired":true,"uniqueKey":"oneOf.0.flow.firstMessage.text","typeLabel":"string"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.0.flow.firstMessage.label","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.flow.firstMessage","typeLabel":"object"},"sections":{"type":"array","description":"The body of the conversation, worked through in order. At least one section is required.","minItems":1,"maxItems":100,"items":{"oneOf":[{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","prompt"],"properties":{"type":{"type":"string","enum":["sequential"],"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","description":"What the agent should cover here. Supports `{{contact.*}}` variables.","example":"Introduce yourself and explain why you are calling.","isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.0.prompt","typeLabel":"string"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.0.label","typeLabel":"string"}},"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","questions"],"properties":{"type":{"type":"string","enum":["looping"],"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"questions":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","required":["question"],"properties":{"question":{"type":"string","description":"The question to ask. Supports `{{contact.*}}` variables.","example":"What are you using today?","isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].question","typeLabel":"string"},"idealAnswer":{"type":"string","description":"What a good answer looks like, used when scoring the call. Optional, and it is the scoring switch: a question without one is still asked but never scored, which is how you write a question set that has no right answers (an internal survey, a satisfaction check).","example":"Names a competing tool","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].idealAnswer","typeLabel":"string"},"weight":{"type":"number","description":"Relative importance of this question when scoring. Setting it also opts the question into the match score (as `PREFERRED` unless `importance` says otherwise).","minimum":0,"example":40,"maximum":100,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].weight","typeLabel":"number"},"importance":{"type":"string","description":"Opts this question into the agent's match score. Set `importance` (or `weight`) to score it; a question with neither is asked but not scored. `REQUIRED` gates the score, `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].importance","typeLabel":"enum\u003cstring>"}},"description":"A question the agent asks, optionally with the answer it is measured against. `importance` and `weight` are how a question joins the match score — they live here rather than in `analyticsConfig` because a question is addressed by an id InstaView assigns, which a caller cannot know when writing the flow.","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1.questions","typeLabel":"object[]"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1.label","typeLabel":"string"}},"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","branches"],"properties":{"type":{"type":"string","enum":["conditional"],"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"branches":{"type":"array","description":"Between 2 and 5 routes, evaluated in order.","minItems":2,"maxItems":5,"items":{"type":"object","description":"One route out of a `conditional`. Every entry in `branches` must be an object; anything else (a `null` left by a client that built the array by index, say) is rejected with `422` (`CONDITIONAL_BRANCH_NOT_AN_OBJECT`).","required":["label","condition","blocks"],"properties":{"label":{"type":"string","description":"What this route is — unique within the block, and how `defaultBranch` addresses it.","example":"Interested","isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].label","typeLabel":"string"},"condition":{"oneOf":[{"type":"object","description":"How the route is chosen.\n\nRequired on every branch, and it must match one of the two shapes below — it is what the agent routes on. A missing or non-object condition is rejected with `422` (`CONDITIONAL_CONDITION_MISSING`), a `type` that is neither `intent` nor `expression` with `CONDITIONAL_CONDITION_TYPE_UNKNOWN`, and a condition of a known type missing the fields that type needs with `CONDITIONAL_CONDITION_INVALID`. Each carries the `path` of the offending branch, e.g. `sections[0].branches[1].condition`.\n\nThe branch nominated by `defaultBranch` is checked like any other. Its condition is not read while it is the fallthrough, but moving `defaultBranch` to a different branch later would put it back in charge of a route.","required":["type","description"],"properties":{"type":{"type":"string","enum":["intent"],"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0.type","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"The intent to match. Must be non-empty: it is the whole instruction the agent reads this route off, so a blank one is rejected with `422` (`CONDITIONAL_CONDITION_INVALID`) rather than stored as a route nothing selects. Whitespace does not count as content, which is what the pattern says and what the validator checks.","minLength":1,"pattern":"\\S","example":"wants to see a demo","isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0.description","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0","typeLabel":"object"},{"type":"object","description":"How the route is chosen.\n\nRequired on every branch, and it must match one of the two shapes below — it is what the agent routes on. A missing or non-object condition is rejected with `422` (`CONDITIONAL_CONDITION_MISSING`), a `type` that is neither `intent` nor `expression` with `CONDITIONAL_CONDITION_TYPE_UNKNOWN`, and a condition of a known type missing the fields that type needs with `CONDITIONAL_CONDITION_INVALID`. Each carries the `path` of the offending branch, e.g. `sections[0].branches[1].condition`.\n\nThe branch nominated by `defaultBranch` is checked like any other. Its condition is not read while it is the fallthrough, but moving `defaultBranch` to a different branch later would put it back in charge of a route.","required":["type","field","operator"],"properties":{"type":{"type":"string","enum":["expression"],"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.type","typeLabel":"enum\u003cstring>"},"field":{"type":"string","description":"Name of the extracted field to test. Must be non-empty, whitespace excluded (`CONDITIONAL_CONDITION_INVALID`).","minLength":1,"pattern":"\\S","example":"budget","isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.field","typeLabel":"string"},"operator":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","CONTAINS","EXISTS"],"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.operator","typeLabel":"enum\u003cstring>"},"value":{"description":"Value to compare against. Required for every operator except EXISTS, which ignores it — omitting it for any other operator is rejected with `422` (`CONDITIONAL_CONDITION_INVALID`), since there is then nothing to compare against. Use a number for GREATER_THAN and LESS_THAN, and a string for CONTAINS.","example":1000,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.value","typeLabel":"any"},"logicalOperator":{"type":"string","description":"Reserved. Nothing composes conditions yet — a branch takes exactly one — so this is accepted and ignored.","enum":["AND","OR"],"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.logicalOperator","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition","typeLabel":"object"},"blocks":{"type":"array","description":"The sections executed on this route. Conditionals may nest up to 3 levels deep.","maxItems":50,"items":{"$circularRef":"1c317405-133d-44b5-8795-2ec01022a596"},"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].blocks","typeLabel":"array"}},"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.branches","typeLabel":"object[]"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.label","typeLabel":"string"},"defaultBranch":{"type":"string","description":"Label of the branch to fall through to when no condition matches. Branch ids are assigned by InstaView, so the fallthrough route is addressed by label; a label that matches no branch is rejected with `400`. Returned on reads as well, so a flow read back can be sent again unchanged apart from the assigned ids.","example":"Not now","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2.defaultBranch","typeLabel":"string"}},"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","phoneNumber"],"properties":{"type":{"type":"string","enum":["human_handoff"],"isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"phoneNumber":{"type":"string","description":"Where to transfer the call, in E.164 format — a leading `+`, country code, no spaces or dashes. A number that is not E.164 is rejected with `422` (`HUMAN_HANDOFF_INVALID_NUMBER`) when the agent is created, not when the transfer is attempted.","example":"+421900123456","isRequired":true,"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.3.phoneNumber","typeLabel":"string"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder. Also names the destination for the agent, so a label saying who answers the number is worth setting.","example":"Sales","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.3.label","typeLabel":"string"},"message":{"type":"string","description":"The line the caller hears as the call is transferred to this number. Optional — omitted, InstaView supplies a neutral line in the call's language, which promises nothing about who answers because the block does not know. **Keep it true on every transfer to this number:** a caller who asks for a person before the flow reaches this step can be transferred here and hear it too, so describe the transfer, not what came before it. Anything true only at this point of the flow belongs in the step before the handoff, which the agent says in a turn of its own and then transfers once the caller has responded. Blocks that share a `phoneNumber` share one line, taken from the first block that names the number (top to bottom): a later block's `message` is never heard, and if the first block has none the neutral line is used. Supports `{{contact.*}}` and `{{system.*}}` variables; a line that resolves to nothing on a call (only variables, none with a value) falls back to the neutral line rather than a silent transfer. An empty string is rejected (`HUMAN_HANDOFF_MESSAGE_EMPTY`) rather than read as absent, so clearing the field cannot silently restore the default.","example":"I'll put you through to Martin on our sales team now, one moment.","uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.3.message","typeLabel":"string"}},"uniqueKey":"oneOf.0.flow.sections.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"oneOf.0.flow.sections.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.0.flow.sections","typeLabel":"object[]"},"lastMessage":{"type":"object","description":"What the agent says before hanging up.","required":["type","text"],"properties":{"type":{"type":"string","enum":["last_message"],"isRequired":true,"uniqueKey":"oneOf.0.flow.lastMessage.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The closing line.","example":"Thanks for your time — have a great day!","isRequired":true,"uniqueKey":"oneOf.0.flow.lastMessage.text","typeLabel":"string"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.0.flow.lastMessage.label","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.flow.lastMessage","typeLabel":"object"}},"uniqueKey":"oneOf.0.flow","typeLabel":"object"},"guardrails":{"type":"object","description":"Rules the agent must obey during the call. Accepted only alongside a `flow` — sending it for an agent that will not be custom is rejected.","required":["rules"],"properties":{"rules":{"type":"array","description":"Stated to the agent verbatim as instructions. Replaces the stored rules; an empty array removes them all.","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":500,"uniqueKey":"oneOf.0.guardrails.rules.items.[INDEX]","typeLabel":"string"},"example":["Never quote a price","Never promise a delivery date"],"isRequired":true,"uniqueKey":"oneOf.0.guardrails.rules","typeLabel":"string[]"}},"uniqueKey":"oneOf.0.guardrails","typeLabel":"object"},"contextConfig":{"type":"object","description":"Who the agent is and what the call is about. Accepted only alongside a `flow` — sending it for an agent that will not be custom is rejected.","properties":{"role":{"type":"string","description":"Who the agent should present itself as.","maxLength":500,"example":"an account executive for Acme","uniqueKey":"oneOf.0.contextConfig.role","typeLabel":"string"},"communicationStyle":{"type":"string","description":"How the agent speaks. The same list the visual builder offers, so an agent created over the API stays editable there.","enum":["professional","friendly","warm and empathetic","assertive","concise and direct","enthusiastic","casual"],"example":"concise and direct","uniqueKey":"oneOf.0.contextConfig.communicationStyle","typeLabel":"enum\u003cstring>"},"callToAction":{"type":"string","description":"What the call is trying to achieve.","maxLength":500,"example":"book a 30-minute demo","uniqueKey":"oneOf.0.contextConfig.callToAction","typeLabel":"string"},"useContactContext":{"type":"boolean","description":"Give the agent what is known about the person it is calling. A short platform-decided set of fields goes into its prompt; everything else the contact has a value for, plus their documents, becomes a knowledge base it can query mid-call. The agent may refer to any of it, must not volunteer where it came from, and is told not to read a document out word for word. Off unless set. Fields marked `isPii` are excluded from both halves unless `allowPiiInContext` is set on that field, or the field is one the platform lists in `inEssentialPromptSet` — see `GET /contact-fields`.","default":false,"example":true,"uniqueKey":"oneOf.0.contextConfig.useContactContext","typeLabel":"boolean"}},"uniqueKey":"oneOf.0.contextConfig","typeLabel":"object"},"analyticsConfig":{"type":"object","description":"What to extract, score, decide and label after every call. Accepted only alongside a `flow` — sending it for an agent that will not be custom is rejected. Per-question scoring is set inline on the flow's looping questions, not here.","properties":{"extractionTargets":{"type":"array","description":"The values to pull out of every call. A target with an `ideal` also counts toward the match score.","maxItems":50,"items":{"type":"object","description":"One value to pull out of every call.","required":["label","type"],"properties":{"label":{"type":"string","description":"What to extract, in your own words. Also the default source of `key`.","maxLength":200,"example":"Budget confirmed","isRequired":true,"uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX].label","typeLabel":"string"},"type":{"type":"string","description":"The value's type. The extracted value is coerced to it, or returned as `null`.","enum":["string","number","bool","enum"],"example":"bool","isRequired":true,"uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"budget_confirmed","uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX].key","typeLabel":"string"},"enumValues":{"type":"array","description":"The allowed values. Required when `type` is `enum`.","maxItems":50,"items":{"type":"string","uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX].enumValues.items.[INDEX]","typeLabel":"string"},"example":["hot","warm","cold"],"uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX].enumValues","typeLabel":"string[]"},"ideal":{"type":"string","description":"What a good value looks like. Its PRESENCE is what makes this field count toward the match score — a field with no `ideal` is extracted but not scored.","maxLength":500,"example":"A confirmed budget of at least 10k","uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX].ideal","typeLabel":"string"},"importance":{"type":"string","description":"How much a miss matters. `REQUIRED` gates the score; `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX].importance","typeLabel":"enum\u003cstring>"},"weight":{"type":"number","description":"Relative contribution to the match score. Weights are relative to each other, not a budget that must total 100.","minimum":0,"maximum":100,"example":40,"uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX].weight","typeLabel":"number"}},"uniqueKey":"oneOf.0.analyticsConfig.extractionTargets.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.analyticsConfig.extractionTargets","typeLabel":"object[]"},"scoringCriteria":{"type":"array","description":"Holistic judgements over the whole call that are not a single field or question, e.g. “handled objections”.","maxItems":25,"items":{"type":"object","description":"A holistic judgement over the whole call.","required":["label","description"],"properties":{"label":{"type":"string","description":"Name of the judgement.","maxLength":200,"example":"Handled objections","isRequired":true,"uniqueKey":"oneOf.0.analyticsConfig.scoringCriteria.items.[INDEX].label","typeLabel":"string"},"description":{"type":"string","description":"What a good call looks like for this criterion — what the score is judged against.","maxLength":1000,"example":"Acknowledged the objection and answered it with a concrete example","isRequired":true,"uniqueKey":"oneOf.0.analyticsConfig.scoringCriteria.items.[INDEX].description","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"handled_objections","uniqueKey":"oneOf.0.analyticsConfig.scoringCriteria.items.[INDEX].key","typeLabel":"string"},"importance":{"type":"string","description":"How much a miss matters. `REQUIRED` gates the score; `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"oneOf.0.analyticsConfig.scoringCriteria.items.[INDEX].importance","typeLabel":"enum\u003cstring>"},"weight":{"type":"number","description":"Relative contribution to the match score. Weights are relative to each other, not a budget that must total 100.","minimum":0,"maximum":100,"example":40,"uniqueKey":"oneOf.0.analyticsConfig.scoringCriteria.items.[INDEX].weight","typeLabel":"number"}},"uniqueKey":"oneOf.0.analyticsConfig.scoringCriteria.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.analyticsConfig.scoringCriteria","typeLabel":"object[]"},"outcomes":{"type":"array","description":"Did the call achieve what it was for? Each outcome is decided met / not met per call.","maxItems":25,"items":{"type":"object","description":"Something the call was for, decided met / not met afterwards.","required":["label","description"],"properties":{"label":{"type":"string","description":"Name of the outcome.","maxLength":200,"example":"Meeting booked","isRequired":true,"uniqueKey":"oneOf.0.analyticsConfig.outcomes.items.[INDEX].label","typeLabel":"string"},"description":{"type":"string","description":"When this counts as achieved, in plain language.","maxLength":1000,"example":"The contact agreed to a specific date and time","isRequired":true,"uniqueKey":"oneOf.0.analyticsConfig.outcomes.items.[INDEX].description","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"meeting_booked","uniqueKey":"oneOf.0.analyticsConfig.outcomes.items.[INDEX].key","typeLabel":"string"}},"uniqueKey":"oneOf.0.analyticsConfig.outcomes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.analyticsConfig.outcomes","typeLabel":"object[]"},"outputTags":{"type":"array","description":"Labels the AI may assign to a call.","maxItems":25,"items":{"type":"object","description":"A label the AI may assign to a call.","required":["label"],"properties":{"label":{"type":"string","description":"The tag itself.","maxLength":200,"example":"Needs follow-up","isRequired":true,"uniqueKey":"oneOf.0.analyticsConfig.outputTags.items.[INDEX].label","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"needs_followup","uniqueKey":"oneOf.0.analyticsConfig.outputTags.items.[INDEX].key","typeLabel":"string"},"description":{"type":"string","description":"When to apply it.","maxLength":1000,"example":"The contact asked to be called back","uniqueKey":"oneOf.0.analyticsConfig.outputTags.items.[INDEX].description","typeLabel":"string"}},"uniqueKey":"oneOf.0.analyticsConfig.outputTags.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.analyticsConfig.outputTags","typeLabel":"object[]"},"capture":{"type":"object","description":"Which qualitative artefacts to produce. Every flag defaults to `true`, so an omitted `capture` is not “capture nothing”.","properties":{"recording":{"type":"boolean","default":true,"description":"Keep the call recording.","uniqueKey":"oneOf.0.analyticsConfig.capture.recording","typeLabel":"boolean"},"transcript":{"type":"boolean","default":true,"description":"Keep the transcript.","uniqueKey":"oneOf.0.analyticsConfig.capture.transcript","typeLabel":"boolean"},"summary":{"type":"boolean","default":true,"description":"Produce a call summary.","uniqueKey":"oneOf.0.analyticsConfig.capture.summary","typeLabel":"boolean"},"qa":{"type":"boolean","default":true,"description":"Answer the flow's looping questions from the transcript.","uniqueKey":"oneOf.0.analyticsConfig.capture.qa","typeLabel":"boolean"},"evaluation":{"type":"boolean","default":true,"description":"Produce the strengths / concerns evaluation.","uniqueKey":"oneOf.0.analyticsConfig.capture.evaluation","typeLabel":"boolean"},"sentiment":{"type":"boolean","default":true,"description":"Produce a sentiment read.","uniqueKey":"oneOf.0.analyticsConfig.capture.sentiment","typeLabel":"boolean"}},"uniqueKey":"oneOf.0.analyticsConfig.capture","typeLabel":"object"}},"uniqueKey":"oneOf.0.analyticsConfig","typeLabel":"object"},"callConfig":{"type":"object","description":"How persistently and when the agent calls: how many attempts a contact who does not answer gets, and the days, local hours and timezone the agent may dial in. Accepted only alongside a `flow`. Omitted, a new agent calls Mon–Fri 09:00–18:00 in each contact's own timezone.","properties":{"retryPolicy":{"type":"object","description":"How many times a contact who does not answer is called. Replaced when sent, kept when omitted.","required":["maxAttempts"],"properties":{"maxAttempts":{"type":"number","description":"Attempts per contact, counting the first. Reschedules the contact asks for come out of this budget; a transient network failure that never reached them does not.","minimum":1,"maximum":5,"example":3,"isRequired":true,"uniqueKey":"oneOf.0.callConfig.retryPolicy.maxAttempts","typeLabel":"number"}},"uniqueKey":"oneOf.0.callConfig.retryPolicy","typeLabel":"object"},"callWindow":{"type":"object","description":"The days, local hours and timezone the agent may dial in. Replaced whole when sent, kept when omitted.","required":["days","start","end","timezoneAnchor"],"properties":{"days":{"type":"array","description":"Days the agent may call on.","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"],"uniqueKey":"oneOf.0.callConfig.callWindow.days.items.[INDEX]","typeLabel":"enum\u003cstring>"},"example":["mon","tue","wed","thu","fri"],"isRequired":true,"uniqueKey":"oneOf.0.callConfig.callWindow.days","typeLabel":"enum\u003cstring>[]"},"start":{"type":"string","description":"Earliest local time the agent may call, `\"HH:mm\"` on a 24-hour clock.","example":"09:00","isRequired":true,"uniqueKey":"oneOf.0.callConfig.callWindow.start","typeLabel":"string"},"end":{"type":"string","description":"Local time the window closes, `\"HH:mm\"` on a 24-hour clock, exclusive. Must be later in the day than `start`; a window that wraps past midnight is rejected rather than reinterpreted.","example":"18:00","isRequired":true,"uniqueKey":"oneOf.0.callConfig.callWindow.end","typeLabel":"string"},"timezoneAnchor":{"type":"object","description":"Whose clock `start` and `end` are on.","required":["mode"],"properties":{"mode":{"type":"string","enum":["contact","fixed"],"description":"`contact` detects the contact's timezone from their phone number, down to the area code: on one list a `+1 212` number is called at 09:00 in New York and a `+1 310` number at 09:00 in Los Angeles. Where a prefix covers more than one zone (an Australian `+61 8` number could be Adelaide or Perth) the window is narrowed to the part valid in every contact's zone, so nobody is called too early. `fixed` puts every contact on one named zone instead. Because every candidate zone has to allow the time, a narrow window over a wide prefix can have no valid moment at all (`09:00`–`10:00` is never true in both Adelaide and Perth at once); such a contact is called anyway rather than left uncalled, and the call is recorded as having gone out outside the window.","example":"contact","isRequired":true,"uniqueKey":"oneOf.0.callConfig.callWindow.timezoneAnchor.mode","typeLabel":"enum\u003cstring>"},"timezone":{"type":"string","description":"IANA timezone. Required when `mode` is `fixed`, ignored otherwise. Validated against the runtime's own timezone database, so a nonexistent zone is a `422` here rather than a schedule that never fires.","example":"Europe/Bratislava","uniqueKey":"oneOf.0.callConfig.callWindow.timezoneAnchor.timezone","typeLabel":"string"},"fallbackTimezone":{"type":"string","description":"IANA timezone used when `mode` is `contact` and the contact's number cannot be resolved to one. Defaults to `Europe/Bratislava`.","example":"Europe/Bratislava","uniqueKey":"oneOf.0.callConfig.callWindow.timezoneAnchor.fallbackTimezone","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.callConfig.callWindow.timezoneAnchor","typeLabel":"object"}},"uniqueKey":"oneOf.0.callConfig.callWindow","typeLabel":"object"}},"uniqueKey":"oneOf.0.callConfig","typeLabel":"object"},"overrides":{"type":"object","description":"Who this agent says it is on a call. By default it introduces itself as the company your API key belongs to; send this to have it speak for one of your own customers instead. Unlike `guardrails` and `contextConfig`, this is accepted with or without a `flow`.","properties":{"companyName":{"type":"string","description":"Company name the agent introduces itself with. Omit to use your own company's name.","minLength":1,"maxLength":100,"example":"Acme Manufacturing","uniqueKey":"oneOf.0.overrides.companyName","typeLabel":"string"},"companyDescription":{"type":"string","description":"Company description the agent may draw on. Falls back to your own company's description independently of `companyName`, so send it alongside a name override — otherwise the agent introduces itself as one company and describes another.","minLength":1,"maxLength":1000,"example":"Acme makes industrial fasteners and employs 400 people across Slovakia.","uniqueKey":"oneOf.0.overrides.companyDescription","typeLabel":"string"}},"uniqueKey":"oneOf.0.overrides","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["name","type","language","duration"],"properties":{"name":{"type":"string","description":"Agent name","example":"Senior Developer Phone Screen","minLength":2,"maxLength":100,"isRequired":true,"uniqueKey":"oneOf.1.name","typeLabel":"string"},"type":{"type":"string","description":"Type of the agent","enum":["UNDEFINED","ONLINE","PHONE"],"example":"ONLINE","isRequired":true,"uniqueKey":"oneOf.1.type","typeLabel":"enum\u003cstring>"},"language":{"type":"string","description":"Language of the conversation","enum":["UNDEFINED","EN","JA","ZH","DE","HI","FR","KO","PT","IT","ES","ID","NL","TR","FIL","PL","SV","BG","RO","AR","CS","EL","FI","HR","MS","SK","DA","TA","UK","RU","HU","NO","VI"],"example":"EN","isRequired":true,"uniqueKey":"oneOf.1.language","typeLabel":"enum\u003cstring>"},"duration":{"type":"number","description":"Duration of the conversation in minutes","example":30,"minimum":1,"maximum":180,"isRequired":true,"uniqueKey":"oneOf.1.duration","typeLabel":"number"},"composerSessionId":{"type":"string","format":"uuid","description":"Create this agent from a composer session (`POST /agents/composer`). Send it alone to build exactly what the preview showed, or alongside your own fields to override parts of it — anything you send wins. The session's conversation is attached to the new agent. While it is present, `name`, `type`, `language` and `duration` are optional: the session already has them.","example":"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90","uniqueKey":"oneOf.1.composerSessionId","typeLabel":"string\u003cuuid>"},"focus":{"type":"string","description":"Focus of the agent. GENERIC: job-optional, for a conversation that is not about a particular job. SCREENING: a hiring screen against a job's requirements. OUTREACH: a first call to gauge interest. LANGUAGE_TEST: language proficiency. Required unless a conversation `flow` is provided: an agent with a flow is a custom agent, whose focus is derived rather than selected. Sending both is rejected.","enum":["GENERIC","SCREENING","OUTREACH","LANGUAGE_TEST"],"example":"SCREENING","uniqueKey":"oneOf.1.focus","typeLabel":"enum\u003cstring>"},"questions":{"description":"List of questions for the conversation","example":["Tell me about a challenging project you worked on"],"type":"array","items":{"type":"string","uniqueKey":"oneOf.1.questions.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.1.questions","typeLabel":"string[]"},"instructions":{"type":"string","description":"Additional instructions for the conversation. Compiled into the agent's prompt as its own reference section, for a CUSTOM (flow) agent as well as a template one, so this is where reference material the agent must state accurately belongs: prices, stock, lead times, opening hours, policy.","example":"Focus on communication skills and team fit","uniqueKey":"oneOf.1.instructions","typeLabel":"string"},"voiceId":{"type":"string","description":"Voice ID the agent speaks with","enum":["ALEX","PETER","MIRIAM","SUE","VIERA","CASANDRA","SILVIA","MICHAEL","LUKE","EMMA","SARAH","EVA"],"uniqueKey":"oneOf.1.voiceId","typeLabel":"enum\u003cstring>"},"companyPhoneNumberId":{"type":"string","description":"ID of the company phone number assignment to use for calls from this agent (CompanyPhoneNumber.id)","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000","uniqueKey":"oneOf.1.companyPhoneNumberId","typeLabel":"string\u003cuuid>"},"metadata":{"type":"object","description":"Custom metadata for the agent (max 10KB, 5 levels deep, 50 keys)","example":{"department":"Sales","internalId":"AGENT-001"},"uniqueKey":"oneOf.1.metadata","typeLabel":"object"},"cefrLevel":{"type":"string","description":"CEFR level for language test agents","enum":["A1","A2","B1","B2","C1","C2"],"example":"B1","uniqueKey":"oneOf.1.cefrLevel","typeLabel":"enum\u003cstring>"},"backgroundSound":{"type":"string","description":"Ambient background sound during calls (`OFFICE` or `OFF`). Defaults to `OFFICE` when omitted.","enum":["OFF","OFFICE"],"example":"OFFICE","uniqueKey":"oneOf.1.backgroundSound","typeLabel":"enum\u003cstring>"},"flow":{"type":"object","description":"Conversation flow graph. Providing it makes this a custom agent, so `focus` must be omitted. `guardrails` and `contextConfig` are accepted only alongside a flow. Validated on write: an invalid flow is rejected with `422` rather than failing when a call is placed.","required":["firstMessage","sections","lastMessage"],"properties":{"firstMessage":{"type":"object","description":"What the agent says first. Supports `{{contact.*}}` variables, injected per call.","required":["type","text"],"properties":{"type":{"type":"string","enum":["first_message"],"isRequired":true,"uniqueKey":"oneOf.1.flow.firstMessage.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The opening line.","example":"Hi {{contact.firstName}}, do you have two minutes?","isRequired":true,"uniqueKey":"oneOf.1.flow.firstMessage.text","typeLabel":"string"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.1.flow.firstMessage.label","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.flow.firstMessage","typeLabel":"object"},"sections":{"type":"array","description":"The body of the conversation, worked through in order. At least one section is required.","minItems":1,"maxItems":100,"items":{"oneOf":[{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","prompt"],"properties":{"type":{"type":"string","enum":["sequential"],"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","description":"What the agent should cover here. Supports `{{contact.*}}` variables.","example":"Introduce yourself and explain why you are calling.","isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.0.prompt","typeLabel":"string"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.0.label","typeLabel":"string"}},"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","questions"],"properties":{"type":{"type":"string","enum":["looping"],"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"questions":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","required":["question"],"properties":{"question":{"type":"string","description":"The question to ask. Supports `{{contact.*}}` variables.","example":"What are you using today?","isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].question","typeLabel":"string"},"idealAnswer":{"type":"string","description":"What a good answer looks like, used when scoring the call. Optional, and it is the scoring switch: a question without one is still asked but never scored, which is how you write a question set that has no right answers (an internal survey, a satisfaction check).","example":"Names a competing tool","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].idealAnswer","typeLabel":"string"},"weight":{"type":"number","description":"Relative importance of this question when scoring. Setting it also opts the question into the match score (as `PREFERRED` unless `importance` says otherwise).","minimum":0,"example":40,"maximum":100,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].weight","typeLabel":"number"},"importance":{"type":"string","description":"Opts this question into the agent's match score. Set `importance` (or `weight`) to score it; a question with neither is asked but not scored. `REQUIRED` gates the score, `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].importance","typeLabel":"enum\u003cstring>"}},"description":"A question the agent asks, optionally with the answer it is measured against. `importance` and `weight` are how a question joins the match score — they live here rather than in `analyticsConfig` because a question is addressed by an id InstaView assigns, which a caller cannot know when writing the flow.","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1.questions.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1.questions","typeLabel":"object[]"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1.label","typeLabel":"string"}},"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","branches"],"properties":{"type":{"type":"string","enum":["conditional"],"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"branches":{"type":"array","description":"Between 2 and 5 routes, evaluated in order.","minItems":2,"maxItems":5,"items":{"type":"object","description":"One route out of a `conditional`. Every entry in `branches` must be an object; anything else (a `null` left by a client that built the array by index, say) is rejected with `422` (`CONDITIONAL_BRANCH_NOT_AN_OBJECT`).","required":["label","condition","blocks"],"properties":{"label":{"type":"string","description":"What this route is — unique within the block, and how `defaultBranch` addresses it.","example":"Interested","isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].label","typeLabel":"string"},"condition":{"oneOf":[{"type":"object","description":"How the route is chosen.\n\nRequired on every branch, and it must match one of the two shapes below — it is what the agent routes on. A missing or non-object condition is rejected with `422` (`CONDITIONAL_CONDITION_MISSING`), a `type` that is neither `intent` nor `expression` with `CONDITIONAL_CONDITION_TYPE_UNKNOWN`, and a condition of a known type missing the fields that type needs with `CONDITIONAL_CONDITION_INVALID`. Each carries the `path` of the offending branch, e.g. `sections[0].branches[1].condition`.\n\nThe branch nominated by `defaultBranch` is checked like any other. Its condition is not read while it is the fallthrough, but moving `defaultBranch` to a different branch later would put it back in charge of a route.","required":["type","description"],"properties":{"type":{"type":"string","enum":["intent"],"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0.type","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"The intent to match. Must be non-empty: it is the whole instruction the agent reads this route off, so a blank one is rejected with `422` (`CONDITIONAL_CONDITION_INVALID`) rather than stored as a route nothing selects. Whitespace does not count as content, which is what the pattern says and what the validator checks.","minLength":1,"pattern":"\\S","example":"wants to see a demo","isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0.description","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0","typeLabel":"object"},{"type":"object","description":"How the route is chosen.\n\nRequired on every branch, and it must match one of the two shapes below — it is what the agent routes on. A missing or non-object condition is rejected with `422` (`CONDITIONAL_CONDITION_MISSING`), a `type` that is neither `intent` nor `expression` with `CONDITIONAL_CONDITION_TYPE_UNKNOWN`, and a condition of a known type missing the fields that type needs with `CONDITIONAL_CONDITION_INVALID`. Each carries the `path` of the offending branch, e.g. `sections[0].branches[1].condition`.\n\nThe branch nominated by `defaultBranch` is checked like any other. Its condition is not read while it is the fallthrough, but moving `defaultBranch` to a different branch later would put it back in charge of a route.","required":["type","field","operator"],"properties":{"type":{"type":"string","enum":["expression"],"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.type","typeLabel":"enum\u003cstring>"},"field":{"type":"string","description":"Name of the extracted field to test. Must be non-empty, whitespace excluded (`CONDITIONAL_CONDITION_INVALID`).","minLength":1,"pattern":"\\S","example":"budget","isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.field","typeLabel":"string"},"operator":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","CONTAINS","EXISTS"],"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.operator","typeLabel":"enum\u003cstring>"},"value":{"description":"Value to compare against. Required for every operator except EXISTS, which ignores it — omitting it for any other operator is rejected with `422` (`CONDITIONAL_CONDITION_INVALID`), since there is then nothing to compare against. Use a number for GREATER_THAN and LESS_THAN, and a string for CONTAINS.","example":1000,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.value","typeLabel":"any"},"logicalOperator":{"type":"string","description":"Reserved. Nothing composes conditions yet — a branch takes exactly one — so this is accepted and ignored.","enum":["AND","OR"],"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.logicalOperator","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition","typeLabel":"object"},"blocks":{"type":"array","description":"The sections executed on this route. Conditionals may nest up to 3 levels deep.","maxItems":50,"items":{"$circularRef":"1c317405-133d-44b5-8795-2ec01022a596"},"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].blocks","typeLabel":"array"}},"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.branches","typeLabel":"object[]"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.label","typeLabel":"string"},"defaultBranch":{"type":"string","description":"Label of the branch to fall through to when no condition matches. Branch ids are assigned by InstaView, so the fallthrough route is addressed by label; a label that matches no branch is rejected with `400`. Returned on reads as well, so a flow read back can be sent again unchanged apart from the assigned ids.","example":"Not now","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2.defaultBranch","typeLabel":"string"}},"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","phoneNumber"],"properties":{"type":{"type":"string","enum":["human_handoff"],"isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"phoneNumber":{"type":"string","description":"Where to transfer the call, in E.164 format — a leading `+`, country code, no spaces or dashes. A number that is not E.164 is rejected with `422` (`HUMAN_HANDOFF_INVALID_NUMBER`) when the agent is created, not when the transfer is attempted.","example":"+421900123456","isRequired":true,"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.3.phoneNumber","typeLabel":"string"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder. Also names the destination for the agent, so a label saying who answers the number is worth setting.","example":"Sales","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.3.label","typeLabel":"string"},"message":{"type":"string","description":"The line the caller hears as the call is transferred to this number. Optional — omitted, InstaView supplies a neutral line in the call's language, which promises nothing about who answers because the block does not know. **Keep it true on every transfer to this number:** a caller who asks for a person before the flow reaches this step can be transferred here and hear it too, so describe the transfer, not what came before it. Anything true only at this point of the flow belongs in the step before the handoff, which the agent says in a turn of its own and then transfers once the caller has responded. Blocks that share a `phoneNumber` share one line, taken from the first block that names the number (top to bottom): a later block's `message` is never heard, and if the first block has none the neutral line is used. Supports `{{contact.*}}` and `{{system.*}}` variables; a line that resolves to nothing on a call (only variables, none with a value) falls back to the neutral line rather than a silent transfer. An empty string is rejected (`HUMAN_HANDOFF_MESSAGE_EMPTY`) rather than read as absent, so clearing the field cannot silently restore the default.","example":"I'll put you through to Martin on our sales team now, one moment.","uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.3.message","typeLabel":"string"}},"uniqueKey":"oneOf.1.flow.sections.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"oneOf.1.flow.sections.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.1.flow.sections","typeLabel":"object[]"},"lastMessage":{"type":"object","description":"What the agent says before hanging up.","required":["type","text"],"properties":{"type":{"type":"string","enum":["last_message"],"isRequired":true,"uniqueKey":"oneOf.1.flow.lastMessage.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The closing line.","example":"Thanks for your time — have a great day!","isRequired":true,"uniqueKey":"oneOf.1.flow.lastMessage.text","typeLabel":"string"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"oneOf.1.flow.lastMessage.label","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.flow.lastMessage","typeLabel":"object"}},"uniqueKey":"oneOf.1.flow","typeLabel":"object"},"guardrails":{"type":"object","description":"Rules the agent must obey during the call. Accepted only alongside a `flow` — sending it for an agent that will not be custom is rejected.","required":["rules"],"properties":{"rules":{"type":"array","description":"Stated to the agent verbatim as instructions. Replaces the stored rules; an empty array removes them all.","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":500,"uniqueKey":"oneOf.1.guardrails.rules.items.[INDEX]","typeLabel":"string"},"example":["Never quote a price","Never promise a delivery date"],"isRequired":true,"uniqueKey":"oneOf.1.guardrails.rules","typeLabel":"string[]"}},"uniqueKey":"oneOf.1.guardrails","typeLabel":"object"},"contextConfig":{"type":"object","description":"Who the agent is and what the call is about. Accepted only alongside a `flow` — sending it for an agent that will not be custom is rejected.","properties":{"role":{"type":"string","description":"Who the agent should present itself as.","maxLength":500,"example":"an account executive for Acme","uniqueKey":"oneOf.1.contextConfig.role","typeLabel":"string"},"communicationStyle":{"type":"string","description":"How the agent speaks. The same list the visual builder offers, so an agent created over the API stays editable there.","enum":["professional","friendly","warm and empathetic","assertive","concise and direct","enthusiastic","casual"],"example":"concise and direct","uniqueKey":"oneOf.1.contextConfig.communicationStyle","typeLabel":"enum\u003cstring>"},"callToAction":{"type":"string","description":"What the call is trying to achieve.","maxLength":500,"example":"book a 30-minute demo","uniqueKey":"oneOf.1.contextConfig.callToAction","typeLabel":"string"},"useContactContext":{"type":"boolean","description":"Give the agent what is known about the person it is calling. A short platform-decided set of fields goes into its prompt; everything else the contact has a value for, plus their documents, becomes a knowledge base it can query mid-call. The agent may refer to any of it, must not volunteer where it came from, and is told not to read a document out word for word. Off unless set. Fields marked `isPii` are excluded from both halves unless `allowPiiInContext` is set on that field, or the field is one the platform lists in `inEssentialPromptSet` — see `GET /contact-fields`.","default":false,"example":true,"uniqueKey":"oneOf.1.contextConfig.useContactContext","typeLabel":"boolean"}},"uniqueKey":"oneOf.1.contextConfig","typeLabel":"object"},"analyticsConfig":{"type":"object","description":"What to extract, score, decide and label after every call. Accepted only alongside a `flow` — sending it for an agent that will not be custom is rejected. Per-question scoring is set inline on the flow's looping questions, not here.","properties":{"extractionTargets":{"type":"array","description":"The values to pull out of every call. A target with an `ideal` also counts toward the match score.","maxItems":50,"items":{"type":"object","description":"One value to pull out of every call.","required":["label","type"],"properties":{"label":{"type":"string","description":"What to extract, in your own words. Also the default source of `key`.","maxLength":200,"example":"Budget confirmed","isRequired":true,"uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX].label","typeLabel":"string"},"type":{"type":"string","description":"The value's type. The extracted value is coerced to it, or returned as `null`.","enum":["string","number","bool","enum"],"example":"bool","isRequired":true,"uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"budget_confirmed","uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX].key","typeLabel":"string"},"enumValues":{"type":"array","description":"The allowed values. Required when `type` is `enum`.","maxItems":50,"items":{"type":"string","uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX].enumValues.items.[INDEX]","typeLabel":"string"},"example":["hot","warm","cold"],"uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX].enumValues","typeLabel":"string[]"},"ideal":{"type":"string","description":"What a good value looks like. Its PRESENCE is what makes this field count toward the match score — a field with no `ideal` is extracted but not scored.","maxLength":500,"example":"A confirmed budget of at least 10k","uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX].ideal","typeLabel":"string"},"importance":{"type":"string","description":"How much a miss matters. `REQUIRED` gates the score; `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX].importance","typeLabel":"enum\u003cstring>"},"weight":{"type":"number","description":"Relative contribution to the match score. Weights are relative to each other, not a budget that must total 100.","minimum":0,"maximum":100,"example":40,"uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX].weight","typeLabel":"number"}},"uniqueKey":"oneOf.1.analyticsConfig.extractionTargets.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.analyticsConfig.extractionTargets","typeLabel":"object[]"},"scoringCriteria":{"type":"array","description":"Holistic judgements over the whole call that are not a single field or question, e.g. “handled objections”.","maxItems":25,"items":{"type":"object","description":"A holistic judgement over the whole call.","required":["label","description"],"properties":{"label":{"type":"string","description":"Name of the judgement.","maxLength":200,"example":"Handled objections","isRequired":true,"uniqueKey":"oneOf.1.analyticsConfig.scoringCriteria.items.[INDEX].label","typeLabel":"string"},"description":{"type":"string","description":"What a good call looks like for this criterion — what the score is judged against.","maxLength":1000,"example":"Acknowledged the objection and answered it with a concrete example","isRequired":true,"uniqueKey":"oneOf.1.analyticsConfig.scoringCriteria.items.[INDEX].description","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"handled_objections","uniqueKey":"oneOf.1.analyticsConfig.scoringCriteria.items.[INDEX].key","typeLabel":"string"},"importance":{"type":"string","description":"How much a miss matters. `REQUIRED` gates the score; `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"oneOf.1.analyticsConfig.scoringCriteria.items.[INDEX].importance","typeLabel":"enum\u003cstring>"},"weight":{"type":"number","description":"Relative contribution to the match score. Weights are relative to each other, not a budget that must total 100.","minimum":0,"maximum":100,"example":40,"uniqueKey":"oneOf.1.analyticsConfig.scoringCriteria.items.[INDEX].weight","typeLabel":"number"}},"uniqueKey":"oneOf.1.analyticsConfig.scoringCriteria.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.analyticsConfig.scoringCriteria","typeLabel":"object[]"},"outcomes":{"type":"array","description":"Did the call achieve what it was for? Each outcome is decided met / not met per call.","maxItems":25,"items":{"type":"object","description":"Something the call was for, decided met / not met afterwards.","required":["label","description"],"properties":{"label":{"type":"string","description":"Name of the outcome.","maxLength":200,"example":"Meeting booked","isRequired":true,"uniqueKey":"oneOf.1.analyticsConfig.outcomes.items.[INDEX].label","typeLabel":"string"},"description":{"type":"string","description":"When this counts as achieved, in plain language.","maxLength":1000,"example":"The contact agreed to a specific date and time","isRequired":true,"uniqueKey":"oneOf.1.analyticsConfig.outcomes.items.[INDEX].description","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"meeting_booked","uniqueKey":"oneOf.1.analyticsConfig.outcomes.items.[INDEX].key","typeLabel":"string"}},"uniqueKey":"oneOf.1.analyticsConfig.outcomes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.analyticsConfig.outcomes","typeLabel":"object[]"},"outputTags":{"type":"array","description":"Labels the AI may assign to a call.","maxItems":25,"items":{"type":"object","description":"A label the AI may assign to a call.","required":["label"],"properties":{"label":{"type":"string","description":"The tag itself.","maxLength":200,"example":"Needs follow-up","isRequired":true,"uniqueKey":"oneOf.1.analyticsConfig.outputTags.items.[INDEX].label","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"needs_followup","uniqueKey":"oneOf.1.analyticsConfig.outputTags.items.[INDEX].key","typeLabel":"string"},"description":{"type":"string","description":"When to apply it.","maxLength":1000,"example":"The contact asked to be called back","uniqueKey":"oneOf.1.analyticsConfig.outputTags.items.[INDEX].description","typeLabel":"string"}},"uniqueKey":"oneOf.1.analyticsConfig.outputTags.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.analyticsConfig.outputTags","typeLabel":"object[]"},"capture":{"type":"object","description":"Which qualitative artefacts to produce. Every flag defaults to `true`, so an omitted `capture` is not “capture nothing”.","properties":{"recording":{"type":"boolean","default":true,"description":"Keep the call recording.","uniqueKey":"oneOf.1.analyticsConfig.capture.recording","typeLabel":"boolean"},"transcript":{"type":"boolean","default":true,"description":"Keep the transcript.","uniqueKey":"oneOf.1.analyticsConfig.capture.transcript","typeLabel":"boolean"},"summary":{"type":"boolean","default":true,"description":"Produce a call summary.","uniqueKey":"oneOf.1.analyticsConfig.capture.summary","typeLabel":"boolean"},"qa":{"type":"boolean","default":true,"description":"Answer the flow's looping questions from the transcript.","uniqueKey":"oneOf.1.analyticsConfig.capture.qa","typeLabel":"boolean"},"evaluation":{"type":"boolean","default":true,"description":"Produce the strengths / concerns evaluation.","uniqueKey":"oneOf.1.analyticsConfig.capture.evaluation","typeLabel":"boolean"},"sentiment":{"type":"boolean","default":true,"description":"Produce a sentiment read.","uniqueKey":"oneOf.1.analyticsConfig.capture.sentiment","typeLabel":"boolean"}},"uniqueKey":"oneOf.1.analyticsConfig.capture","typeLabel":"object"}},"uniqueKey":"oneOf.1.analyticsConfig","typeLabel":"object"},"callConfig":{"type":"object","description":"How persistently and when the agent calls: how many attempts a contact who does not answer gets, and the days, local hours and timezone the agent may dial in. Accepted only alongside a `flow`. Omitted, a new agent calls Mon–Fri 09:00–18:00 in each contact's own timezone.","properties":{"retryPolicy":{"type":"object","description":"How many times a contact who does not answer is called. Replaced when sent, kept when omitted.","required":["maxAttempts"],"properties":{"maxAttempts":{"type":"number","description":"Attempts per contact, counting the first. Reschedules the contact asks for come out of this budget; a transient network failure that never reached them does not.","minimum":1,"maximum":5,"example":3,"isRequired":true,"uniqueKey":"oneOf.1.callConfig.retryPolicy.maxAttempts","typeLabel":"number"}},"uniqueKey":"oneOf.1.callConfig.retryPolicy","typeLabel":"object"},"callWindow":{"type":"object","description":"The days, local hours and timezone the agent may dial in. Replaced whole when sent, kept when omitted.","required":["days","start","end","timezoneAnchor"],"properties":{"days":{"type":"array","description":"Days the agent may call on.","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"],"uniqueKey":"oneOf.1.callConfig.callWindow.days.items.[INDEX]","typeLabel":"enum\u003cstring>"},"example":["mon","tue","wed","thu","fri"],"isRequired":true,"uniqueKey":"oneOf.1.callConfig.callWindow.days","typeLabel":"enum\u003cstring>[]"},"start":{"type":"string","description":"Earliest local time the agent may call, `\"HH:mm\"` on a 24-hour clock.","example":"09:00","isRequired":true,"uniqueKey":"oneOf.1.callConfig.callWindow.start","typeLabel":"string"},"end":{"type":"string","description":"Local time the window closes, `\"HH:mm\"` on a 24-hour clock, exclusive. Must be later in the day than `start`; a window that wraps past midnight is rejected rather than reinterpreted.","example":"18:00","isRequired":true,"uniqueKey":"oneOf.1.callConfig.callWindow.end","typeLabel":"string"},"timezoneAnchor":{"type":"object","description":"Whose clock `start` and `end` are on.","required":["mode"],"properties":{"mode":{"type":"string","enum":["contact","fixed"],"description":"`contact` detects the contact's timezone from their phone number, down to the area code: on one list a `+1 212` number is called at 09:00 in New York and a `+1 310` number at 09:00 in Los Angeles. Where a prefix covers more than one zone (an Australian `+61 8` number could be Adelaide or Perth) the window is narrowed to the part valid in every contact's zone, so nobody is called too early. `fixed` puts every contact on one named zone instead. Because every candidate zone has to allow the time, a narrow window over a wide prefix can have no valid moment at all (`09:00`–`10:00` is never true in both Adelaide and Perth at once); such a contact is called anyway rather than left uncalled, and the call is recorded as having gone out outside the window.","example":"contact","isRequired":true,"uniqueKey":"oneOf.1.callConfig.callWindow.timezoneAnchor.mode","typeLabel":"enum\u003cstring>"},"timezone":{"type":"string","description":"IANA timezone. Required when `mode` is `fixed`, ignored otherwise. Validated against the runtime's own timezone database, so a nonexistent zone is a `422` here rather than a schedule that never fires.","example":"Europe/Bratislava","uniqueKey":"oneOf.1.callConfig.callWindow.timezoneAnchor.timezone","typeLabel":"string"},"fallbackTimezone":{"type":"string","description":"IANA timezone used when `mode` is `contact` and the contact's number cannot be resolved to one. Defaults to `Europe/Bratislava`.","example":"Europe/Bratislava","uniqueKey":"oneOf.1.callConfig.callWindow.timezoneAnchor.fallbackTimezone","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.callConfig.callWindow.timezoneAnchor","typeLabel":"object"}},"uniqueKey":"oneOf.1.callConfig.callWindow","typeLabel":"object"}},"uniqueKey":"oneOf.1.callConfig","typeLabel":"object"},"overrides":{"type":"object","description":"Who this agent says it is on a call. By default it introduces itself as the company your API key belongs to; send this to have it speak for one of your own customers instead. Unlike `guardrails` and `contextConfig`, this is accepted with or without a `flow`.","properties":{"companyName":{"type":"string","description":"Company name the agent introduces itself with. Omit to use your own company's name.","minLength":1,"maxLength":100,"example":"Acme Manufacturing","uniqueKey":"oneOf.1.overrides.companyName","typeLabel":"string"},"companyDescription":{"type":"string","description":"Company description the agent may draw on. Falls back to your own company's description independently of `companyName`, so send it alongside a name override — otherwise the agent introduces itself as one company and describes another.","minLength":1,"maxLength":1000,"example":"Acme makes industrial fasteners and employs 400 people across Slovakia.","uniqueKey":"oneOf.1.overrides.companyDescription","typeLabel":"string"}},"uniqueKey":"oneOf.1.overrides","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"composerSessionId":"9f8c1d2e-4b7a-4c3d-9e1f-2a5b6c7d8e90","name":"Senior Developer Phone Screen","type":"ONLINE","focus":"SCREENING","language":"EN","duration":30,"questions":["Tell me about a challenging project you worked on"],"instructions":"Focus on communication skills and team fit","companyPhoneNumberId":"123e4567-e89b-12d3-a456-426614174000","metadata":{"department":"Sales","internalId":"AGENT-001"},"cefrLevel":"B1","backgroundSound":"OFFICE","contextConfig":{"role":"an account executive for Acme","communicationStyle":"concise and direct","callToAction":"book a 30-minute demo","useContactContext":true},"analyticsConfig":{"extractionTargets":[{"label":"Budget confirmed","type":"bool","key":"budget_confirmed","enumValues":["hot","warm","cold"],"ideal":"A confirmed budget of at least 10k","importance":"PREFERRED","weight":40}],"scoringCriteria":[{"label":"Handled objections","description":"Acknowledged the objection and answered it with a concrete example","key":"handled_objections","importance":"PREFERRED","weight":40}],"outcomes":[{"label":"Meeting booked","description":"The contact agreed to a specific date and time","key":"meeting_booked"}],"outputTags":[{"label":"Needs follow-up","key":"needs_followup","description":"The contact asked to be called back"}],"capture":{"recording":true,"transcript":true,"summary":true,"qa":true,"evaluation":true,"sentiment":true}},"callConfig":{},"overrides":{"companyName":"Acme Manufacturing","companyDescription":"Acme makes industrial fasteners and employs 400 people across Slovakia."}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"529146aa-cf2f-47b4-bad0-79b43a822bb2":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Agent ID","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Agent name","example":"Frontend Developer Interview","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"type":{"type":"string","description":"Type of the agent","enum":["UNDEFINED","ONLINE","PHONE"],"example":"ONLINE","isRequired":true,"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"focus":{"type":"string","description":"Focus of the agent. GENERIC: job-optional, for a conversation that is not about a particular job. SCREENING: a hiring screen against a job's requirements. OUTREACH: a first call to gauge interest. LANGUAGE_TEST: language proficiency.","enum":["GENERIC","SCREENING","OUTREACH","LANGUAGE_TEST"],"example":"SCREENING","isRequired":true,"uniqueKey":"focus","typeLabel":"enum\u003cstring>"},"language":{"type":"string","description":"Language of the conversation","enum":["UNDEFINED","EN","JA","ZH","DE","HI","FR","KO","PT","IT","ES","ID","NL","TR","FIL","PL","SV","BG","RO","AR","CS","EL","FI","HR","MS","SK","DA","TA","UK","RU","HU","NO","VI"],"example":"EN","isRequired":true,"uniqueKey":"language","typeLabel":"enum\u003cstring>"},"duration":{"type":"number","description":"Duration of the conversation in minutes","example":30,"isRequired":true,"uniqueKey":"duration","typeLabel":"number"},"createdAt":{"type":"string","description":"Agent creation timestamp (UTC)","example":"2025-11-20T10:30:00Z","format":"date-time","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"updatedAt":{"type":"string","description":"Agent last update timestamp (UTC)","example":"2025-11-20T10:30:00Z","format":"date-time","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string\u003cdate-time>"},"questions":{"description":"List of questions for the conversation","example":["What is your experience with React?"],"type":"array","items":{"type":"string","uniqueKey":"questions.items.[INDEX]","typeLabel":"string"},"uniqueKey":"questions","typeLabel":"string[]"},"instructions":{"type":"string","description":"Additional instructions for the conversation. Compiled into the agent's prompt as its own reference section, for a CUSTOM (flow) agent as well as a template one, so this is where reference material the agent must state accurately belongs: prices, stock, lead times, opening hours, policy.","example":"Focus on technical skills and previous project experience","uniqueKey":"instructions","typeLabel":"string"},"voiceId":{"type":"string","description":"Voice ID the agent speaks with","enum":["ALEX","PETER","MIRIAM","SUE","VIERA","CASANDRA","SILVIA","MICHAEL","LUKE","EMMA","SARAH","EVA"],"uniqueKey":"voiceId","typeLabel":"enum\u003cstring>"},"companyId":{"type":"string","format":"uuid","description":"Company ID that owns the agent","example":"123e4567-e89b-12d3-a456-426614174000","uniqueKey":"companyId","typeLabel":"string\u003cuuid>"},"metadata":{"type":"object","description":"Custom metadata","example":{"department":"Sales"},"uniqueKey":"metadata","typeLabel":"object"},"cefrLevel":{"type":"string","description":"CEFR level for language test agents","enum":["A1","A2","B1","B2","C1","C2"],"example":"B1","uniqueKey":"cefrLevel","typeLabel":"enum\u003cstring>"},"backgroundSound":{"oneOf":[{"type":"string","description":"Ambient background sound during calls (`OFFICE` or `OFF`). Null means no override is set and the default applies.","enum":["OFF","OFFICE"],"example":"OFFICE","uniqueKey":"backgroundSound.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Ambient background sound during calls (`OFFICE` or `OFF`). Null means no override is set and the default applies.","enum":["OFF","OFFICE"],"example":"OFFICE","uniqueKey":"backgroundSound.oneOf.1","typeLabel":"null"}],"uniqueKey":"backgroundSound","typeLabel":"enum\u003cstring> | null"},"flow":{"oneOf":[{"type":"object","description":"Conversation flow graph, as designed. Null on a template agent.","required":["firstMessage","sections","lastMessage"],"properties":{"firstMessage":{"type":"object","description":"What the agent says first. Supports `{{contact.*}}` variables, injected per call.","required":["type","text"],"properties":{"type":{"type":"string","enum":["first_message"],"isRequired":true,"uniqueKey":"flow.oneOf.0.firstMessage.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The opening line.","example":"Hi {{contact.firstName}}, do you have two minutes?","isRequired":true,"uniqueKey":"flow.oneOf.0.firstMessage.text","typeLabel":"string"},"id":{"type":"string","format":"uuid","readOnly":true,"description":"Assigned by InstaView. Returned on reads; sending one anywhere in the flow is rejected with `400`.","uniqueKey":"flow.oneOf.0.firstMessage.id","typeLabel":"string\u003cuuid>"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"flow.oneOf.0.firstMessage.label","typeLabel":"string"}},"isRequired":true,"uniqueKey":"flow.oneOf.0.firstMessage","typeLabel":"object"},"sections":{"type":"array","description":"The body of the conversation, worked through in order. At least one section is required.","minItems":1,"maxItems":100,"items":{"oneOf":[{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","prompt"],"properties":{"type":{"type":"string","enum":["sequential"],"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","description":"What the agent should cover here. Supports `{{contact.*}}` variables.","example":"Introduce yourself and explain why you are calling.","isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.0.prompt","typeLabel":"string"},"id":{"type":"string","format":"uuid","readOnly":true,"description":"Assigned by InstaView. Returned on reads; sending one anywhere in the flow is rejected with `400`.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.0.id","typeLabel":"string\u003cuuid>"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.0.label","typeLabel":"string"}},"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","questions"],"properties":{"type":{"type":"string","enum":["looping"],"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"questions":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","required":["question"],"properties":{"question":{"type":"string","description":"The question to ask. Supports `{{contact.*}}` variables.","example":"What are you using today?","isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].question","typeLabel":"string"},"id":{"type":"string","format":"uuid","readOnly":true,"description":"Assigned by InstaView. Returned on reads; sending one anywhere in the flow is rejected with `400`.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"idealAnswer":{"type":"string","description":"What a good answer looks like, used when scoring the call. Optional, and it is the scoring switch: a question without one is still asked but never scored, which is how you write a question set that has no right answers (an internal survey, a satisfaction check).","example":"Names a competing tool","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].idealAnswer","typeLabel":"string"},"weight":{"type":"number","description":"Relative importance of this question when scoring. Setting it also opts the question into the match score (as `PREFERRED` unless `importance` says otherwise).","minimum":0,"example":40,"maximum":100,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].weight","typeLabel":"number"},"importance":{"type":"string","description":"Opts this question into the agent's match score. Set `importance` (or `weight`) to score it; a question with neither is asked but not scored. `REQUIRED` gates the score, `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.questions.items.[INDEX].importance","typeLabel":"enum\u003cstring>"}},"description":"A question the agent asks, optionally with the answer it is measured against. `importance` and `weight` are how a question joins the match score — they live here rather than in `analyticsConfig` because a question is addressed by an id InstaView assigns, which a caller cannot know when writing the flow.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.questions.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.questions","typeLabel":"object[]"},"id":{"type":"string","format":"uuid","readOnly":true,"description":"Assigned by InstaView. Returned on reads; sending one anywhere in the flow is rejected with `400`.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.id","typeLabel":"string\u003cuuid>"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1.label","typeLabel":"string"}},"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","branches"],"properties":{"type":{"type":"string","enum":["conditional"],"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"branches":{"type":"array","description":"Between 2 and 5 routes, evaluated in order.","minItems":2,"maxItems":5,"items":{"type":"object","description":"One route out of a `conditional`. Every entry in `branches` must be an object; anything else (a `null` left by a client that built the array by index, say) is rejected with `422` (`CONDITIONAL_BRANCH_NOT_AN_OBJECT`).","required":["label","condition","blocks"],"properties":{"label":{"type":"string","description":"What this route is — unique within the block, and how `defaultBranch` addresses it.","example":"Interested","isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].label","typeLabel":"string"},"condition":{"oneOf":[{"type":"object","description":"How the route is chosen.\n\nRequired on every branch, and it must match one of the two shapes below — it is what the agent routes on. A missing or non-object condition is rejected with `422` (`CONDITIONAL_CONDITION_MISSING`), a `type` that is neither `intent` nor `expression` with `CONDITIONAL_CONDITION_TYPE_UNKNOWN`, and a condition of a known type missing the fields that type needs with `CONDITIONAL_CONDITION_INVALID`. Each carries the `path` of the offending branch, e.g. `sections[0].branches[1].condition`.\n\nThe branch nominated by `defaultBranch` is checked like any other. Its condition is not read while it is the fallthrough, but moving `defaultBranch` to a different branch later would put it back in charge of a route.","required":["type","description"],"properties":{"type":{"type":"string","enum":["intent"],"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0.type","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"The intent to match. Must be non-empty: it is the whole instruction the agent reads this route off, so a blank one is rejected with `422` (`CONDITIONAL_CONDITION_INVALID`) rather than stored as a route nothing selects. Whitespace does not count as content, which is what the pattern says and what the validator checks.","minLength":1,"pattern":"\\S","example":"wants to see a demo","isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0.description","typeLabel":"string"}},"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.0","typeLabel":"object"},{"type":"object","description":"How the route is chosen.\n\nRequired on every branch, and it must match one of the two shapes below — it is what the agent routes on. A missing or non-object condition is rejected with `422` (`CONDITIONAL_CONDITION_MISSING`), a `type` that is neither `intent` nor `expression` with `CONDITIONAL_CONDITION_TYPE_UNKNOWN`, and a condition of a known type missing the fields that type needs with `CONDITIONAL_CONDITION_INVALID`. Each carries the `path` of the offending branch, e.g. `sections[0].branches[1].condition`.\n\nThe branch nominated by `defaultBranch` is checked like any other. Its condition is not read while it is the fallthrough, but moving `defaultBranch` to a different branch later would put it back in charge of a route.","required":["type","field","operator"],"properties":{"type":{"type":"string","enum":["expression"],"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.type","typeLabel":"enum\u003cstring>"},"field":{"type":"string","description":"Name of the extracted field to test. Must be non-empty, whitespace excluded (`CONDITIONAL_CONDITION_INVALID`).","minLength":1,"pattern":"\\S","example":"budget","isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.field","typeLabel":"string"},"operator":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","CONTAINS","EXISTS"],"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.operator","typeLabel":"enum\u003cstring>"},"value":{"description":"Value to compare against. Required for every operator except EXISTS, which ignores it — omitting it for any other operator is rejected with `422` (`CONDITIONAL_CONDITION_INVALID`), since there is then nothing to compare against. Use a number for GREATER_THAN and LESS_THAN, and a string for CONTAINS.","example":1000,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.value","typeLabel":"any"},"logicalOperator":{"type":"string","description":"Reserved. Nothing composes conditions yet — a branch takes exactly one — so this is accepted and ignored.","enum":["AND","OR"],"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1.logicalOperator","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].condition","typeLabel":"object"},"blocks":{"type":"array","description":"The sections executed on this route. Conditionals may nest up to 3 levels deep.","maxItems":50,"items":{"$circularRef":"1c317405-133d-44b5-8795-2ec01022a596"},"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].blocks","typeLabel":"array"},"id":{"type":"string","format":"uuid","readOnly":true,"description":"Assigned by InstaView. Returned on reads; sending one anywhere in the flow is rejected with `400`.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX].id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.branches","typeLabel":"object[]"},"id":{"type":"string","format":"uuid","readOnly":true,"description":"Assigned by InstaView. Returned on reads; sending one anywhere in the flow is rejected with `400`.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.id","typeLabel":"string\u003cuuid>"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.label","typeLabel":"string"},"defaultBranch":{"type":"string","description":"Label of the branch to fall through to when no condition matches. Branch ids are assigned by InstaView, so the fallthrough route is addressed by label; a label that matches no branch is rejected with `400`. Returned on reads as well, so a flow read back can be sent again unchanged apart from the assigned ids.","example":"Not now","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.defaultBranch","typeLabel":"string"},"defaultBranchId":{"type":"string","format":"uuid","readOnly":true,"description":"The resolved id of the fallthrough branch, assigned by InstaView. Read-only: strip it along with the other ids before re-sending a flow, and set `defaultBranch` to change the route.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2.defaultBranchId","typeLabel":"string\u003cuuid>"}},"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","phoneNumber"],"properties":{"type":{"type":"string","enum":["human_handoff"],"isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"phoneNumber":{"type":"string","description":"Where to transfer the call, in E.164 format — a leading `+`, country code, no spaces or dashes. A number that is not E.164 is rejected with `422` (`HUMAN_HANDOFF_INVALID_NUMBER`) when the agent is created, not when the transfer is attempted.","example":"+421900123456","isRequired":true,"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.3.phoneNumber","typeLabel":"string"},"id":{"type":"string","format":"uuid","readOnly":true,"description":"Assigned by InstaView. Returned on reads; sending one anywhere in the flow is rejected with `400`.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.3.id","typeLabel":"string\u003cuuid>"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder. Also names the destination for the agent, so a label saying who answers the number is worth setting.","example":"Sales","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.3.label","typeLabel":"string"},"message":{"type":"string","description":"The line the caller hears as the call is transferred to this number. Optional — omitted, InstaView supplies a neutral line in the call's language, which promises nothing about who answers because the block does not know. **Keep it true on every transfer to this number:** a caller who asks for a person before the flow reaches this step can be transferred here and hear it too, so describe the transfer, not what came before it. Anything true only at this point of the flow belongs in the step before the handoff, which the agent says in a turn of its own and then transfers once the caller has responded. Blocks that share a `phoneNumber` share one line, taken from the first block that names the number (top to bottom): a later block's `message` is never heard, and if the first block has none the neutral line is used. Supports `{{contact.*}}` and `{{system.*}}` variables; a line that resolves to nothing on a call (only variables, none with a value) falls back to the neutral line rather than a silent transfer. An empty string is rejected (`HUMAN_HANDOFF_MESSAGE_EMPTY`) rather than read as absent, so clearing the field cannot silently restore the default.","example":"I'll put you through to Martin on our sales team now, one moment.","uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.3.message","typeLabel":"string"}},"uniqueKey":"flow.oneOf.0.sections.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"flow.oneOf.0.sections.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flow.oneOf.0.sections","typeLabel":"object[]"},"lastMessage":{"type":"object","description":"What the agent says before hanging up.","required":["type","text"],"properties":{"type":{"type":"string","enum":["last_message"],"isRequired":true,"uniqueKey":"flow.oneOf.0.lastMessage.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The closing line.","example":"Thanks for your time — have a great day!","isRequired":true,"uniqueKey":"flow.oneOf.0.lastMessage.text","typeLabel":"string"},"id":{"type":"string","format":"uuid","readOnly":true,"description":"Assigned by InstaView. Returned on reads; sending one anywhere in the flow is rejected with `400`.","uniqueKey":"flow.oneOf.0.lastMessage.id","typeLabel":"string\u003cuuid>"},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget","uniqueKey":"flow.oneOf.0.lastMessage.label","typeLabel":"string"}},"isRequired":true,"uniqueKey":"flow.oneOf.0.lastMessage","typeLabel":"object"},"schemaVersion":{"type":"string","readOnly":true,"description":"The flow schema this document is expressed in. Assigned by InstaView — sending it is rejected with 400, so an integration written today keeps working when the schema moves.","example":"1.0.0","uniqueKey":"flow.oneOf.0.schemaVersion","typeLabel":"string"}},"uniqueKey":"flow.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"flow.oneOf.1","typeLabel":"null"}],"uniqueKey":"flow","typeLabel":"object | null"},"guardrails":{"oneOf":[{"type":"object","description":"Rules the agent must obey during the call. Custom agents only; null on a template agent.","required":["rules"],"properties":{"rules":{"type":"array","description":"Stated to the agent verbatim as instructions. Replaces the stored rules; an empty array removes them all.","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":500,"uniqueKey":"guardrails.oneOf.0.rules.items.[INDEX]","typeLabel":"string"},"example":["Never quote a price","Never promise a delivery date"],"isRequired":true,"uniqueKey":"guardrails.oneOf.0.rules","typeLabel":"string[]"}},"uniqueKey":"guardrails.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"guardrails.oneOf.1","typeLabel":"null"}],"uniqueKey":"guardrails","typeLabel":"object | null"},"contextConfig":{"oneOf":[{"type":"object","description":"Who the agent is and what the call is about. Custom agents only; null on a template agent.","properties":{"role":{"type":"string","description":"Who the agent should present itself as.","maxLength":500,"example":"an account executive for Acme","uniqueKey":"contextConfig.oneOf.0.role","typeLabel":"string"},"communicationStyle":{"type":"string","description":"How the agent speaks. The same list the visual builder offers, so an agent created over the API stays editable there.","enum":["professional","friendly","warm and empathetic","assertive","concise and direct","enthusiastic","casual"],"example":"concise and direct","uniqueKey":"contextConfig.oneOf.0.communicationStyle","typeLabel":"enum\u003cstring>"},"callToAction":{"type":"string","description":"What the call is trying to achieve.","maxLength":500,"example":"book a 30-minute demo","uniqueKey":"contextConfig.oneOf.0.callToAction","typeLabel":"string"},"useContactContext":{"type":"boolean","description":"Give the agent what is known about the person it is calling. A short platform-decided set of fields goes into its prompt; everything else the contact has a value for, plus their documents, becomes a knowledge base it can query mid-call. The agent may refer to any of it, must not volunteer where it came from, and is told not to read a document out word for word. Off unless set. Fields marked `isPii` are excluded from both halves unless `allowPiiInContext` is set on that field, or the field is one the platform lists in `inEssentialPromptSet` — see `GET /contact-fields`.","default":false,"example":true,"uniqueKey":"contextConfig.oneOf.0.useContactContext","typeLabel":"boolean"}},"uniqueKey":"contextConfig.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"contextConfig.oneOf.1","typeLabel":"null"}],"uniqueKey":"contextConfig","typeLabel":"object | null"},"analyticsConfig":{"oneOf":[{"type":"object","description":"What the agent extracts, scores, decides and labels after every call. Custom agents only — null on a template agent. Per-question scoring is folded back onto the flow's looping questions rather than returned as an id-keyed map — the same form the write accepts.","properties":{"extractionTargets":{"type":"array","description":"The values to pull out of every call. A target with an `ideal` also counts toward the match score.","maxItems":50,"items":{"type":"object","description":"One value to pull out of every call.","required":["label","type"],"properties":{"label":{"type":"string","description":"What to extract, in your own words. Also the default source of `key`.","maxLength":200,"example":"Budget confirmed","isRequired":true,"uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX].label","typeLabel":"string"},"type":{"type":"string","description":"The value's type. The extracted value is coerced to it, or returned as `null`.","enum":["string","number","bool","enum"],"example":"bool","isRequired":true,"uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"budget_confirmed","uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX].key","typeLabel":"string"},"enumValues":{"type":"array","description":"The allowed values. Required when `type` is `enum`.","maxItems":50,"items":{"type":"string","uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX].enumValues.items.[INDEX]","typeLabel":"string"},"example":["hot","warm","cold"],"uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX].enumValues","typeLabel":"string[]"},"ideal":{"type":"string","description":"What a good value looks like. Its PRESENCE is what makes this field count toward the match score — a field with no `ideal` is extracted but not scored.","maxLength":500,"example":"A confirmed budget of at least 10k","uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX].ideal","typeLabel":"string"},"importance":{"type":"string","description":"How much a miss matters. `REQUIRED` gates the score; `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX].importance","typeLabel":"enum\u003cstring>"},"weight":{"type":"number","description":"Relative contribution to the match score. Weights are relative to each other, not a budget that must total 100.","minimum":0,"maximum":100,"example":40,"uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX].weight","typeLabel":"number"}},"uniqueKey":"analyticsConfig.oneOf.0.extractionTargets.items.[INDEX]","typeLabel":"object"},"uniqueKey":"analyticsConfig.oneOf.0.extractionTargets","typeLabel":"object[]"},"scoringCriteria":{"type":"array","description":"Holistic judgements over the whole call that are not a single field or question, e.g. “handled objections”.","maxItems":25,"items":{"type":"object","description":"A holistic judgement over the whole call.","required":["label","description"],"properties":{"label":{"type":"string","description":"Name of the judgement.","maxLength":200,"example":"Handled objections","isRequired":true,"uniqueKey":"analyticsConfig.oneOf.0.scoringCriteria.items.[INDEX].label","typeLabel":"string"},"description":{"type":"string","description":"What a good call looks like for this criterion — what the score is judged against.","maxLength":1000,"example":"Acknowledged the objection and answered it with a concrete example","isRequired":true,"uniqueKey":"analyticsConfig.oneOf.0.scoringCriteria.items.[INDEX].description","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"handled_objections","uniqueKey":"analyticsConfig.oneOf.0.scoringCriteria.items.[INDEX].key","typeLabel":"string"},"importance":{"type":"string","description":"How much a miss matters. `REQUIRED` gates the score; `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED","uniqueKey":"analyticsConfig.oneOf.0.scoringCriteria.items.[INDEX].importance","typeLabel":"enum\u003cstring>"},"weight":{"type":"number","description":"Relative contribution to the match score. Weights are relative to each other, not a budget that must total 100.","minimum":0,"maximum":100,"example":40,"uniqueKey":"analyticsConfig.oneOf.0.scoringCriteria.items.[INDEX].weight","typeLabel":"number"}},"uniqueKey":"analyticsConfig.oneOf.0.scoringCriteria.items.[INDEX]","typeLabel":"object"},"uniqueKey":"analyticsConfig.oneOf.0.scoringCriteria","typeLabel":"object[]"},"outcomes":{"type":"array","description":"Did the call achieve what it was for? Each outcome is decided met / not met per call.","maxItems":25,"items":{"type":"object","description":"Something the call was for, decided met / not met afterwards.","required":["label","description"],"properties":{"label":{"type":"string","description":"Name of the outcome.","maxLength":200,"example":"Meeting booked","isRequired":true,"uniqueKey":"analyticsConfig.oneOf.0.outcomes.items.[INDEX].label","typeLabel":"string"},"description":{"type":"string","description":"When this counts as achieved, in plain language.","maxLength":1000,"example":"The contact agreed to a specific date and time","isRequired":true,"uniqueKey":"analyticsConfig.oneOf.0.outcomes.items.[INDEX].description","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"meeting_booked","uniqueKey":"analyticsConfig.oneOf.0.outcomes.items.[INDEX].key","typeLabel":"string"}},"uniqueKey":"analyticsConfig.oneOf.0.outcomes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"analyticsConfig.oneOf.0.outcomes","typeLabel":"object[]"},"outputTags":{"type":"array","description":"Labels the AI may assign to a call.","maxItems":25,"items":{"type":"object","description":"A label the AI may assign to a call.","required":["label"],"properties":{"label":{"type":"string","description":"The tag itself.","maxLength":200,"example":"Needs follow-up","isRequired":true,"uniqueKey":"analyticsConfig.oneOf.0.outputTags.items.[INDEX].label","typeLabel":"string"},"key":{"type":"string","description":"Stable name this item's results come back under. Optional — omit it and InstaView derives a slug of `label` (`Budget confirmed` → `budget_confirmed`). Set it when your integration reads the results by name: a key you choose survives a later `label` change, a derived one does not. If two derived keys collide, the later one gets a numeric suffix (`budget`, `budget_2`). Must be unique within its list — a duplicate you sent is rejected with `400`, never renamed. Reserved names (`__proto__`, `constructor`, `prototype`) are rejected. Editing the agent in the visual builder re-derives the key from the label.","maxLength":64,"pattern":"^[A-Za-z0-9_]{1,64}$","example":"needs_followup","uniqueKey":"analyticsConfig.oneOf.0.outputTags.items.[INDEX].key","typeLabel":"string"},"description":{"type":"string","description":"When to apply it.","maxLength":1000,"example":"The contact asked to be called back","uniqueKey":"analyticsConfig.oneOf.0.outputTags.items.[INDEX].description","typeLabel":"string"}},"uniqueKey":"analyticsConfig.oneOf.0.outputTags.items.[INDEX]","typeLabel":"object"},"uniqueKey":"analyticsConfig.oneOf.0.outputTags","typeLabel":"object[]"},"capture":{"type":"object","description":"Which qualitative artefacts to produce. Every flag defaults to `true`, so an omitted `capture` is not “capture nothing”.","properties":{"recording":{"type":"boolean","default":true,"description":"Keep the call recording.","uniqueKey":"analyticsConfig.oneOf.0.capture.recording","typeLabel":"boolean"},"transcript":{"type":"boolean","default":true,"description":"Keep the transcript.","uniqueKey":"analyticsConfig.oneOf.0.capture.transcript","typeLabel":"boolean"},"summary":{"type":"boolean","default":true,"description":"Produce a call summary.","uniqueKey":"analyticsConfig.oneOf.0.capture.summary","typeLabel":"boolean"},"qa":{"type":"boolean","default":true,"description":"Answer the flow's looping questions from the transcript.","uniqueKey":"analyticsConfig.oneOf.0.capture.qa","typeLabel":"boolean"},"evaluation":{"type":"boolean","default":true,"description":"Produce the strengths / concerns evaluation.","uniqueKey":"analyticsConfig.oneOf.0.capture.evaluation","typeLabel":"boolean"},"sentiment":{"type":"boolean","default":true,"description":"Produce a sentiment read.","uniqueKey":"analyticsConfig.oneOf.0.capture.sentiment","typeLabel":"boolean"}},"uniqueKey":"analyticsConfig.oneOf.0.capture","typeLabel":"object"}},"uniqueKey":"analyticsConfig.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"analyticsConfig.oneOf.1","typeLabel":"null"}],"uniqueKey":"analyticsConfig","typeLabel":"object | null"},"callConfig":{"type":"object","description":"How persistently and when the agent calls. Custom agents only. An agent created before calling windows were configurable reports a `callWindow.mode` of `business_hours`.","required":["retryPolicy","callWindow"],"properties":{"retryPolicy":{"type":"object","description":"How persistently an unanswered contact is called.","required":["maxAttempts"],"properties":{"maxAttempts":{"type":"number","description":"Attempts per contact, counting the first. Reschedules the contact asks for come out of this budget; a transient network failure that never reached them does not.","minimum":1,"maximum":5,"example":3,"isRequired":true,"uniqueKey":"callConfig.retryPolicy.maxAttempts","typeLabel":"number"}},"isRequired":true,"uniqueKey":"callConfig.retryPolicy","typeLabel":"object"},"callWindow":{"type":"object","description":"The calling window as read back. Carries `mode`, which the write form does not, because agents created before calling windows were configurable have to be describable.","required":["mode"],"properties":{"mode":{"type":"string","enum":["custom","business_hours"],"description":"`custom` is a configured window, described by the fields below. `business_hours` is a legacy preset — Mon–Fri 08:00–20:00 in the contact's own timezone — carried by agents created before calling windows were configurable. It cannot be set, and such an agent reports no other window fields.","example":"custom","isRequired":true,"uniqueKey":"callConfig.callWindow.mode","typeLabel":"enum\u003cstring>"},"days":{"type":"array","description":"Days the agent may call on. Absent on `business_hours`.","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"],"uniqueKey":"callConfig.callWindow.days.items.[INDEX]","typeLabel":"enum\u003cstring>"},"example":["mon","tue","wed","thu","fri"],"uniqueKey":"callConfig.callWindow.days","typeLabel":"enum\u003cstring>[]"},"start":{"type":"string","description":"Earliest local time, `\"HH:mm\"`. Absent on `business_hours`.","example":"09:00","uniqueKey":"callConfig.callWindow.start","typeLabel":"string"},"end":{"type":"string","description":"Local closing time, `\"HH:mm\"`, exclusive. Absent on `business_hours`.","example":"18:00","uniqueKey":"callConfig.callWindow.end","typeLabel":"string"},"timezoneAnchor":{"type":"object","description":"Whose clock the hours are on. Absent on `business_hours`.","required":["mode"],"properties":{"mode":{"type":"string","enum":["contact","fixed"],"description":"`contact` detects the contact's timezone from their phone number, down to the area code: on one list a `+1 212` number is called at 09:00 in New York and a `+1 310` number at 09:00 in Los Angeles. Where a prefix covers more than one zone (an Australian `+61 8` number could be Adelaide or Perth) the window is narrowed to the part valid in every contact's zone, so nobody is called too early. `fixed` puts every contact on one named zone instead. Because every candidate zone has to allow the time, a narrow window over a wide prefix can have no valid moment at all (`09:00`–`10:00` is never true in both Adelaide and Perth at once); such a contact is called anyway rather than left uncalled, and the call is recorded as having gone out outside the window.","example":"contact","isRequired":true,"uniqueKey":"callConfig.callWindow.timezoneAnchor.mode","typeLabel":"enum\u003cstring>"},"timezone":{"type":"string","description":"IANA timezone. Required when `mode` is `fixed`, ignored otherwise. Validated against the runtime's own timezone database, so a nonexistent zone is a `422` here rather than a schedule that never fires.","example":"Europe/Bratislava","uniqueKey":"callConfig.callWindow.timezoneAnchor.timezone","typeLabel":"string"},"fallbackTimezone":{"type":"string","description":"IANA timezone used when `mode` is `contact` and the contact's number cannot be resolved to one. Defaults to `Europe/Bratislava`.","example":"Europe/Bratislava","uniqueKey":"callConfig.callWindow.timezoneAnchor.fallbackTimezone","typeLabel":"string"}},"uniqueKey":"callConfig.callWindow.timezoneAnchor","typeLabel":"object"}},"isRequired":true,"uniqueKey":"callConfig.callWindow","typeLabel":"object"}},"uniqueKey":"callConfig","typeLabel":"object"},"overrides":{"oneOf":[{"type":"object","description":"Who this agent says it is on a call, when that is not the company your API key belongs to. Null when it speaks as your own company.","properties":{"companyName":{"type":"string","description":"Company name the agent introduces itself with. Omit to use your own company's name.","minLength":1,"maxLength":100,"example":"Acme Manufacturing","uniqueKey":"overrides.oneOf.0.companyName","typeLabel":"string"},"companyDescription":{"type":"string","description":"Company description the agent may draw on. Falls back to your own company's description independently of `companyName`, so send it alongside a name override — otherwise the agent introduces itself as one company and describes another.","minLength":1,"maxLength":1000,"example":"Acme makes industrial fasteners and employs 400 people across Slovakia.","uniqueKey":"overrides.oneOf.0.companyDescription","typeLabel":"string"}},"uniqueKey":"overrides.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"overrides.oneOf.1","typeLabel":"null"}],"uniqueKey":"overrides","typeLabel":"object | null"}},"required":["id","name","type","focus","language","duration","createdAt","updatedAt"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"123e4567-e89b-12d3-a456-426614174000","name":"Frontend Developer Interview","type":"ONLINE","focus":"SCREENING","language":"EN","duration":30,"createdAt":"2025-11-20T10:30:00Z","updatedAt":"2025-11-20T10:30:00Z","questions":["What is your experience with React?"],"instructions":"Focus on technical skills and previous project experience","voiceId":"ALEX","companyId":"123e4567-e89b-12d3-a456-426614174000","metadata":{"department":"Sales"},"cefrLevel":"B1","backgroundSound":"OFFICE","flow":{"firstMessage":{"type":"first_message","text":"Hi {{contact.firstName}}, do you have two minutes?","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","label":"Qualify budget"},"sections":[{"type":"sequential","prompt":"Introduce yourself and explain why you are calling.","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","label":"Qualify budget"}],"lastMessage":{"type":"last_message","text":"Thanks for your time — have a great day!","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","label":"Qualify budget"},"schemaVersion":"1.0.0"},"guardrails":{"rules":["Never quote a price","Never promise a delivery date"]},"contextConfig":{"role":"an account executive for Acme","communicationStyle":"concise and direct","callToAction":"book a 30-minute demo","useContactContext":true},"analyticsConfig":{"extractionTargets":[{"label":"Budget confirmed","type":"bool","key":"budget_confirmed","enumValues":["hot","warm","cold"],"ideal":"A confirmed budget of at least 10k","importance":"PREFERRED","weight":40}],"scoringCriteria":[{"label":"Handled objections","description":"Acknowledged the objection and answered it with a concrete example","key":"handled_objections","importance":"PREFERRED","weight":40}],"outcomes":[{"label":"Meeting booked","description":"The contact agreed to a specific date and time","key":"meeting_booked"}],"outputTags":[{"label":"Needs follow-up","key":"needs_followup","description":"The contact asked to be called back"}],"capture":{"recording":true,"transcript":true,"summary":true,"qa":true,"evaluation":true,"sentiment":true}},"callConfig":{"retryPolicy":{"maxAttempts":3},"callWindow":{"mode":"custom","days":["mon","tue","wed","thu","fri"],"start":"09:00","end":"18:00","timezoneAnchor":{"mode":"contact","timezone":"Europe/Bratislava","fallbackTimezone":"Europe/Bratislava"}}},"overrides":{"companyName":"Acme Manufacturing","companyDescription":"Acme makes industrial fasteners and employs 400 people across Slovakia."}}}},"exampleType":"generated"}},"exampleType":"generated"},"83d54df8-3014-4ff7-81fc-4d001965082b":{"description":"The conversation flow is structurally invalid. `errors` lists every problem found, each with the path of the block it is on. Other 422s on this route (an unavailable block type, a phone number that is not yours) carry a message but no `errors`.","content":{"application/json":{"schema":{"type":"object","description":"A 422 from a route that accepts a conversation flow. `errors` is present when the flow itself failed structural validation, and lists EVERY problem found — fixing a flow should not take one request per fault. It is absent on the other 422s these routes can return, which carry a `message` only.","properties":{"statusCode":{"type":"integer","example":422,"isRequired":true,"uniqueKey":"statusCode","typeLabel":"integer"},"message":{"type":"string","example":"Invalid conversation flow.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"errors":{"type":"array","description":"Every problem found in the flow, one entry per problem.","items":{"type":"object","description":"One problem found in a submitted conversation flow.","properties":{"code":{"type":"string","description":"Machine-readable code identifying what is wrong. Match on the codes you handle and fall back on `message` for the rest — the set grows as the flow schema does, and a code is added without a major version.","example":"UNKNOWN_BLOCK_TYPE","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation of this single problem.","example":"Unknown block type: teleport.","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"path":{"type":"string","description":"Path to the offending node in the flow document you sent. This is what to show a user, and what to anchor an editor to.","example":"sections[2].branches[0].blocks[1]","uniqueKey":"errors.items.[INDEX].path","typeLabel":"string"}},"required":["code","message"],"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"traceId":{"type":"string","description":"Trace identifier for this request. Quote it when contacting support.","example":"6a707aee000000000c1e285eefed9980","uniqueKey":"traceId","typeLabel":"string"}},"required":["statusCode","message"],"uniqueKey":"","typeLabel":"object"},"examples":{"invalidFlow":{"title":"invalidFlow","value":{"statusCode":422,"message":"Invalid conversation flow.","errors":[{"code":"UNKNOWN_BLOCK_TYPE","message":"Unknown block type: teleport.","path":"sections[2].branches[0].blocks[1]"},{"code":"SEQUENTIAL_PROMPT_EMPTY","message":"Sequential block prompt must not be empty.","path":"sections[0]"}],"traceId":"6a707aee000000000c1e285eefed9980"}},"flowLimitExceeded":{"title":"flowLimitExceeded","value":{"statusCode":422,"message":"Branch blocks at sections[2].branches[0] exceeds the maximum of 50 (received 51).","traceId":"6a707aee000000000c1e285eefed9980"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"81180ae0-09bf-4cd7-b044-f69dbf101d84":{"bearer":{"type":"http","scheme":"bearer","description":"API key for authentication using Bearer scheme","scopes":[],"schemeName":"bearer"}}},"servers":{"fefe9da2-a252-4644-8424-0eaff357a7a8":{"url":"https://api.instaview.sk","description":"Production API Gateway"}},"schemas":{"1c317405-133d-44b5-8795-2ec01022a596":{"oneOf":[{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","prompt"],"properties":{"type":{"type":"string","enum":["sequential"],"isRequired":true},"prompt":{"type":"string","description":"What the agent should cover here. Supports `{{contact.*}}` variables.","example":"Introduce yourself and explain why you are calling.","isRequired":true},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget"}}},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","questions"],"properties":{"type":{"type":"string","enum":["looping"],"isRequired":true},"questions":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","required":["question"],"properties":{"question":{"type":"string","description":"The question to ask. Supports `{{contact.*}}` variables.","example":"What are you using today?","isRequired":true},"idealAnswer":{"type":"string","description":"What a good answer looks like, used when scoring the call. Optional, and it is the scoring switch: a question without one is still asked but never scored, which is how you write a question set that has no right answers (an internal survey, a satisfaction check).","example":"Names a competing tool"},"weight":{"type":"number","description":"Relative importance of this question when scoring. Setting it also opts the question into the match score (as `PREFERRED` unless `importance` says otherwise).","minimum":0,"example":40,"maximum":100},"importance":{"type":"string","description":"Opts this question into the agent's match score. Set `importance` (or `weight`) to score it; a question with neither is asked but not scored. `REQUIRED` gates the score, `PREFERRED` contributes by weight.","enum":["REQUIRED","PREFERRED"],"example":"PREFERRED"}},"description":"A question the agent asks, optionally with the answer it is measured against. `importance` and `weight` are how a question joins the match score — they live here rather than in `analyticsConfig` because a question is addressed by an id InstaView assigns, which a caller cannot know when writing the flow."},"isRequired":true},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget"}}},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","branches"],"properties":{"type":{"type":"string","enum":["conditional"],"isRequired":true},"branches":{"type":"array","description":"Between 2 and 5 routes, evaluated in order.","minItems":2,"maxItems":5,"items":{"type":"object","description":"One route out of a `conditional`. Every entry in `branches` must be an object; anything else (a `null` left by a client that built the array by index, say) is rejected with `422` (`CONDITIONAL_BRANCH_NOT_AN_OBJECT`).","required":["label","condition","blocks"],"properties":{"label":{"type":"string","description":"What this route is — unique within the block, and how `defaultBranch` addresses it.","example":"Interested","isRequired":true},"condition":{"oneOf":[{"type":"object","description":"How the route is chosen.\n\nRequired on every branch, and it must match one of the two shapes below — it is what the agent routes on. A missing or non-object condition is rejected with `422` (`CONDITIONAL_CONDITION_MISSING`), a `type` that is neither `intent` nor `expression` with `CONDITIONAL_CONDITION_TYPE_UNKNOWN`, and a condition of a known type missing the fields that type needs with `CONDITIONAL_CONDITION_INVALID`. Each carries the `path` of the offending branch, e.g. `sections[0].branches[1].condition`.\n\nThe branch nominated by `defaultBranch` is checked like any other. Its condition is not read while it is the fallthrough, but moving `defaultBranch` to a different branch later would put it back in charge of a route.","required":["type","description"],"properties":{"type":{"type":"string","enum":["intent"],"isRequired":true},"description":{"type":"string","description":"The intent to match. Must be non-empty: it is the whole instruction the agent reads this route off, so a blank one is rejected with `422` (`CONDITIONAL_CONDITION_INVALID`) rather than stored as a route nothing selects. Whitespace does not count as content, which is what the pattern says and what the validator checks.","minLength":1,"pattern":"\\S","example":"wants to see a demo","isRequired":true}},"isRequired":true},{"type":"object","description":"How the route is chosen.\n\nRequired on every branch, and it must match one of the two shapes below — it is what the agent routes on. A missing or non-object condition is rejected with `422` (`CONDITIONAL_CONDITION_MISSING`), a `type` that is neither `intent` nor `expression` with `CONDITIONAL_CONDITION_TYPE_UNKNOWN`, and a condition of a known type missing the fields that type needs with `CONDITIONAL_CONDITION_INVALID`. Each carries the `path` of the offending branch, e.g. `sections[0].branches[1].condition`.\n\nThe branch nominated by `defaultBranch` is checked like any other. Its condition is not read while it is the fallthrough, but moving `defaultBranch` to a different branch later would put it back in charge of a route.","required":["type","field","operator"],"properties":{"type":{"type":"string","enum":["expression"],"isRequired":true},"field":{"type":"string","description":"Name of the extracted field to test. Must be non-empty, whitespace excluded (`CONDITIONAL_CONDITION_INVALID`).","minLength":1,"pattern":"\\S","example":"budget","isRequired":true},"operator":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","CONTAINS","EXISTS"],"isRequired":true},"value":{"description":"Value to compare against. Required for every operator except EXISTS, which ignores it — omitting it for any other operator is rejected with `422` (`CONDITIONAL_CONDITION_INVALID`), since there is then nothing to compare against. Use a number for GREATER_THAN and LESS_THAN, and a string for CONTAINS.","example":1000},"logicalOperator":{"type":"string","description":"Reserved. Nothing composes conditions yet — a branch takes exactly one — so this is accepted and ignored.","enum":["AND","OR"]}},"isRequired":true}],"isRequired":true},"blocks":{"type":"array","description":"The sections executed on this route. Conditionals may nest up to 3 levels deep.","maxItems":50,"items":{"$circularRef":"1c317405-133d-44b5-8795-2ec01022a596"},"isRequired":true}}},"isRequired":true},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder.","example":"Qualify budget"},"defaultBranch":{"type":"string","description":"Label of the branch to fall through to when no condition matches. Branch ids are assigned by InstaView, so the fallthrough route is addressed by label; a label that matches no branch is rejected with `400`. Returned on reads as well, so a flow read back can be sent again unchanged apart from the assigned ids.","example":"Not now"}}},{"type":"object","description":"One section of the conversation. `type` selects the shape.","required":["type","phoneNumber"],"properties":{"type":{"type":"string","enum":["human_handoff"],"isRequired":true},"phoneNumber":{"type":"string","description":"Where to transfer the call, in E.164 format — a leading `+`, country code, no spaces or dashes. A number that is not E.164 is rejected with `422` (`HUMAN_HANDOFF_INVALID_NUMBER`) when the agent is created, not when the transfer is attempted.","example":"+421900123456","isRequired":true},"label":{"type":"string","description":"Optional name for this block, shown in the visual builder. Also names the destination for the agent, so a label saying who answers the number is worth setting.","example":"Sales"},"message":{"type":"string","description":"The line the caller hears as the call is transferred to this number. Optional — omitted, InstaView supplies a neutral line in the call's language, which promises nothing about who answers because the block does not know. **Keep it true on every transfer to this number:** a caller who asks for a person before the flow reaches this step can be transferred here and hear it too, so describe the transfer, not what came before it. Anything true only at this point of the flow belongs in the step before the handoff, which the agent says in a turn of its own and then transfers once the caller has responded. Blocks that share a `phoneNumber` share one line, taken from the first block that names the number (top to bottom): a later block's `message` is never heard, and if the first block has none the neutral line is used. Supports `{{contact.*}}` and `{{system.*}}` variables; a line that resolves to nothing on a call (only variables, none with a value) falls back to the neutral line rather than a silent transfer. An empty string is rejected (`HUMAN_HANDOFF_MESSAGE_EMPTY`) rather than read as absent, so clearing the field cannot silently restore the default.","example":"I'll put you through to Martin on our sales team now, one moment."}}}]}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key for authentication using Bearer scheme","scopes":[],"schemeName":"bearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key for authentication using Bearer scheme","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer","name":"Authorization"}],"title":"bearer"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"instaview","siteName":"InstaView API","title":"Create Agent - InstaView API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-07T14:52:36.108Z","originalFileLocation":"api-reference/agents/create-agent.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;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=\"system\"}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=\"Creates a new agent scoped to the API key\u0026#x27;s company. Send a flow (with optional guardrails and contextConfig) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template focus.\">\u003cmeta data-mint-head name=\"application-name\" content=\"InstaView API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/instaview/FzS1-dDCztzdlzmX/_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/instaview/FzS1-dDCztzdlzmX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/instaview/FzS1-dDCztzdlzmX/_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/instaview/FzS1-dDCztzdlzmX/_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/instaview/FzS1-dDCztzdlzmX/_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/instaview/FzS1-dDCztzdlzmX/_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/instaview/FzS1-dDCztzdlzmX/_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/instaview/FzS1-dDCztzdlzmX/_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/instaview/FzS1-dDCztzdlzmX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Agent - InstaView API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a new agent scoped to the API key\u0026#x27;s company. Send a flow (with optional guardrails and contextConfig) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template focus.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"InstaView API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.instaview.sk/api-reference/agents/create-agent\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://instaview.mintlify.app/_mintlify/api/og/v2?division=Agents\u0026amp;title=Create+Agent\u0026amp;description=Creates+a+new+agent+scoped+to+the+API+key%27s+company.+Send+a+%60flow%60+%28with+optional+%60guardrails%60+and+%60contextConfig%60%29+to+create+a+custom+agent+%E2%80%94+its+focus+is+then\u0026amp;theme=1444b1b95306a409923bc3c0\u0026amp;signature=22db3131ab7bf0b0e746369b6276ccfb398ca95fc673a5a221279113d687196e\">\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=\"Create Agent - InstaView API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a new agent scoped to the API key\u0026#x27;s company. Send a flow (with optional guardrails and contextConfig) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template focus.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://instaview.mintlify.app/_mintlify/api/og/v2?division=Agents\u0026amp;title=Create+Agent\u0026amp;description=Creates+a+new+agent+scoped+to+the+API+key%27s+company.+Send+a+%60flow%60+%28with+optional+%60guardrails%60+and+%60contextConfig%60%29+to+create+a+custom+agent+%E2%80%94+its+focus+is+then\u0026amp;theme=1444b1b95306a409923bc3c0\u0026amp;signature=22db3131ab7bf0b0e746369b6276ccfb398ca95fc673a5a221279113d687196e\">\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/instaview/FzS1-dDCztzdlzmX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"InstaView API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2741F9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.instaview.sk/api-reference/agents/create-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/agents/create-agent.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.instaview.sk/#organization\",\"name\":\"InstaView API\",\"url\":\"https://docs.instaview.sk\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/instaview/srYC_WLR3UAwt0PY/logo/light.svg?fit=max\u0026auto=format\u0026n=srYC_WLR3UAwt0PY\u0026q=85\u0026s=a941bc948e20b3503a55e49b4438bfd8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.instaview.sk#website\",\"name\":\"InstaView API\",\"url\":\"https://docs.instaview.sk\",\"publisher\":{\"@id\":\"https://docs.instaview.sk/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.instaview.sk/api-reference/agents/create-agent#webpage\",\"url\":\"https://docs.instaview.sk/api-reference/agents/create-agent\",\"name\":\"Create Agent\",\"description\":\"Creates a new agent scoped to the API key's company. Send a flow (with optional guardrails and contextConfig) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template focus.\",\"dateModified\":\"2026-10-07T14:52:36.108Z\",\"isPartOf\":{\"@id\":\"https://docs.instaview.sk#website\"},\"breadcrumb\":{\"@id\":\"https://docs.instaview.sk/api-reference/agents/create-agent#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.instaview.sk/api-reference/agents/create-agent#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Agents\",\"item\":\"https://docs.instaview.sk/api-reference/agents/list-agents\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Agent\",\"item\":\"https://docs.instaview.sk/api-reference/agents/create-agent\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.instaview.sk/api-reference/agents/create-agent#apireference\",\"headline\":\"Create Agent\",\"name\":\"Create Agent\",\"description\":\"Creates a new agent scoped to the API key's company. Send a flow (with optional guardrails and contextConfig) to create a custom agent — its focus is then derived and must not be sent; otherwise pick a template focus.\",\"url\":\"https://docs.instaview.sk/api-reference/agents/create-agent\",\"mainEntityOfPage\":{\"@id\":\"https://docs.instaview.sk/api-reference/agents/create-agent#webpage\"},\"dateModified\":\"2026-10-07T14:52:36.108Z\",\"publisher\":{\"@id\":\"https://docs.instaview.sk/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.instaview.sk#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"InstaView API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"InstaView API","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"group":"Agents","pages":[{"title":"List Agents","openapi":"GET /agents","href":"/api-reference/agents/list-agents"},{"title":"Design an Agent","openapi":"POST /agents/composer","href":"/api-reference/agents/compose-agent"},{"title":"Refine a Composed Agent","openapi":"POST /agents/composer/{sessionId}/messages","href":"/api-reference/agents/refine-agent"},{"title":"Poll a Composer Session","openapi":"GET /agents/composer/{sessionId}","description":"The session's status, its current preview and its conversation, newest first. This is what you poll after starting or refining: 202 while a turn is running, 200 once it has finished.","href":"/api-reference/agents/get-composer-session"},{"title":"Create Agent","openapi":"POST /agents","href":"/api-reference/agents/create-agent"},{"title":"Get Agent","openapi":"GET /agents/{id}","description":"Returns a single agent, ensuring it belongs to the API key's company.","href":"/api-reference/agents/get-agent"},{"title":"Update Agent","openapi":"PATCH /agents/{id}","href":"/api-reference/agents/update-agent"},{"title":"Delete Agent","openapi":"DELETE /agents/{id}","href":"/api-reference/agents/delete-agent"}]},{"group":"Agent Knowledge Base","pages":[{"title":"List Knowledge Documents","openapi":"GET /agents/{id}/knowledge","href":"/api-reference/agents/knowledge/list-knowledge"},{"title":"Start Knowledge Upload","openapi":"POST /agents/{id}/knowledge","href":"/api-reference/agents/knowledge/start-upload"},{"title":"Complete Knowledge Upload","openapi":"POST /agents/{id}/knowledge/{documentId}/complete","href":"/api-reference/agents/knowledge/complete-upload"},{"title":"Update Knowledge Document","openapi":"PATCH /agents/{id}/knowledge/{documentId}","href":"/api-reference/agents/knowledge/update-knowledge"},{"title":"Delete Knowledge Document","openapi":"DELETE /agents/{id}/knowledge/{documentId}","href":"/api-reference/agents/knowledge/delete-knowledge"}]},{"group":"Jobs","pages":[{"title":"List Jobs","openapi":"GET /jobs","href":"/api-reference/jobs/list-jobs"},{"title":"Create Job","openapi":"POST /jobs","href":"/api-reference/jobs/create-job"},{"title":"Create Job from URL","openapi":"POST /jobs/url","href":"/api-reference/jobs/create-job-from-url"},{"title":"Get Job","openapi":"GET /jobs/{id}","href":"/api-reference/jobs/get-job"},{"title":"Update Job","openapi":"PATCH /jobs/{id}","href":"/api-reference/jobs/update-job"},{"title":"Delete Job","openapi":"DELETE /jobs/{id}","href":"/api-reference/jobs/delete-job"}]},{"group":"Contacts","pages":[{"title":"List Contacts","openapi":"GET /contacts","href":"/api-reference/contacts/list-contacts"},{"title":"Create Contact","openapi":"POST /contacts","href":"/api-reference/contacts/create-contact"},{"title":"Get Contact","openapi":"GET /contacts/{id}","href":"/api-reference/contacts/get-contact"},{"title":"Update Contact","openapi":"PATCH /contacts/{id}","href":"/api-reference/contacts/update-contact"},{"title":"Delete Contact","openapi":"DELETE /contacts/{id}","href":"/api-reference/contacts/delete-contact"}]},{"group":"Contact Documents","pages":[{"title":"List Contact Documents","openapi":"GET /contacts/{id}/documents","href":"/api-reference/contacts/documents/list-documents"},{"title":"Start Contact Document Upload","openapi":"POST /contacts/{id}/documents/uploads","href":"/api-reference/contacts/documents/start-upload"},{"title":"Complete Contact Document Upload","openapi":"POST /contacts/{id}/documents/{documentId}/complete","href":"/api-reference/contacts/documents/complete-upload"},{"title":"Update Contact Document","openapi":"PATCH /contacts/{id}/documents/{documentId}","href":"/api-reference/contacts/documents/update-document"},{"title":"Delete Contact Document","openapi":"DELETE /contacts/{id}/documents/{documentId}","href":"/api-reference/contacts/documents/delete-document"}]},{"group":"Contact Fields","pages":[{"title":"List Contact Fields","openapi":"GET /contact-fields","href":"/api-reference/contact-fields/list-contact-fields"},{"title":"Create Contact Field","openapi":"POST /contact-fields","href":"/api-reference/contact-fields/create-contact-field"},{"title":"Update Contact Field","openapi":"PATCH /contact-fields/{id}","href":"/api-reference/contact-fields/update-contact-field"},{"title":"Delete Contact Field","openapi":"DELETE /contact-fields/{id}","href":"/api-reference/contact-fields/delete-contact-field"}]},{"group":"Companies","pages":[{"title":"List Companies","openapi":"GET /company","href":"/api-reference/companies/list-companies"},{"title":"Create Company","openapi":"POST /company","href":"/api-reference/companies/create-company"},{"title":"Get Company","openapi":"GET /company/{id}","href":"/api-reference/companies/get-company"},{"title":"Update Company","openapi":"PATCH /company/{id}","href":"/api-reference/companies/update-company"},{"title":"Delete Company","openapi":"DELETE /company/{id}","href":"/api-reference/companies/delete-company"}]},{"group":"Conversations","pages":[{"title":"List Conversations","openapi":"GET /conversations","href":"/api-reference/conversations/list-conversations"},{"title":"Create Conversation","openapi":"POST /conversations","href":"/api-reference/conversations/create-conversation"},{"title":"Get Conversation","openapi":"GET /conversations/{id}","href":"/api-reference/conversations/get-conversation"},{"title":"Get Conversation Analysis PDF","openapi":"GET /conversations/{id}/analysis-pdf","href":"/api-reference/conversations/get-conversation-analysis-pdf"},{"title":"Invoke New Call Attempt","openapi":"POST /conversations/{id}/call-attempts","href":"/api-reference/conversations/invoke-call-attempt"},{"title":"Reschedule Call Attempt","openapi":"PATCH /conversations/{id}/call-attempts/{attemptId}","href":"/api-reference/conversations/reschedule-call-attempt"},{"title":"Delete Call Attempt","openapi":"DELETE /conversations/{id}/call-attempts/{attemptId}","href":"/api-reference/conversations/delete-call-attempt"},{"title":"Delete Conversation","openapi":"DELETE /conversations/{id}","href":"/api-reference/conversations/delete-conversation"}]},{"group":"Runs","pages":[{"title":"Create Run","openapi":"POST /runs","href":"/api-reference/runs/create-run"},{"title":"Get Run","openapi":"GET /runs/{id}","href":"/api-reference/runs/get-run"},{"title":"List Run Conversations","openapi":"GET /runs/{id}/conversations","href":"/api-reference/runs/list-run-conversations"},{"title":"Attach Contacts","openapi":"POST /runs/{id}/contacts","href":"/api-reference/runs/attach-run-contacts"},{"title":"Detach Contact","openapi":"DELETE /runs/{id}/contacts/{contactId}","href":"/api-reference/runs/detach-run-contact"},{"title":"Launch Run","openapi":"POST /runs/{id}/launch","href":"/api-reference/runs/launch-run"},{"title":"Pause Run","openapi":"POST /runs/{id}/pause","href":"/api-reference/runs/pause-run"},{"title":"Resume Run","openapi":"POST /runs/{id}/resume","href":"/api-reference/runs/resume-run"},{"title":"Cancel Run","openapi":"POST /runs/{id}/cancel","href":"/api-reference/runs/cancel-run"},{"title":"Delete Run","openapi":"DELETE /runs/{id}","href":"/api-reference/runs/delete-run"}]},{"group":"Billing","pages":[{"title":"Get Usage Statistics","openapi":"GET /billing/usage","href":"/api-reference/billing/get-usage"}]},{"group":"Voice","pages":[{"title":"Generate Audio","openapi":"POST /voice","href":"/api-reference/voice/generate-audio"}]},{"group":"Webhooks","pages":[{"title":"List Webhooks","api":"GET /webhooks","href":"/api-reference/webhooks/list-webhooks"},{"title":"Create Webhook","api":"POST /webhooks","href":"/api-reference/webhooks/create-webhook"},{"title":"Get Webhook","api":"GET /webhooks/{id}","href":"/api-reference/webhooks/get-webhook"},{"title":"Update Webhook","api":"PATCH /webhooks/{id}","href":"/api-reference/webhooks/update-webhook"},{"title":"Delete Webhook","api":"DELETE /webhooks/{id}","href":"/api-reference/webhooks/delete-webhook"},{"title":"Test Webhook","api":"POST /webhooks/{id}/test","href":"/api-reference/webhooks/test-webhook"},{"title":"Reset Circuit Breaker","api":"POST /webhooks/{id}/reset-circuit","href":"/api-reference/webhooks/reset-circuit"}]},{"group":"Sourcing","pages":[{"title":"Initiate Sourcing Run","openapi":"POST /sourcing","href":"/api-reference/sourcing/initiate-sourcing"},{"title":"Initiate Sourcing Preview Run","openapi":"POST /sourcing/preview","href":"/api-reference/sourcing/initiate-sourcing-preview"},{"title":"Get Sourcing Preview Results","openapi":"GET /sourcing/preview/{id}/results","href":"/api-reference/sourcing/get-sourcing-preview-results"},{"title":"Patch Sourcing Run","openapi":"PATCH /sourcing/{id}","href":"/api-reference/sourcing/patch-sourcing"},{"title":"Get Sourcing Results","openapi":"GET /sourcing/{id}/results","href":"/api-reference/sourcing/get-sourcing-results"},{"title":"Initiate Enrichment Run","openapi":"POST /sourcing/enrich","href":"/api-reference/sourcing/initiate-enrichment"},{"title":"Get Enrichment Results","openapi":"GET /sourcing/enrich/{id}/results","href":"/api-reference/sourcing/get-enrich-results"},{"title":"Render HTML Candidate Cards","openapi":"POST /sourcing/render-html","href":"/api-reference/sourcing/render-html"}]},{"group":"Phone Numbers","pages":[{"title":"List Phone Numbers","openapi":"GET /phone-numbers","href":"/api-reference/phone-numbers/list-phone-numbers"}]}]},{"tab":"Changelog","icon":"clock","pages":[{"title":"Changelog","href":"/changelog/introduction"}]}]},"title":"Create Agent - InstaView API","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}