Create a new chat agent

post/create-chat-agent

Request body

agent_namestring nullable

The name of the chat agent. Only used for your own reference.

auto_close_messagestring nullable

Message to display when the chat is automatically closed.

end_chat_after_silence_msinteger nullable

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).

webhook_urlstring nullable

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.

webhook_eventsstring[] nullable

Which webhook events this agent should receive. If not set, defaults to chat_started, chat_ended, chat_analyzed.

webhook_timeout_msinteger

The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.

data_storage_setting'everything' | 'everything_except_pii' | 'basic_attributes_only' nullable

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".

data_storage_retention_daysinteger nullable

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).

opt_in_signed_urlboolean

Whether this agent opts in to signed url for public log. If not set, default value of false will apply.

signed_url_expiration_msinteger nullable

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.

post_chat_analysis_model'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' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | 'gemini-3.1-flash-lite' | 'null' nullable

Available LLM models for agents.

analysis_successful_promptstring nullable

The prompt to use for post call analysis to evaluate whether the call is successful. Set to null to use the default prompt.

analysis_summary_promptstring nullable

The prompt to use for post call analysis to summarize the call. Set to null to use the default prompt.

analysis_user_sentiment_promptstring nullable

Prompt to guide how the post chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.

timezonestring nullable

IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.

Example request

{
  "agent_name": "Jarvis",
  "auto_close_message": "Thank you for chatting. The conversation has ended.",
  "end_chat_after_silence_ms": 3600000,
  "language": "en-US",
  "webhook_url": "https://webhook-url-here",
  "webhook_timeout_ms": 10000,
  "data_storage_setting": "everything",
  "data_storage_retention_days": 30,
  "opt_in_signed_url": true,
  "signed_url_expiration_ms": 86400000,
  "post_chat_analysis_data": [
    {
      "type": "string",
      "name": "customer_name",
      "description": "The name of the customer.",
      "examples": [
        "John Doe",
        "Jane Smith"
      ]
    }
  ],
  "analysis_successful_prompt": "The agent finished the task and the call was complete without being cutoff.",
  "analysis_summary_prompt": "Summarize the call in a few sentences.",
  "analysis_user_sentiment_prompt": "Evaluate the user's sentiment based on their tone and satisfaction level.",
  "timezone": "America/New_York"
}

Response

Successfully created a new chat agent.

agent_idstring required

Unique id of chat agent.

versioninteger

The version of the chat agent.

base_versioninteger nullable

Version that this draft was based on. Null for initial versions.

assigned_tagsstring[]

Tags assigned to this chat agent version. Preferred tag is listed first.

is_publishedboolean

Whether the chat agent is published.

agent_namestring nullable

The name of the chat agent. Only used for your own reference.

auto_close_messagestring nullable

Message to display when the chat is automatically closed.

end_chat_after_silence_msinteger nullable

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).

webhook_urlstring nullable

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.

webhook_eventsstring[] nullable

Which webhook events this agent should receive. If not set, defaults to chat_started, chat_ended, chat_analyzed.

webhook_timeout_msinteger

The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.

data_storage_setting'everything' | 'everything_except_pii' | 'basic_attributes_only' nullable

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".

data_storage_retention_daysinteger nullable

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).

opt_in_signed_urlboolean

Whether this agent opts in to signed url for public log. If not set, default value of false will apply.

signed_url_expiration_msinteger nullable

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.

post_chat_analysis_model'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' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | 'gemini-3.1-flash-lite' | 'null' nullable

Available LLM models for agents.

analysis_successful_promptstring nullable

The prompt to use for post call analysis to evaluate whether the call is successful. Set to null to use the default prompt.

analysis_summary_promptstring nullable

The prompt to use for post call analysis to summarize the call. Set to null to use the default prompt.

analysis_user_sentiment_promptstring nullable

Prompt to guide how the post chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.

timezonestring nullable

IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.

last_modification_timestampinteger required

Last modification timestamp (milliseconds since epoch). Either the time of last update or creation if no updates available.

Example response

{
  "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "base_version": 12,
  "agent_name": "Jarvis",
  "auto_close_message": "Thank you for chatting. The conversation has ended.",
  "end_chat_after_silence_ms": 3600000,
  "language": "en-US",
  "webhook_url": "https://webhook-url-here",
  "webhook_timeout_ms": 10000,
  "data_storage_setting": "everything",
  "data_storage_retention_days": 30,
  "opt_in_signed_url": true,
  "signed_url_expiration_ms": 86400000,
  "post_chat_analysis_data": [
    {
      "type": "string",
      "name": "customer_name",
      "description": "The name of the customer.",
      "examples": [
        "John Doe",
        "Jane Smith"
      ]
    }
  ],
  "analysis_successful_prompt": "The agent finished the task and the call was complete without being cutoff.",
  "analysis_summary_prompt": "Summarize the call in a few sentences.",
  "analysis_user_sentiment_prompt": "Evaluate the user's sentiment based on their tone and satisfaction level.",
  "timezone": "America/New_York",
  "last_modification_timestamp": 1703413636133
}

Changes

