Create Chat Agent
Create a new chat agent
Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Body
The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.
- Option 1
- Option 2
- Option 3
The name of the chat agent. Only used for your own reference.
"Jarvis"
Optional title of the chat agent version. Used for your own reference.
"Production hotfix"
Message to display when the chat is automatically closed.
"Thank you for chatting. The conversation has ended."
If users stay silent for a period after agent speech, end the chat. The minimum value allowed is 120,000 ms (2 minutes). The maximum value allowed is 259,200,000 ms (72 hours). By default, this is set to 3,600,000 (1 hour).
3600000
Specifies what language(s) the agent will operate in. Accepts either a single locale (e.g. en-US) or an array of locales for multilingual agents (e.g. ["en-US","es-ES"]). The scalar value multi is deprecated but still accepted as a scalar, and is stored and returned as the ten locales it used to mean. It must not appear inside the array form. Send an explicit locale array instead. If unset, defaults to en-US.
en-US, en-IN, en-GB, en-AU, en-NZ, de-DE, es-ES, es-419, hi-IN, fr-FR, fr-CA, ja-JP, pt-PT, pt-BR, zh-CN, ru-RU, it-IT, ko-KR, nl-NL, nl-BE, pl-PL, tr-TR, vi-VN, ro-RO, bg-BG, ca-ES, th-TH, da-DK, fi-FI, el-GR, hu-HU, id-ID, no-NO, sk-SK, sv-SE, lt-LT, lv-LV, cs-CZ, ms-MY, af-ZA, ar-SA, az-AZ, bs-BA, cy-GB, fa-IR, fil-PH, gl-ES, he-IL, hr-HR, hy-AM, is-IS, kk-KZ, kn-IN, mk-MK, mr-IN, ne-NP, sl-SI, sr-RS, sw-KE, ta-IN, ur-IN, yue-CN, uk-UA "en-US"
The webhook for agent to listen to chat events. See what events it would get at webhook doc. If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to null to remove webhook url from this agent.
"https://webhook-url-here"
Which webhook events this agent should receive. If not set, defaults to chat_started, chat_ended, chat_analyzed.
chat_started, chat_ended, chat_analyzed, transcript_updated The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.
10000
Contact memory settings for phone calls and SMS chats. Creating an agent defaults enable_update to false and enable_read to true. Updates only change the supplied flags; omitted flags stay unchanged and an empty object has no effect. Set a flag to false to disable it. The configuration cannot be cleared. Existing agents without this configuration have both disabled.
Controls what data is stored for this agent. "everything" stores all data including transcripts and recordings. "everything_except_pii" stores data but excludes PII when possible based on PII configuration. "basic_attributes_only" stores only basic metadata. If not set, defaults to "everything".
everything, everything_except_pii, basic_attributes_only "everything"
Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).
1 <= x <= 73030
Whether this agent opts in to signed url for public log. If not set, default value of false will apply.
true
The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.
86400000
Post chat analysis data to extract from the chat. This data will augment the pre-defined variables extracted in the chat analysis. This will be available after the chat ends.
Post-chat analysis item (custom data or chat preset). Use for chat agent post_chat_analysis_data; validates only chat presets (chat_summary, chat_successful, user_sentiment).
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
The model to use for post chat analysis. Default to gpt-5.6-terra.
gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-5, gpt-5-mini, gpt-5-nano, gpt-5.1, gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.5, gpt-5.6-terra, gpt-5.6-luna, gpt-6-astra, gpt-6-sol, gpt-6.1-sol, gpt-6-luna, claude-4.5-sonnet, claude-4.6-sonnet, claude-5-opus, claude-5.5-opus, claude-5-sonnet, claude-5.5-sonnet, claude-4.5-haiku, gemini-3.0-flash, gemini-3.1-flash-lite, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.6-flash, gemini-3.7-flash, gemini-3.8-flash, null "gpt-4.1-mini"
Configuration for PII scrubbing from transcripts and recordings.
Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.
Toggle behavior presets on/off to influence agent response style and behaviors. Voice-only presets are not available for chat agents.
IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.
"America/New_York"
Integration (Agent Functions) tools run as a dependency graph before the chat's first message. Outputs are injected as dynamic variables. Set to null to clear.
15A pre-session tool (app / custom / code, discriminated by type) plus its dependency edges. The tool's name is the depends_on handle and must be unique across the agent's session tools. Parameters may set a constant value or a description for the LLM to infer the value. Pre-session inference uses the agent prompt and dynamic variables.
- Option 1
- Option 2
- Option 3
Integration (Agent Functions) tools run as a dependency graph at chat end, after post-chat analysis. Each tool can be gated by a condition. Set to null to clear.
15A post-session tool with an optional condition. Parameter inference uses the agent prompt, dynamic variables, and conversation. Same tools as PreSessionTool plus send_sms, which is only supported on phone calls — the session is over, so the speak settings are ignored and an inferred sms_content is written by the LLM from the transcript at teardown.
- Option 1
- Option 2
- Option 3
- Option 4
Response
Successfully created a new chat agent.
Unique id of chat agent.
"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD"
The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.
- Option 1
- Option 2
- Option 3
Last modification timestamp (milliseconds since epoch). Either the time of last update or creation if no updates available.
1703413636133
The version of the chat agent.
0
Version that this draft was based on. Null for initial versions.
12
Tags assigned to this chat agent version. Preferred tag is listed first.
Whether the chat agent is published.
false
The name of the chat agent. Only used for your own reference.
"Jarvis"
Optional title of the chat agent version. Used for your own reference.
"Production hotfix"
Message to display when the chat is automatically closed.
"Thank you for chatting. The conversation has ended."
If users stay silent for a period after agent speech, end the chat. The minimum value allowed is 120,000 ms (2 minutes). The maximum value allowed is 259,200,000 ms (72 hours). By default, this is set to 3,600,000 (1 hour).
3600000
Specifies what language(s) the agent will operate in. Accepts either a single locale (e.g. en-US) or an array of locales for multilingual agents (e.g. ["en-US","es-ES"]). The scalar value multi is deprecated but still accepted as a scalar, and is stored and returned as the ten locales it used to mean. It must not appear inside the array form. Send an explicit locale array instead. If unset, defaults to en-US.
en-US, en-IN, en-GB, en-AU, en-NZ, de-DE, es-ES, es-419, hi-IN, fr-FR, fr-CA, ja-JP, pt-PT, pt-BR, zh-CN, ru-RU, it-IT, ko-KR, nl-NL, nl-BE, pl-PL, tr-TR, vi-VN, ro-RO, bg-BG, ca-ES, th-TH, da-DK, fi-FI, el-GR, hu-HU, id-ID, no-NO, sk-SK, sv-SE, lt-LT, lv-LV, cs-CZ, ms-MY, af-ZA, ar-SA, az-AZ, bs-BA, cy-GB, fa-IR, fil-PH, gl-ES, he-IL, hr-HR, hy-AM, is-IS, kk-KZ, kn-IN, mk-MK, mr-IN, ne-NP, sl-SI, sr-RS, sw-KE, ta-IN, ur-IN, yue-CN, uk-UA "en-US"
The webhook for agent to listen to chat events. See what events it would get at webhook doc. If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to null to remove webhook url from this agent.
"https://webhook-url-here"
Which webhook events this agent should receive. If not set, defaults to chat_started, chat_ended, chat_analyzed.
chat_started, chat_ended, chat_analyzed, transcript_updated The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.
10000
Contact memory settings for phone calls and SMS chats. Creating an agent defaults enable_update to false and enable_read to true. Updates only change the supplied flags; omitted flags stay unchanged and an empty object has no effect. Set a flag to false to disable it. The configuration cannot be cleared. Existing agents without this configuration have both disabled.
Controls what data is stored for this agent. "everything" stores all data including transcripts and recordings. "everything_except_pii" stores data but excludes PII when possible based on PII configuration. "basic_attributes_only" stores only basic metadata. If not set, defaults to "everything".
everything, everything_except_pii, basic_attributes_only "everything"
Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).
1 <= x <= 73030
Whether this agent opts in to signed url for public log. If not set, default value of false will apply.
true
The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.
86400000
Post chat analysis data to extract from the chat. This data will augment the pre-defined variables extracted in the chat analysis. This will be available after the chat ends.
Post-chat analysis item (custom data or chat preset). Use for chat agent post_chat_analysis_data; validates only chat presets (chat_summary, chat_successful, user_sentiment).
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
The model to use for post chat analysis. Default to gpt-5.6-terra.
gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-5, gpt-5-mini, gpt-5-nano, gpt-5.1, gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.5, gpt-5.6-terra, gpt-5.6-luna, gpt-6-astra, gpt-6-sol, gpt-6.1-sol, gpt-6-luna, claude-4.5-sonnet, claude-4.6-sonnet, claude-5-opus, claude-5.5-opus, claude-5-sonnet, claude-5.5-sonnet, claude-4.5-haiku, gemini-3.0-flash, gemini-3.1-flash-lite, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.6-flash, gemini-3.7-flash, gemini-3.8-flash, null "gpt-4.1-mini"
Configuration for PII scrubbing from transcripts and recordings.
Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.
Toggle behavior presets on/off to influence agent response style and behaviors. Voice-only presets are not available for chat agents.
IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.
"America/New_York"
Integration (Agent Functions) tools run as a dependency graph before the chat's first message. Outputs are injected as dynamic variables. Set to null to clear.
15A pre-session tool (app / custom / code, discriminated by type) plus its dependency edges. The tool's name is the depends_on handle and must be unique across the agent's session tools. Parameters may set a constant value or a description for the LLM to infer the value. Pre-session inference uses the agent prompt and dynamic variables.
- Option 1
- Option 2
- Option 3
Integration (Agent Functions) tools run as a dependency graph at chat end, after post-chat analysis. Each tool can be gated by a condition. Set to null to clear.
15A post-session tool with an optional condition. Parameter inference uses the agent prompt, dynamic variables, and conversation. Same tools as PreSessionTool plus send_sms, which is only supported on phone calls — the session is over, so the speak settings are ignored and an inferred sms_content is written by the LLM from the transcript at teardown.
- Option 1
- Option 2
- Option 3
- Option 4

