Agents API
Create, configure and embed agents: generate one from a plain-language description or a scan of a website, rehearse it before it goes live, restore an earlier version, and fetch the snippet a site pastes in.
On this page
Endpoints#
25 operations, each with its parameters, schemas and an example request on its own page.
- getList agents/api/agents
- postCreate agent/api/agents
- postGenerate agent/api/agents/generateBuilds a fully-configured agent from one plain-language description.
- getAvailable models/api/agents/modelsModels this org's plan may select, with measured characteristics.
- postRehearse blueprint/api/agents/onboarding/rehearseShows what a candidate agent would say, before anything is live.
- postScan website/api/agents/onboarding/scanReads a business's website, best pages first.
- postGenerate variants/api/agents/onboarding/variantsThree looks of the same agent to choose between (onboarding_service.VARIANTS).
- getList widget designs/api/agents/widget/designsThe preset picker's contents, and which of them this plan can use.
- getGet agent/api/agents/{agent_id}
- patchUpdate agent/api/agents/{agent_id}
- deleteDelete agent/api/agents/{agent_id}Soft delete: the agent goes offline immediately and is purged after the retention window, so an accidental deletion is recoverable.
- postDuplicate agent/api/agents/{agent_id}/duplicate
- getGet embed/api/agents/{agent_id}/embedThe snippet a customer pastes, in two forms.
- getGet funnel/api/agents/{agent_id}/funnelImpressions, opens and abandonment - the funnel above the first message.
- postRotate key/api/agents/{agent_id}/rotate-keyIssues a new embed key. Every existing embed of this agent stops working.
- postSuggest improvements/api/agents/{agent_id}/suggest-improvementsReviews the questions this agent answered badly and proposes fixes.
- postTest message/api/agents/{agent_id}/testSends one message through the same retrieval and generation path the widget uses, without creating a conversation.
- postUpload avatar/api/agents/{agent_id}/theme/avatarUploads the agent's avatar and points the theme at it.
- deleteDelete avatar/api/agents/{agent_id}/theme/avatarRemoves the avatar and clears the theme field.
- postGenerate theme/api/agents/{agent_id}/theme/generateA palette from a sentence, or from the customer's own website.
- postUpload launcher icon/api/agents/{agent_id}/theme/launcher-iconThe launcher drawn from the tenant's own image - a premium look.
- deleteDelete launcher icon/api/agents/{agent_id}/theme/launcher-iconBack to a drawn glyph. Always allowed - removing a premium look never is gated.
- postTranslate greeting/api/agents/{agent_id}/translate-greetingThe greeting and suggested questions, translated for the editor.
- getList versions/api/agents/{agent_id}/versions
- postRestore version/api/agents/{agent_id}/versions/{version}/restore
Authentication#
Every call here needs Authorization: Bearer with a key from the dashboard — Authentication covers keys and scopes.
Objects returned#
The models these endpoints send back, with every field. Open one to read it.
PaginatedResponse_AgentRead_6 fields
itemsarray of AgentReadrequired38 fieldsAgentRead
allowed_domainsarray of string | nullrequiredcontact_fields_configarray of anyrequiredcreated_atstring (date-time)requireddescriptionstring | nullrequireddirectory_configobject | nullrequiredfallback_messagestring | nullrequiredhandoff_enabledbooleanrequiredidstringrequiredindexed_chunk_countintegerrequiredis_publicbooleanrequiredlanguagestringrequiredlast_errorstring | nullrequiredlead_capture_configobject | nullrequiredllm_providerLLMProviderTyperequiredplatformuses the credentials this deployment is configured with;byok("bring your own key") uses the tenant's own Anthropic key;customposts to an owner-supplied OpenAI-compatible endpoint.One of: platform, byok, custom
max_tokensintegerrequiredmodelstring | nullrequiredmonthly_message_capinteger | nullrequirednamestringrequiredorg_idstringrequiredpublic_keystringrequiredrate_limit_per_minuteintegerrequiredstarter_questionsarray of stringrequiredstatusAgentStatusrequiredOne of: draft, active, paused, archived
strict_kb_modebooleanrequiredsystem_promptstringrequiredtemperaturenumberrequiredthinking_enabledbooleanrequiredtotal_conversationsintegerrequiredtotal_messagesintegerrequiredupdated_atstring (date-time)requiredwelcome_messagestring | nullrequiredwidget_themeobjectrequiredcustom_endpoint_configobject | nullfield_discoverybooleanDefault: false
has_api_keybooleanDefault: false
language_configobjectmessages_this_monthinteger | nullthinking_budget_tokensintegerDefault: 2048
pageintegerrequiredpage_sizeintegerrequiredtotalintegerrequiredhas_morebooleanDefault: false
next_cursorstring | null
AgentRead38 fields
allowed_domainsarray of string | nullrequiredcontact_fields_configarray of anyrequiredcreated_atstring (date-time)requireddescriptionstring | nullrequireddirectory_configobject | nullrequiredfallback_messagestring | nullrequiredhandoff_enabledbooleanrequiredidstringrequiredindexed_chunk_countintegerrequiredis_publicbooleanrequiredlanguagestringrequiredlast_errorstring | nullrequiredlead_capture_configobject | nullrequiredllm_providerLLMProviderTyperequiredplatformuses the credentials this deployment is configured with;byok("bring your own key") uses the tenant's own Anthropic key;customposts to an owner-supplied OpenAI-compatible endpoint.One of: platform, byok, custom
max_tokensintegerrequiredmodelstring | nullrequiredmonthly_message_capinteger | nullrequirednamestringrequiredorg_idstringrequiredpublic_keystringrequiredrate_limit_per_minuteintegerrequiredstarter_questionsarray of stringrequiredstatusAgentStatusrequiredOne of: draft, active, paused, archived
strict_kb_modebooleanrequiredsystem_promptstringrequiredtemperaturenumberrequiredthinking_enabledbooleanrequiredtotal_conversationsintegerrequiredtotal_messagesintegerrequiredupdated_atstring (date-time)requiredwelcome_messagestring | nullrequiredwidget_themeobjectrequiredcustom_endpoint_configobject | nullfield_discoverybooleanDefault: false
has_api_keybooleanDefault: false
language_configobjectmessages_this_monthinteger | nullthinking_budget_tokensintegerDefault: 2048
AgentGenerateResponse4 fields
blueprintAgentBlueprintrequiredThe generated configuration, before it becomes an agent.
16 fieldsAgentBlueprint
contact_fields_configarray of anyrequireddescriptionstringrequireddirectory_configobject | nullrequiredfallback_messagestringrequiredindustrystringrequiredlanguagestringrequiredlead_capture_configobject | nullrequirednamestringrequiredstarter_questionsarray of stringrequiredstrict_kb_modebooleanrequiredsuggested_kb_topicsarray of stringrequiredsystem_promptstringrequiredtemperaturenumberrequiredwelcome_messagestringrequiredwidget_themeobjectrequiredfield_discoverybooleanDefault: false
agentAgentRead | null38 fieldsAgentRead
allowed_domainsarray of string | nullrequiredcontact_fields_configarray of anyrequiredcreated_atstring (date-time)requireddescriptionstring | nullrequireddirectory_configobject | nullrequiredfallback_messagestring | nullrequiredhandoff_enabledbooleanrequiredidstringrequiredindexed_chunk_countintegerrequiredis_publicbooleanrequiredlanguagestringrequiredlast_errorstring | nullrequiredlead_capture_configobject | nullrequiredllm_providerLLMProviderTyperequiredplatformuses the credentials this deployment is configured with;byok("bring your own key") uses the tenant's own Anthropic key;customposts to an owner-supplied OpenAI-compatible endpoint.One of: platform, byok, custom
max_tokensintegerrequiredmodelstring | nullrequiredmonthly_message_capinteger | nullrequirednamestringrequiredorg_idstringrequiredpublic_keystringrequiredrate_limit_per_minuteintegerrequiredstarter_questionsarray of stringrequiredstatusAgentStatusrequiredOne of: draft, active, paused, archived
strict_kb_modebooleanrequiredsystem_promptstringrequiredtemperaturenumberrequiredthinking_enabledbooleanrequiredtotal_conversationsintegerrequiredtotal_messagesintegerrequiredupdated_atstring (date-time)requiredwelcome_messagestring | nullrequiredwidget_themeobjectrequiredcustom_endpoint_configobject | nullfield_discoverybooleanDefault: false
has_api_keybooleanDefault: false
language_configobjectmessages_this_monthinteger | nullthinking_budget_tokensintegerDefault: 2048
embed_snippetstring | nullimport_job_queuedbooleanDefault: false
Message2 fields
messagestringrequiredokbooleanDefault: true
TestMessageResponse7 fields
contentstringrequiredcreditsnumberrequiredinput_tokensintegerrequiredlatency_msintegerrequiredmodelstringrequiredoutput_tokensintegerrequiredcitationsarray of object
AgentVersionRead4 fields
created_atstring (date-time)requirednotestring | nullrequiredsnapshotobjectrequiredversionintegerrequired
Something unclear or missing? Tell us and we’ll fix it.