Changed in 14 of the 28 revisions of this API.501174

    • ●

      removed the request property ////

      request-property-removed

    • ●

      removed the optional property //// from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property / from the response with the status

      response-optional-property-removed

  • f1a0d7c1e36c114See the full diff
    • ▲

      removed the enum value gemini-2.5-flash of the request property ////

      request-property-enum-value-removed

    • ●

      added the new transcript_updated enum value to the ///// response property for the response status

      response-property-enum-value-added

    • ○

      added the new transcript_updated enum value to the request property /////

      request-property-enum-value-added

    • ○

      added subschema #1 subschema #3 to the response body allOf list for the response status

      response-body-all-of-added

    • ○

      removed subschema #1 subschema #3 from the response body allOf list for the response status

      response-body-all-of-removed

    • ○

      removed the gemini-2.5-flash enum value from the //// response property for the response status

      response-property-enum-value-removed

  • 1b4a9d84942a11See the full diff
    • ●

      added the new gpt-5.5 enum value to the //// response property for the response status

      response-property-enum-value-added

    • ○

      added the new gpt-5.5 enum value to the request property ////

      request-property-enum-value-added

  • a44406f743c24240See the full diff
    • ▲

      removed the enum value bg-BG of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value ca-ES of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value cs-CZ of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value da-DK of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value de-DE of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value el-GR of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value en-AU of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value en-GB of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value en-IN of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value en-NZ of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value en-US of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value es-419 of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value es-ES of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value fi-FI of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value fr-CA of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value fr-FR of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value hi-IN of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value hu-HU of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value id-ID of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value it-IT of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value ja-JP of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value ko-KR of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value lt-LT of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value lv-LV of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value multi of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value nl-BE of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value nl-NL of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value no-NO of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value pl-PL of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value pt-BR of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value pt-PT of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value ro-RO of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value ru-RU of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value sk-SK of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value sv-SE of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value th-TH of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value tr-TR of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value vi-VN of the request property ////

      request-property-enum-value-removed

    • ▲

      removed the enum value zh-CN of the request property ////

      request-property-enum-value-removed

    • ▲

      the //// request property type changed from string to no type

      request-property-type-changed

    • ▲

      added subschema #2 to the //// response property oneOf list for the response status

      response-property-one-of-added

    • ▲

      the //// response's property type changed from string to no type for status

      response-property-type-changed

    • ○

      added subschema #2 to the //// request property oneOf list

      request-property-one-of-added

    • ○

      removed the bg-BG enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the ca-ES enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the cs-CZ enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the da-DK enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the de-DE enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the el-GR enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the en-AU enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the en-GB enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the en-IN enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the en-NZ enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the en-US enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the es-419 enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the es-ES enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the fi-FI enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the fr-CA enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the fr-FR enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the hi-IN enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the hu-HU enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the id-ID enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the it-IT enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the ja-JP enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the ko-KR enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the lt-LT enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the lv-LV enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the multi enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the nl-BE enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the nl-NL enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the no-NO enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the pl-PL enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the pt-BR enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the pt-PT enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the ro-RO enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the ru-RU enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the sk-SK enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the sv-SE enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the th-TH enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the tr-TR enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the vi-VN enum value from the //// response property for the response status

      response-property-enum-value-removed

    • ○

      removed the zh-CN enum value from the //// response property for the response status

      response-property-enum-value-removed

  • 8ee53928bf3111See the full diff
    • ●

      added the new gemini-3.1-flash-lite enum value to the //// response property for the response status

      response-property-enum-value-added

    • ○

      added the new gemini-3.1-flash-lite enum value to the request property ////

      request-property-enum-value-added

    • ▲

      removed from the ///// request property oneOf list

      request-property-one-of-removed

    • ▲

      added to the ///// response property oneOf list for the response status

      response-property-one-of-added

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added to the ///// request property oneOf list

      request-property-one-of-added

    • ○

      added the optional property //// to the response with the status

      response-optional-property-added

    • ○

      added the optional property //// to the response with the status

      response-optional-property-added

    • ○

      removed from the ///// response property oneOf list for the response status

      response-property-one-of-removed

  • 3aa6f6e028ef22See the full diff
    • ●

      added the new gpt-5.4-mini enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new gpt-5.4-nano enum value to the //// response property for the response status

      response-property-enum-value-added

    • ○

      added the new gpt-5.4-mini enum value to the request property ////

      request-property-enum-value-added

    • ○

      added the new gpt-5.4-nano enum value to the request property ////

      request-property-enum-value-added

  • 424df3aa790011See the full diff
    • ●

      added the new gpt-5.4 enum value to the //// response property for the response status

      response-property-enum-value-added

    • ○

      added the new gpt-5.4 enum value to the request property ////

      request-property-enum-value-added

  • 8fbf8c54a1425110See the full diff
    • ▲

      the ////////// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • ▲

      the ////////// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • ▲

      the ////////// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • ▲

      the ////////// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • ▲

      the response property //// became nullable for the status

      response-property-became-nullable

    • ●

      added the new claude-4.6-sonnet enum value to the //// response property for the response status

      response-property-enum-value-added

    • ○

      added the new optional request property //////////

      new-optional-request-property

    • ○

      added the new optional request property //////////

      new-optional-request-property

    • ○

      added the new optional request property //////////

      new-optional-request-property

    • ○

      added the new optional request property //////////

      new-optional-request-property

    • ○

      the request property //// became nullable

      request-property-became-nullable

    • ○

      added the new claude-4.6-sonnet enum value to the request property ////

      request-property-enum-value-added

    • ○

      added the optional property ////////// to the response with the status

      response-optional-property-added

    • ○

      added the optional property ////////// to the response with the status

      response-optional-property-added

    • ○

      added the optional property ////////// to the response with the status

      response-optional-property-added

    • ○

      added the optional property ////////// to the response with the status

      response-optional-property-added