{"openapi":"3.0.2","paths":{"/agents":{"get":{"description":"Every agent on the account, newest first, with training status, items waiting for review and conversation counts.\n\n**MCP tool:** `list_agents` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List agents","tags":["Agents"],"parameters":[{"name":"cursor","in":"query","description":"Continuation token. Omit on the first request, then pass the `nextCursor` of the previous page.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size, 1-200. Defaults to 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listAgents","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Agent id."},"name":{"type":"string","description":"Agent name shown in eChat."},"goal":{"type":"string","description":"Instructions: how the agent should behave and respond (Instructions in the editor).","nullable":true},"website_url":{"type":"string","description":"Website the agent represents.","nullable":true},"is_active":{"type":"boolean","description":"False while the agent is paused.","nullable":true},"domain_context":{"type":"object","properties":{"companyName":{"type":"string","description":"Company or product name."},"contextText":{"type":"string","description":"Product summary (markdown)."}},"additionalProperties":true,"description":"Product context the agent reads on every answer.","nullable":true},"actors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"The agent's persona. The entry with isAI true is the one visitors see.","nullable":true},"messages":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"The first entry's `text` is the welcome message a new visitor sees.","nullable":true},"settings":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","fr","de","it","pt","nl","pl","ru","ja","ko","zh","ar","hi","tr","sv","da","no","fi"],"nullable":true,"description":"ISO 639-1 language the agent answers in. Default en."},"chatModel":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"nullable":true,"description":"Model that writes the agent's answers. Each answer costs the model's credit multiplier in message credits: claude-opus-4-8 (Claude 4.8 Opus, 6x), gpt-5.6-sol (GPT-5.6 Sol, 10x), gpt-5.6-terra (GPT-5.6 Terra, 3x), gpt-5.6-luna (GPT-5.6 Luna, 1x), claude-opus-4-6 (Claude 4.6 Opus, 5x), claude-sonnet-4-6 (Claude 4.6 Sonnet, 3x). Default gpt-5.6-terra."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"nullable":true,"description":"How strictly answers are checked against training. creative: never verified. balanced (default): one verification pass that removes contradicted claims. conservative (Strict in the editor): also checks each claim against retrieved evidence and drops what it cannot confirm."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"nullable":true,"description":"eWebinar agents only. covered_so_far (default): answer only from the part of the webinar the viewer has already watched. answer_anytime: answer from the whole transcript."},"useCase":{"type":"string","enum":["sales","customer_success","support"],"nullable":true,"description":"Role the agent's instructions start from (Role in the editor). Changing it does not rewrite existing instructions; set the agent's goal for that."},"chatType":{"type":"string","enum":["webinar","landing_page"],"nullable":true,"description":"webinar: an eWebinar AI moderator. landing_page: a standalone website chatbot."},"videoType":{"type":"string","enum":["ewebinar"],"nullable":true,"description":"Video platform for webinar agents. ewebinar is the only supported value."},"ewebinarIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true,"description":"eWebinars this agent moderates (ids from list_ewebinar_webinars). Replaces the list: added webinars are linked to the agent in eWebinar and removed ones unlinked. Needs a signed-in person, not an API key."},"escalation":{"discriminator":{"propertyName":"channel"},"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["none"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Chatbot only: the agent never mentions a human and never leaves a note."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_note"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Leave a note: the agent can flag an eWebinar message as needing a reply and leave a moderator note, but never hands off live."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_moderator"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Human hand-off in eWebinar: the agent offers a person and, once the attendee accepts, hands the chat to the webinar's moderators."},{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Address that receives hand-off requests."}},"required":["email"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off by email (standalone widget and API agents)."},{"type":"object","properties":{"channel":{"type":"string","enum":["integration"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1,"description":"Id of the integration that receives hand-offs."}},"required":["integrationId"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off through a connected integration (standalone agents)."}],"description":"How the agent involves people. On an eWebinar turn every hand-off mode (email, integration, or unset) behaves as ewebinar_moderator. Replaced as a whole when set.","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean","nullable":true,"description":"When the agent cannot answer, offer a person (the hand-off happens only if the visitor accepts). Default true."},"autoEscalateOnFrustration":{"type":"boolean","nullable":true,"description":"Offer a person when the visitor sounds frustrated. Default true."},"autoEscalateOnHumanRequest":{"type":"boolean","nullable":true,"description":"Hand off when the visitor asks for a person. Default true."},"autoResolveOnIntent":{"type":"boolean","nullable":true,"description":"Mark the conversation resolved when the visitor signals they are done. Default true."},"autoResolveAfterInactivityEnabled":{"type":"boolean","nullable":true,"description":"Resolve conversations that go quiet. Default true."},"autoResolveAfterInactivityDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true,"description":"Days of inactivity before a conversation is resolved. Default 3."}},"description":"When conversations are escalated or resolved. Merged key by key; null resets a key to its default.","nullable":true},"widget":{"type":"object","properties":{"displayMode":{"type":"string","enum":["button","input"],"nullable":true,"description":"button: a launcher bubble opens the chat. input: an always-visible input bar. Agents linked to eWebinar always use input."},"position":{"type":"string","enum":["bottom-left","bottom-right"],"nullable":true,"description":"Corner the widget sits in."},"primaryColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","nullable":true,"description":"Brand color as a hex value, e.g. #2f4fee."},"widgetTitle":{"type":"string","maxLength":120,"nullable":true,"description":"Title shown in the widget header."},"nameCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's name. Default require. Ignored on eWebinar."},"emailCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's email. Default ask. Ignored on eWebinar."},"visibilityRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable id for the rule (any unique string)."},"type":{"type":"string","enum":["show","hide"],"description":"Show or hide the widget where the rule matches."},"domain":{"type":"string","description":"Domain the rule applies to, e.g. example.com."},"path":{"type":"string","description":"Path prefix the rule applies to, e.g. /pricing. Empty matches every path."}},"required":["id","type","domain","path"]},"nullable":true,"description":"Where the embedded widget shows. Replaced as a whole when set."}},"description":"Standalone website widget appearance and visitor collection. Merged key by key; null resets a key.","nullable":true},"ewebinarMeta":{"type":"object","additionalProperties":{"type":"object","properties":{"webinarId":{"type":"string","description":"Webinar id inside eWebinar."},"title":{"type":"string","description":"Webinar title when it was linked."},"mediaRef":{"description":"Thumbnail reference.","nullable":true}},"required":["webinarId","title"],"additionalProperties":true},"description":"Read-only cache of each linked webinar's title and thumbnail, keyed by eWebinar id."}},"additionalProperties":true,"description":"The agent's stored settings. Keys that were never set are absent and use their default.","nullable":true},"creation_state":{"description":"Setup-wizard progress. Non-null while the agent is still being set up in the editor.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."},"training_status":{"type":"string","enum":["training","trained","none"],"description":"training while sources are still processing, trained once any is ready."},"source_counts":{"type":"object","properties":{"processing":{"type":"number"},"ready":{"type":"number"},"failed":{"type":"number"},"total":{"type":"number"}},"required":["processing","ready","failed","total"],"additionalProperties":true,"description":"Website pages and documents by status."},"attention_count":{"type":"number","description":"Items waiting for review: paused pages and Q&A awaiting approval or an answer."},"lifecycle_summary":{"type":"object","properties":{"active":{"type":"number"},"escalated":{"type":"number"},"resolved":{"type":"number"}},"required":["active","escalated","resolved"],"additionalProperties":true,"description":"Conversation counts by state, excluding test conversations."}},"required":["id","name","goal","website_url","is_active","domain_context","actors","messages","settings","created_at","updated_at","training_status","source_counts","attention_count","lifecycle_summary"],"additionalProperties":true,"description":"An agent."},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_agents"},"post":{"description":"Creates an agent that is ready to use: it gets the default AI persona unless `persona` is given. Agents are capped per plan; at the cap this returns 403 with `code`, `limit` and `used`. Linking eWebinars through `settings.ewebinarIds` needs a signed-in person.\n\n**MCP tool:** `create_agent` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Create an agent","tags":["Agents"],"parameters":[],"operationId":"createAgent","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Agent name shown in eChat."},"goal":{"type":"string","maxLength":20000,"nullable":true,"description":"Instructions: how the agent should behave and respond."},"website_url":{"type":"string","format":"uri","nullable":true,"description":"Website the agent represents."},"domain_context":{"type":"object","properties":{"companyName":{"type":"string","maxLength":200,"nullable":true,"description":"Company or product name the agent represents. null clears it."},"contextText":{"type":"string","maxLength":20000,"nullable":true,"description":"Product summary (markdown): what the product or topic is, in a few paragraphs. The agent reads it on every answer. null clears it."}},"description":"Product context. Merged key by key into the stored context."},"persona":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name the agent introduces itself with, shown on its messages."},"avatar":{"type":"string","format":"uri","nullable":true,"description":"Avatar image URL (PNG, JPEG or WebP). An external image is copied into eChat's storage; on update one that cannot be used is a 400. null restores the default avatar."}},"description":"The agent's persona: the name and avatar visitors see."},"welcome_message":{"type":"string","maxLength":2000,"nullable":true,"description":"First message a new visitor sees in the standalone widget."},"settings":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","fr","de","it","pt","nl","pl","ru","ja","ko","zh","ar","hi","tr","sv","da","no","fi"],"nullable":true,"description":"ISO 639-1 language the agent answers in. Default en."},"chatModel":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"nullable":true,"description":"Model that writes the agent's answers. Each answer costs the model's credit multiplier in message credits: claude-opus-4-8 (Claude 4.8 Opus, 6x), gpt-5.6-sol (GPT-5.6 Sol, 10x), gpt-5.6-terra (GPT-5.6 Terra, 3x), gpt-5.6-luna (GPT-5.6 Luna, 1x), claude-opus-4-6 (Claude 4.6 Opus, 5x), claude-sonnet-4-6 (Claude 4.6 Sonnet, 3x). Default gpt-5.6-terra."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"nullable":true,"description":"How strictly answers are checked against training. creative: never verified. balanced (default): one verification pass that removes contradicted claims. conservative (Strict in the editor): also checks each claim against retrieved evidence and drops what it cannot confirm."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"nullable":true,"description":"eWebinar agents only. covered_so_far (default): answer only from the part of the webinar the viewer has already watched. answer_anytime: answer from the whole transcript."},"useCase":{"type":"string","enum":["sales","customer_success","support"],"nullable":true,"description":"Role the agent's instructions start from (Role in the editor). Changing it does not rewrite existing instructions; set the agent's goal for that."},"chatType":{"type":"string","enum":["webinar","landing_page"],"nullable":true,"description":"webinar: an eWebinar AI moderator. landing_page: a standalone website chatbot."},"videoType":{"type":"string","enum":["ewebinar"],"nullable":true,"description":"Video platform for webinar agents. ewebinar is the only supported value."},"ewebinarIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true,"description":"eWebinars this agent moderates (ids from list_ewebinar_webinars). Replaces the list: added webinars are linked to the agent in eWebinar and removed ones unlinked. Needs a signed-in person, not an API key."},"escalation":{"discriminator":{"propertyName":"channel"},"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["none"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Chatbot only: the agent never mentions a human and never leaves a note."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_note"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Leave a note: the agent can flag an eWebinar message as needing a reply and leave a moderator note, but never hands off live."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_moderator"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Human hand-off in eWebinar: the agent offers a person and, once the attendee accepts, hands the chat to the webinar's moderators."},{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Address that receives hand-off requests."}},"required":["email"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off by email (standalone widget and API agents)."},{"type":"object","properties":{"channel":{"type":"string","enum":["integration"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1,"description":"Id of the integration that receives hand-offs."}},"required":["integrationId"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off through a connected integration (standalone agents)."}],"description":"How the agent involves people. On an eWebinar turn every hand-off mode (email, integration, or unset) behaves as ewebinar_moderator. Replaced as a whole when set.","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean","nullable":true,"description":"When the agent cannot answer, offer a person (the hand-off happens only if the visitor accepts). Default true."},"autoEscalateOnFrustration":{"type":"boolean","nullable":true,"description":"Offer a person when the visitor sounds frustrated. Default true."},"autoEscalateOnHumanRequest":{"type":"boolean","nullable":true,"description":"Hand off when the visitor asks for a person. Default true."},"autoResolveOnIntent":{"type":"boolean","nullable":true,"description":"Mark the conversation resolved when the visitor signals they are done. Default true."},"autoResolveAfterInactivityEnabled":{"type":"boolean","nullable":true,"description":"Resolve conversations that go quiet. Default true."},"autoResolveAfterInactivityDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true,"description":"Days of inactivity before a conversation is resolved. Default 3."}},"description":"When conversations are escalated or resolved. Merged key by key; null resets a key to its default.","nullable":true},"widget":{"type":"object","properties":{"displayMode":{"type":"string","enum":["button","input"],"nullable":true,"description":"button: a launcher bubble opens the chat. input: an always-visible input bar. Agents linked to eWebinar always use input."},"position":{"type":"string","enum":["bottom-left","bottom-right"],"nullable":true,"description":"Corner the widget sits in."},"primaryColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","nullable":true,"description":"Brand color as a hex value, e.g. #2f4fee."},"widgetTitle":{"type":"string","maxLength":120,"nullable":true,"description":"Title shown in the widget header."},"nameCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's name. Default require. Ignored on eWebinar."},"emailCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's email. Default ask. Ignored on eWebinar."},"visibilityRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable id for the rule (any unique string)."},"type":{"type":"string","enum":["show","hide"],"description":"Show or hide the widget where the rule matches."},"domain":{"type":"string","description":"Domain the rule applies to, e.g. example.com."},"path":{"type":"string","description":"Path prefix the rule applies to, e.g. /pricing. Empty matches every path."}},"required":["id","type","domain","path"]},"nullable":true,"description":"Where the embedded widget shows. Replaced as a whole when set."}},"description":"Standalone website widget appearance and visitor collection. Merged key by key; null resets a key.","nullable":true}},"additionalProperties":false,"description":"Settings to change. Omitted keys stay as they are; null resets a key to its default. widget and conversationLifecycle merge key by key; every other key is replaced."},"is_active":{"type":"boolean","description":"Create the agent paused with false. Default true."}},"required":["name"],"description":"The new agent. It is ready to use as created: it gets the default AI persona (named persona.name or the agent name) unless one is given."}}}},"responses":{"201":{"description":"An agent.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Agent id."},"name":{"type":"string","description":"Agent name shown in eChat."},"goal":{"type":"string","description":"Instructions: how the agent should behave and respond (Instructions in the editor).","nullable":true},"website_url":{"type":"string","description":"Website the agent represents.","nullable":true},"is_active":{"type":"boolean","description":"False while the agent is paused.","nullable":true},"domain_context":{"type":"object","properties":{"companyName":{"type":"string","description":"Company or product name."},"contextText":{"type":"string","description":"Product summary (markdown)."}},"additionalProperties":true,"description":"Product context the agent reads on every answer.","nullable":true},"actors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"The agent's persona. The entry with isAI true is the one visitors see.","nullable":true},"messages":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"The first entry's `text` is the welcome message a new visitor sees.","nullable":true},"settings":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","fr","de","it","pt","nl","pl","ru","ja","ko","zh","ar","hi","tr","sv","da","no","fi"],"nullable":true,"description":"ISO 639-1 language the agent answers in. Default en."},"chatModel":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"nullable":true,"description":"Model that writes the agent's answers. Each answer costs the model's credit multiplier in message credits: claude-opus-4-8 (Claude 4.8 Opus, 6x), gpt-5.6-sol (GPT-5.6 Sol, 10x), gpt-5.6-terra (GPT-5.6 Terra, 3x), gpt-5.6-luna (GPT-5.6 Luna, 1x), claude-opus-4-6 (Claude 4.6 Opus, 5x), claude-sonnet-4-6 (Claude 4.6 Sonnet, 3x). Default gpt-5.6-terra."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"nullable":true,"description":"How strictly answers are checked against training. creative: never verified. balanced (default): one verification pass that removes contradicted claims. conservative (Strict in the editor): also checks each claim against retrieved evidence and drops what it cannot confirm."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"nullable":true,"description":"eWebinar agents only. covered_so_far (default): answer only from the part of the webinar the viewer has already watched. answer_anytime: answer from the whole transcript."},"useCase":{"type":"string","enum":["sales","customer_success","support"],"nullable":true,"description":"Role the agent's instructions start from (Role in the editor). Changing it does not rewrite existing instructions; set the agent's goal for that."},"chatType":{"type":"string","enum":["webinar","landing_page"],"nullable":true,"description":"webinar: an eWebinar AI moderator. landing_page: a standalone website chatbot."},"videoType":{"type":"string","enum":["ewebinar"],"nullable":true,"description":"Video platform for webinar agents. ewebinar is the only supported value."},"ewebinarIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true,"description":"eWebinars this agent moderates (ids from list_ewebinar_webinars). Replaces the list: added webinars are linked to the agent in eWebinar and removed ones unlinked. Needs a signed-in person, not an API key."},"escalation":{"discriminator":{"propertyName":"channel"},"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["none"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Chatbot only: the agent never mentions a human and never leaves a note."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_note"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Leave a note: the agent can flag an eWebinar message as needing a reply and leave a moderator note, but never hands off live."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_moderator"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Human hand-off in eWebinar: the agent offers a person and, once the attendee accepts, hands the chat to the webinar's moderators."},{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Address that receives hand-off requests."}},"required":["email"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off by email (standalone widget and API agents)."},{"type":"object","properties":{"channel":{"type":"string","enum":["integration"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1,"description":"Id of the integration that receives hand-offs."}},"required":["integrationId"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off through a connected integration (standalone agents)."}],"description":"How the agent involves people. On an eWebinar turn every hand-off mode (email, integration, or unset) behaves as ewebinar_moderator. Replaced as a whole when set.","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean","nullable":true,"description":"When the agent cannot answer, offer a person (the hand-off happens only if the visitor accepts). Default true."},"autoEscalateOnFrustration":{"type":"boolean","nullable":true,"description":"Offer a person when the visitor sounds frustrated. Default true."},"autoEscalateOnHumanRequest":{"type":"boolean","nullable":true,"description":"Hand off when the visitor asks for a person. Default true."},"autoResolveOnIntent":{"type":"boolean","nullable":true,"description":"Mark the conversation resolved when the visitor signals they are done. Default true."},"autoResolveAfterInactivityEnabled":{"type":"boolean","nullable":true,"description":"Resolve conversations that go quiet. Default true."},"autoResolveAfterInactivityDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true,"description":"Days of inactivity before a conversation is resolved. Default 3."}},"description":"When conversations are escalated or resolved. Merged key by key; null resets a key to its default.","nullable":true},"widget":{"type":"object","properties":{"displayMode":{"type":"string","enum":["button","input"],"nullable":true,"description":"button: a launcher bubble opens the chat. input: an always-visible input bar. Agents linked to eWebinar always use input."},"position":{"type":"string","enum":["bottom-left","bottom-right"],"nullable":true,"description":"Corner the widget sits in."},"primaryColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","nullable":true,"description":"Brand color as a hex value, e.g. #2f4fee."},"widgetTitle":{"type":"string","maxLength":120,"nullable":true,"description":"Title shown in the widget header."},"nameCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's name. Default require. Ignored on eWebinar."},"emailCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's email. Default ask. Ignored on eWebinar."},"visibilityRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable id for the rule (any unique string)."},"type":{"type":"string","enum":["show","hide"],"description":"Show or hide the widget where the rule matches."},"domain":{"type":"string","description":"Domain the rule applies to, e.g. example.com."},"path":{"type":"string","description":"Path prefix the rule applies to, e.g. /pricing. Empty matches every path."}},"required":["id","type","domain","path"]},"nullable":true,"description":"Where the embedded widget shows. Replaced as a whole when set."}},"description":"Standalone website widget appearance and visitor collection. Merged key by key; null resets a key.","nullable":true},"ewebinarMeta":{"type":"object","additionalProperties":{"type":"object","properties":{"webinarId":{"type":"string","description":"Webinar id inside eWebinar."},"title":{"type":"string","description":"Webinar title when it was linked."},"mediaRef":{"description":"Thumbnail reference.","nullable":true}},"required":["webinarId","title"],"additionalProperties":true},"description":"Read-only cache of each linked webinar's title and thumbnail, keyed by eWebinar id."}},"additionalProperties":true,"description":"The agent's stored settings. Keys that were never set are absent and use their default.","nullable":true},"creation_state":{"description":"Setup-wizard progress. Non-null while the agent is still being set up in the editor.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."},"ewebinarSyncErrors":{"type":"array","items":{"type":"object","properties":{"ewebinarId":{"type":"string"},"error":{"type":"string"}},"required":["ewebinarId","error"],"additionalProperties":true},"description":"Present when settings.ewebinarIds could not be linked. The agent was created without them; fix the cause and set ewebinarIds again."},"warnings":{"type":"array","items":{"type":"string"},"description":"Things that did not apply, such as an avatar image that could not be used."}},"required":["id","name","goal","website_url","is_active","domain_context","actors","messages","settings","created_at","updated_at"],"additionalProperties":true,"description":"An agent."}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"create_agent"}},"/agents/{agentId}":{"get":{"description":"The agent's name, instructions, product context, persona, welcome message and settings.\n\n**MCP tool:** `get_agent` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get an agent","tags":["Agents"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"getAgent","responses":{"200":{"description":"An agent.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Agent id."},"name":{"type":"string","description":"Agent name shown in eChat."},"goal":{"type":"string","description":"Instructions: how the agent should behave and respond (Instructions in the editor).","nullable":true},"website_url":{"type":"string","description":"Website the agent represents.","nullable":true},"is_active":{"type":"boolean","description":"False while the agent is paused.","nullable":true},"domain_context":{"type":"object","properties":{"companyName":{"type":"string","description":"Company or product name."},"contextText":{"type":"string","description":"Product summary (markdown)."}},"additionalProperties":true,"description":"Product context the agent reads on every answer.","nullable":true},"actors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"The agent's persona. The entry with isAI true is the one visitors see.","nullable":true},"messages":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"The first entry's `text` is the welcome message a new visitor sees.","nullable":true},"settings":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","fr","de","it","pt","nl","pl","ru","ja","ko","zh","ar","hi","tr","sv","da","no","fi"],"nullable":true,"description":"ISO 639-1 language the agent answers in. Default en."},"chatModel":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"nullable":true,"description":"Model that writes the agent's answers. Each answer costs the model's credit multiplier in message credits: claude-opus-4-8 (Claude 4.8 Opus, 6x), gpt-5.6-sol (GPT-5.6 Sol, 10x), gpt-5.6-terra (GPT-5.6 Terra, 3x), gpt-5.6-luna (GPT-5.6 Luna, 1x), claude-opus-4-6 (Claude 4.6 Opus, 5x), claude-sonnet-4-6 (Claude 4.6 Sonnet, 3x). Default gpt-5.6-terra."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"nullable":true,"description":"How strictly answers are checked against training. creative: never verified. balanced (default): one verification pass that removes contradicted claims. conservative (Strict in the editor): also checks each claim against retrieved evidence and drops what it cannot confirm."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"nullable":true,"description":"eWebinar agents only. covered_so_far (default): answer only from the part of the webinar the viewer has already watched. answer_anytime: answer from the whole transcript."},"useCase":{"type":"string","enum":["sales","customer_success","support"],"nullable":true,"description":"Role the agent's instructions start from (Role in the editor). Changing it does not rewrite existing instructions; set the agent's goal for that."},"chatType":{"type":"string","enum":["webinar","landing_page"],"nullable":true,"description":"webinar: an eWebinar AI moderator. landing_page: a standalone website chatbot."},"videoType":{"type":"string","enum":["ewebinar"],"nullable":true,"description":"Video platform for webinar agents. ewebinar is the only supported value."},"ewebinarIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true,"description":"eWebinars this agent moderates (ids from list_ewebinar_webinars). Replaces the list: added webinars are linked to the agent in eWebinar and removed ones unlinked. Needs a signed-in person, not an API key."},"escalation":{"discriminator":{"propertyName":"channel"},"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["none"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Chatbot only: the agent never mentions a human and never leaves a note."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_note"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Leave a note: the agent can flag an eWebinar message as needing a reply and leave a moderator note, but never hands off live."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_moderator"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Human hand-off in eWebinar: the agent offers a person and, once the attendee accepts, hands the chat to the webinar's moderators."},{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Address that receives hand-off requests."}},"required":["email"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off by email (standalone widget and API agents)."},{"type":"object","properties":{"channel":{"type":"string","enum":["integration"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1,"description":"Id of the integration that receives hand-offs."}},"required":["integrationId"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off through a connected integration (standalone agents)."}],"description":"How the agent involves people. On an eWebinar turn every hand-off mode (email, integration, or unset) behaves as ewebinar_moderator. Replaced as a whole when set.","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean","nullable":true,"description":"When the agent cannot answer, offer a person (the hand-off happens only if the visitor accepts). Default true."},"autoEscalateOnFrustration":{"type":"boolean","nullable":true,"description":"Offer a person when the visitor sounds frustrated. Default true."},"autoEscalateOnHumanRequest":{"type":"boolean","nullable":true,"description":"Hand off when the visitor asks for a person. Default true."},"autoResolveOnIntent":{"type":"boolean","nullable":true,"description":"Mark the conversation resolved when the visitor signals they are done. Default true."},"autoResolveAfterInactivityEnabled":{"type":"boolean","nullable":true,"description":"Resolve conversations that go quiet. Default true."},"autoResolveAfterInactivityDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true,"description":"Days of inactivity before a conversation is resolved. Default 3."}},"description":"When conversations are escalated or resolved. Merged key by key; null resets a key to its default.","nullable":true},"widget":{"type":"object","properties":{"displayMode":{"type":"string","enum":["button","input"],"nullable":true,"description":"button: a launcher bubble opens the chat. input: an always-visible input bar. Agents linked to eWebinar always use input."},"position":{"type":"string","enum":["bottom-left","bottom-right"],"nullable":true,"description":"Corner the widget sits in."},"primaryColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","nullable":true,"description":"Brand color as a hex value, e.g. #2f4fee."},"widgetTitle":{"type":"string","maxLength":120,"nullable":true,"description":"Title shown in the widget header."},"nameCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's name. Default require. Ignored on eWebinar."},"emailCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's email. Default ask. Ignored on eWebinar."},"visibilityRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable id for the rule (any unique string)."},"type":{"type":"string","enum":["show","hide"],"description":"Show or hide the widget where the rule matches."},"domain":{"type":"string","description":"Domain the rule applies to, e.g. example.com."},"path":{"type":"string","description":"Path prefix the rule applies to, e.g. /pricing. Empty matches every path."}},"required":["id","type","domain","path"]},"nullable":true,"description":"Where the embedded widget shows. Replaced as a whole when set."}},"description":"Standalone website widget appearance and visitor collection. Merged key by key; null resets a key.","nullable":true},"ewebinarMeta":{"type":"object","additionalProperties":{"type":"object","properties":{"webinarId":{"type":"string","description":"Webinar id inside eWebinar."},"title":{"type":"string","description":"Webinar title when it was linked."},"mediaRef":{"description":"Thumbnail reference.","nullable":true}},"required":["webinarId","title"],"additionalProperties":true},"description":"Read-only cache of each linked webinar's title and thumbnail, keyed by eWebinar id."}},"additionalProperties":true,"description":"The agent's stored settings. Keys that were never set are absent and use their default.","nullable":true},"creation_state":{"description":"Setup-wizard progress. Non-null while the agent is still being set up in the editor.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","name","goal","website_url","is_active","domain_context","actors","messages","settings","created_at","updated_at"],"additionalProperties":true,"description":"An agent."}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_agent"},"patch":{"description":"Changes the agent's name, instructions, website, product context, persona or welcome message. On an agent linked to eWebinar a persona change is pushed to its webinars first, and a 409 means eWebinar refused it and nothing was saved. Settings have their own route.\n\n**MCP tool:** `update_agent` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Update an agent","tags":["Agents"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"updateAgent","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Agent name shown in eChat."},"goal":{"type":"string","maxLength":20000,"nullable":true,"description":"Instructions: how the agent should behave and respond. null clears them."},"website_url":{"type":"string","format":"uri","nullable":true,"description":"Website the agent represents. null clears it."},"is_active":{"type":"boolean","description":"false pauses the agent; true resumes it."},"domain_context":{"type":"object","properties":{"companyName":{"type":"string","maxLength":200,"nullable":true,"description":"Company or product name the agent represents. null clears it."},"contextText":{"type":"string","maxLength":20000,"nullable":true,"description":"Product summary (markdown): what the product or topic is, in a few paragraphs. The agent reads it on every answer. null clears it."}},"description":"Product context. Merged key by key into the stored context."},"persona":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name the agent introduces itself with, shown on its messages."},"avatar":{"type":"string","format":"uri","nullable":true,"description":"Avatar image URL (PNG, JPEG or WebP). An external image is copied into eChat's storage; on update one that cannot be used is a 400. null restores the default avatar."}},"description":"The agent's persona: the name and avatar visitors see."},"welcome_message":{"type":"string","maxLength":2000,"nullable":true,"description":"First message a new visitor sees in the standalone widget. null removes it."}},"additionalProperties":false,"description":"Fields to change. Omitted fields stay as they are."}}}},"responses":{"200":{"description":"An agent.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Agent id."},"name":{"type":"string","description":"Agent name shown in eChat."},"goal":{"type":"string","description":"Instructions: how the agent should behave and respond (Instructions in the editor).","nullable":true},"website_url":{"type":"string","description":"Website the agent represents.","nullable":true},"is_active":{"type":"boolean","description":"False while the agent is paused.","nullable":true},"domain_context":{"type":"object","properties":{"companyName":{"type":"string","description":"Company or product name."},"contextText":{"type":"string","description":"Product summary (markdown)."}},"additionalProperties":true,"description":"Product context the agent reads on every answer.","nullable":true},"actors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"The agent's persona. The entry with isAI true is the one visitors see.","nullable":true},"messages":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"The first entry's `text` is the welcome message a new visitor sees.","nullable":true},"settings":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","fr","de","it","pt","nl","pl","ru","ja","ko","zh","ar","hi","tr","sv","da","no","fi"],"nullable":true,"description":"ISO 639-1 language the agent answers in. Default en."},"chatModel":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"nullable":true,"description":"Model that writes the agent's answers. Each answer costs the model's credit multiplier in message credits: claude-opus-4-8 (Claude 4.8 Opus, 6x), gpt-5.6-sol (GPT-5.6 Sol, 10x), gpt-5.6-terra (GPT-5.6 Terra, 3x), gpt-5.6-luna (GPT-5.6 Luna, 1x), claude-opus-4-6 (Claude 4.6 Opus, 5x), claude-sonnet-4-6 (Claude 4.6 Sonnet, 3x). Default gpt-5.6-terra."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"nullable":true,"description":"How strictly answers are checked against training. creative: never verified. balanced (default): one verification pass that removes contradicted claims. conservative (Strict in the editor): also checks each claim against retrieved evidence and drops what it cannot confirm."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"nullable":true,"description":"eWebinar agents only. covered_so_far (default): answer only from the part of the webinar the viewer has already watched. answer_anytime: answer from the whole transcript."},"useCase":{"type":"string","enum":["sales","customer_success","support"],"nullable":true,"description":"Role the agent's instructions start from (Role in the editor). Changing it does not rewrite existing instructions; set the agent's goal for that."},"chatType":{"type":"string","enum":["webinar","landing_page"],"nullable":true,"description":"webinar: an eWebinar AI moderator. landing_page: a standalone website chatbot."},"videoType":{"type":"string","enum":["ewebinar"],"nullable":true,"description":"Video platform for webinar agents. ewebinar is the only supported value."},"ewebinarIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true,"description":"eWebinars this agent moderates (ids from list_ewebinar_webinars). Replaces the list: added webinars are linked to the agent in eWebinar and removed ones unlinked. Needs a signed-in person, not an API key."},"escalation":{"discriminator":{"propertyName":"channel"},"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["none"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Chatbot only: the agent never mentions a human and never leaves a note."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_note"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Leave a note: the agent can flag an eWebinar message as needing a reply and leave a moderator note, but never hands off live."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_moderator"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Human hand-off in eWebinar: the agent offers a person and, once the attendee accepts, hands the chat to the webinar's moderators."},{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Address that receives hand-off requests."}},"required":["email"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off by email (standalone widget and API agents)."},{"type":"object","properties":{"channel":{"type":"string","enum":["integration"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1,"description":"Id of the integration that receives hand-offs."}},"required":["integrationId"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off through a connected integration (standalone agents)."}],"description":"How the agent involves people. On an eWebinar turn every hand-off mode (email, integration, or unset) behaves as ewebinar_moderator. Replaced as a whole when set.","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean","nullable":true,"description":"When the agent cannot answer, offer a person (the hand-off happens only if the visitor accepts). Default true."},"autoEscalateOnFrustration":{"type":"boolean","nullable":true,"description":"Offer a person when the visitor sounds frustrated. Default true."},"autoEscalateOnHumanRequest":{"type":"boolean","nullable":true,"description":"Hand off when the visitor asks for a person. Default true."},"autoResolveOnIntent":{"type":"boolean","nullable":true,"description":"Mark the conversation resolved when the visitor signals they are done. Default true."},"autoResolveAfterInactivityEnabled":{"type":"boolean","nullable":true,"description":"Resolve conversations that go quiet. Default true."},"autoResolveAfterInactivityDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true,"description":"Days of inactivity before a conversation is resolved. Default 3."}},"description":"When conversations are escalated or resolved. Merged key by key; null resets a key to its default.","nullable":true},"widget":{"type":"object","properties":{"displayMode":{"type":"string","enum":["button","input"],"nullable":true,"description":"button: a launcher bubble opens the chat. input: an always-visible input bar. Agents linked to eWebinar always use input."},"position":{"type":"string","enum":["bottom-left","bottom-right"],"nullable":true,"description":"Corner the widget sits in."},"primaryColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","nullable":true,"description":"Brand color as a hex value, e.g. #2f4fee."},"widgetTitle":{"type":"string","maxLength":120,"nullable":true,"description":"Title shown in the widget header."},"nameCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's name. Default require. Ignored on eWebinar."},"emailCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's email. Default ask. Ignored on eWebinar."},"visibilityRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable id for the rule (any unique string)."},"type":{"type":"string","enum":["show","hide"],"description":"Show or hide the widget where the rule matches."},"domain":{"type":"string","description":"Domain the rule applies to, e.g. example.com."},"path":{"type":"string","description":"Path prefix the rule applies to, e.g. /pricing. Empty matches every path."}},"required":["id","type","domain","path"]},"nullable":true,"description":"Where the embedded widget shows. Replaced as a whole when set."}},"description":"Standalone website widget appearance and visitor collection. Merged key by key; null resets a key.","nullable":true},"ewebinarMeta":{"type":"object","additionalProperties":{"type":"object","properties":{"webinarId":{"type":"string","description":"Webinar id inside eWebinar."},"title":{"type":"string","description":"Webinar title when it was linked."},"mediaRef":{"description":"Thumbnail reference.","nullable":true}},"required":["webinarId","title"],"additionalProperties":true},"description":"Read-only cache of each linked webinar's title and thumbnail, keyed by eWebinar id."}},"additionalProperties":true,"description":"The agent's stored settings. Keys that were never set are absent and use their default.","nullable":true},"creation_state":{"description":"Setup-wizard progress. Non-null while the agent is still being set up in the editor.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","name","goal","website_url","is_active","domain_context","actors","messages","settings","created_at","updated_at"],"additionalProperties":true,"description":"An agent."}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"update_agent"},"delete":{"description":"Deletes the agent and unlinks it from any eWebinar it moderates. Admins and Creators can delete any agent; other roles only agents they created. Needs a signed-in person: API keys cannot delete agents.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `delete_agent` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete an agent","tags":["Agents"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"deleteAgent","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_agent"}},"/agents/{agentId}/settings":{"get":{"description":"The stored settings, plus `effective`: the values the agent runs with once defaults are applied.\n\n**MCP tool:** `get_agent_settings` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get agent settings","tags":["Agent settings"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"getAgentSettings","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","fr","de","it","pt","nl","pl","ru","ja","ko","zh","ar","hi","tr","sv","da","no","fi"],"nullable":true,"description":"ISO 639-1 language the agent answers in. Default en."},"chatModel":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"nullable":true,"description":"Model that writes the agent's answers. Each answer costs the model's credit multiplier in message credits: claude-opus-4-8 (Claude 4.8 Opus, 6x), gpt-5.6-sol (GPT-5.6 Sol, 10x), gpt-5.6-terra (GPT-5.6 Terra, 3x), gpt-5.6-luna (GPT-5.6 Luna, 1x), claude-opus-4-6 (Claude 4.6 Opus, 5x), claude-sonnet-4-6 (Claude 4.6 Sonnet, 3x). Default gpt-5.6-terra."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"nullable":true,"description":"How strictly answers are checked against training. creative: never verified. balanced (default): one verification pass that removes contradicted claims. conservative (Strict in the editor): also checks each claim against retrieved evidence and drops what it cannot confirm."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"nullable":true,"description":"eWebinar agents only. covered_so_far (default): answer only from the part of the webinar the viewer has already watched. answer_anytime: answer from the whole transcript."},"useCase":{"type":"string","enum":["sales","customer_success","support"],"nullable":true,"description":"Role the agent's instructions start from (Role in the editor). Changing it does not rewrite existing instructions; set the agent's goal for that."},"chatType":{"type":"string","enum":["webinar","landing_page"],"nullable":true,"description":"webinar: an eWebinar AI moderator. landing_page: a standalone website chatbot."},"videoType":{"type":"string","enum":["ewebinar"],"nullable":true,"description":"Video platform for webinar agents. ewebinar is the only supported value."},"ewebinarIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true,"description":"eWebinars this agent moderates (ids from list_ewebinar_webinars). Replaces the list: added webinars are linked to the agent in eWebinar and removed ones unlinked. Needs a signed-in person, not an API key."},"escalation":{"discriminator":{"propertyName":"channel"},"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["none"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Chatbot only: the agent never mentions a human and never leaves a note."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_note"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Leave a note: the agent can flag an eWebinar message as needing a reply and leave a moderator note, but never hands off live."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_moderator"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Human hand-off in eWebinar: the agent offers a person and, once the attendee accepts, hands the chat to the webinar's moderators."},{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Address that receives hand-off requests."}},"required":["email"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off by email (standalone widget and API agents)."},{"type":"object","properties":{"channel":{"type":"string","enum":["integration"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1,"description":"Id of the integration that receives hand-offs."}},"required":["integrationId"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off through a connected integration (standalone agents)."}],"description":"How the agent involves people. On an eWebinar turn every hand-off mode (email, integration, or unset) behaves as ewebinar_moderator. Replaced as a whole when set.","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean","nullable":true,"description":"When the agent cannot answer, offer a person (the hand-off happens only if the visitor accepts). Default true."},"autoEscalateOnFrustration":{"type":"boolean","nullable":true,"description":"Offer a person when the visitor sounds frustrated. Default true."},"autoEscalateOnHumanRequest":{"type":"boolean","nullable":true,"description":"Hand off when the visitor asks for a person. Default true."},"autoResolveOnIntent":{"type":"boolean","nullable":true,"description":"Mark the conversation resolved when the visitor signals they are done. Default true."},"autoResolveAfterInactivityEnabled":{"type":"boolean","nullable":true,"description":"Resolve conversations that go quiet. Default true."},"autoResolveAfterInactivityDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true,"description":"Days of inactivity before a conversation is resolved. Default 3."}},"description":"When conversations are escalated or resolved. Merged key by key; null resets a key to its default.","nullable":true},"widget":{"type":"object","properties":{"displayMode":{"type":"string","enum":["button","input"],"nullable":true,"description":"button: a launcher bubble opens the chat. input: an always-visible input bar. Agents linked to eWebinar always use input."},"position":{"type":"string","enum":["bottom-left","bottom-right"],"nullable":true,"description":"Corner the widget sits in."},"primaryColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","nullable":true,"description":"Brand color as a hex value, e.g. #2f4fee."},"widgetTitle":{"type":"string","maxLength":120,"nullable":true,"description":"Title shown in the widget header."},"nameCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's name. Default require. Ignored on eWebinar."},"emailCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's email. Default ask. Ignored on eWebinar."},"visibilityRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable id for the rule (any unique string)."},"type":{"type":"string","enum":["show","hide"],"description":"Show or hide the widget where the rule matches."},"domain":{"type":"string","description":"Domain the rule applies to, e.g. example.com."},"path":{"type":"string","description":"Path prefix the rule applies to, e.g. /pricing. Empty matches every path."}},"required":["id","type","domain","path"]},"nullable":true,"description":"Where the embedded widget shows. Replaced as a whole when set."}},"description":"Standalone website widget appearance and visitor collection. Merged key by key; null resets a key.","nullable":true},"ewebinarMeta":{"type":"object","additionalProperties":{"type":"object","properties":{"webinarId":{"type":"string","description":"Webinar id inside eWebinar."},"title":{"type":"string","description":"Webinar title when it was linked."},"mediaRef":{"description":"Thumbnail reference.","nullable":true}},"required":["webinarId","title"],"additionalProperties":true},"description":"Read-only cache of each linked webinar's title and thumbnail, keyed by eWebinar id."}},"additionalProperties":true,"description":"The agent's stored settings. Keys that were never set are absent and use their default."},"effective":{"type":"object","properties":{"language":{"type":"string","description":"Language in effect."},"chatModel":{"type":"string","description":"Model in effect."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"description":"Grounding in effect."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"description":"Transcript answer mode in effect."},"escalationChannel":{"type":"string","description":"Escalation channel in effect, or null when unset (hand-off to people).","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean"},"autoEscalateOnFrustration":{"type":"boolean"},"autoEscalateOnHumanRequest":{"type":"boolean"},"requireEscalationConsent":{"type":"boolean"},"autoResolveOnIntent":{"type":"boolean"},"autoResolveAfterInactivityEnabled":{"type":"boolean"},"autoResolveAfterInactivityDays":{"type":"number"}},"required":["autoEscalateOnNoAnswer","autoEscalateOnFrustration","autoEscalateOnHumanRequest","requireEscalationConsent","autoResolveOnIntent","autoResolveAfterInactivityEnabled","autoResolveAfterInactivityDays"],"description":"Lifecycle toggles with defaults applied."}},"required":["language","chatModel","groundingMode","transcriptAnswerMode","escalationChannel","conversationLifecycle"],"additionalProperties":true,"description":"The values the agent actually runs with, defaults included."}},"required":["settings","effective"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_agent_settings"},"patch":{"description":"Omitted keys stay as they are and `null` resets a key to its default. `widget` and `conversationLifecycle` merge key by key; every other key is replaced. Changing `ewebinarIds` links and unlinks the agent in eWebinar first and needs a signed-in person; a 409 means eWebinar refused the change and nothing was saved.\n\n**MCP tool:** `update_agent_settings` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Update agent settings","tags":["Agent settings"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"updateAgentSettings","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","fr","de","it","pt","nl","pl","ru","ja","ko","zh","ar","hi","tr","sv","da","no","fi"],"nullable":true,"description":"ISO 639-1 language the agent answers in. Default en."},"chatModel":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"nullable":true,"description":"Model that writes the agent's answers. Each answer costs the model's credit multiplier in message credits: claude-opus-4-8 (Claude 4.8 Opus, 6x), gpt-5.6-sol (GPT-5.6 Sol, 10x), gpt-5.6-terra (GPT-5.6 Terra, 3x), gpt-5.6-luna (GPT-5.6 Luna, 1x), claude-opus-4-6 (Claude 4.6 Opus, 5x), claude-sonnet-4-6 (Claude 4.6 Sonnet, 3x). Default gpt-5.6-terra."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"nullable":true,"description":"How strictly answers are checked against training. creative: never verified. balanced (default): one verification pass that removes contradicted claims. conservative (Strict in the editor): also checks each claim against retrieved evidence and drops what it cannot confirm."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"nullable":true,"description":"eWebinar agents only. covered_so_far (default): answer only from the part of the webinar the viewer has already watched. answer_anytime: answer from the whole transcript."},"useCase":{"type":"string","enum":["sales","customer_success","support"],"nullable":true,"description":"Role the agent's instructions start from (Role in the editor). Changing it does not rewrite existing instructions; set the agent's goal for that."},"chatType":{"type":"string","enum":["webinar","landing_page"],"nullable":true,"description":"webinar: an eWebinar AI moderator. landing_page: a standalone website chatbot."},"videoType":{"type":"string","enum":["ewebinar"],"nullable":true,"description":"Video platform for webinar agents. ewebinar is the only supported value."},"ewebinarIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true,"description":"eWebinars this agent moderates (ids from list_ewebinar_webinars). Replaces the list: added webinars are linked to the agent in eWebinar and removed ones unlinked. Needs a signed-in person, not an API key."},"escalation":{"discriminator":{"propertyName":"channel"},"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["none"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Chatbot only: the agent never mentions a human and never leaves a note."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_note"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Leave a note: the agent can flag an eWebinar message as needing a reply and leave a moderator note, but never hands off live."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_moderator"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Human hand-off in eWebinar: the agent offers a person and, once the attendee accepts, hands the chat to the webinar's moderators."},{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Address that receives hand-off requests."}},"required":["email"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off by email (standalone widget and API agents)."},{"type":"object","properties":{"channel":{"type":"string","enum":["integration"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1,"description":"Id of the integration that receives hand-offs."}},"required":["integrationId"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off through a connected integration (standalone agents)."}],"description":"How the agent involves people. On an eWebinar turn every hand-off mode (email, integration, or unset) behaves as ewebinar_moderator. Replaced as a whole when set.","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean","nullable":true,"description":"When the agent cannot answer, offer a person (the hand-off happens only if the visitor accepts). Default true."},"autoEscalateOnFrustration":{"type":"boolean","nullable":true,"description":"Offer a person when the visitor sounds frustrated. Default true."},"autoEscalateOnHumanRequest":{"type":"boolean","nullable":true,"description":"Hand off when the visitor asks for a person. Default true."},"autoResolveOnIntent":{"type":"boolean","nullable":true,"description":"Mark the conversation resolved when the visitor signals they are done. Default true."},"autoResolveAfterInactivityEnabled":{"type":"boolean","nullable":true,"description":"Resolve conversations that go quiet. Default true."},"autoResolveAfterInactivityDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true,"description":"Days of inactivity before a conversation is resolved. Default 3."}},"description":"When conversations are escalated or resolved. Merged key by key; null resets a key to its default.","nullable":true},"widget":{"type":"object","properties":{"displayMode":{"type":"string","enum":["button","input"],"nullable":true,"description":"button: a launcher bubble opens the chat. input: an always-visible input bar. Agents linked to eWebinar always use input."},"position":{"type":"string","enum":["bottom-left","bottom-right"],"nullable":true,"description":"Corner the widget sits in."},"primaryColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","nullable":true,"description":"Brand color as a hex value, e.g. #2f4fee."},"widgetTitle":{"type":"string","maxLength":120,"nullable":true,"description":"Title shown in the widget header."},"nameCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's name. Default require. Ignored on eWebinar."},"emailCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's email. Default ask. Ignored on eWebinar."},"visibilityRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable id for the rule (any unique string)."},"type":{"type":"string","enum":["show","hide"],"description":"Show or hide the widget where the rule matches."},"domain":{"type":"string","description":"Domain the rule applies to, e.g. example.com."},"path":{"type":"string","description":"Path prefix the rule applies to, e.g. /pricing. Empty matches every path."}},"required":["id","type","domain","path"]},"nullable":true,"description":"Where the embedded widget shows. Replaced as a whole when set."}},"description":"Standalone website widget appearance and visitor collection. Merged key by key; null resets a key.","nullable":true}},"additionalProperties":false,"description":"Settings to change. Omitted keys stay as they are; null resets a key to its default. widget and conversationLifecycle merge key by key; every other key is replaced."}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","fr","de","it","pt","nl","pl","ru","ja","ko","zh","ar","hi","tr","sv","da","no","fi"],"nullable":true,"description":"ISO 639-1 language the agent answers in. Default en."},"chatModel":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"nullable":true,"description":"Model that writes the agent's answers. Each answer costs the model's credit multiplier in message credits: claude-opus-4-8 (Claude 4.8 Opus, 6x), gpt-5.6-sol (GPT-5.6 Sol, 10x), gpt-5.6-terra (GPT-5.6 Terra, 3x), gpt-5.6-luna (GPT-5.6 Luna, 1x), claude-opus-4-6 (Claude 4.6 Opus, 5x), claude-sonnet-4-6 (Claude 4.6 Sonnet, 3x). Default gpt-5.6-terra."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"nullable":true,"description":"How strictly answers are checked against training. creative: never verified. balanced (default): one verification pass that removes contradicted claims. conservative (Strict in the editor): also checks each claim against retrieved evidence and drops what it cannot confirm."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"nullable":true,"description":"eWebinar agents only. covered_so_far (default): answer only from the part of the webinar the viewer has already watched. answer_anytime: answer from the whole transcript."},"useCase":{"type":"string","enum":["sales","customer_success","support"],"nullable":true,"description":"Role the agent's instructions start from (Role in the editor). Changing it does not rewrite existing instructions; set the agent's goal for that."},"chatType":{"type":"string","enum":["webinar","landing_page"],"nullable":true,"description":"webinar: an eWebinar AI moderator. landing_page: a standalone website chatbot."},"videoType":{"type":"string","enum":["ewebinar"],"nullable":true,"description":"Video platform for webinar agents. ewebinar is the only supported value."},"ewebinarIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true,"description":"eWebinars this agent moderates (ids from list_ewebinar_webinars). Replaces the list: added webinars are linked to the agent in eWebinar and removed ones unlinked. Needs a signed-in person, not an API key."},"escalation":{"discriminator":{"propertyName":"channel"},"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["none"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Chatbot only: the agent never mentions a human and never leaves a note."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_note"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Leave a note: the agent can flag an eWebinar message as needing a reply and leave a moderator note, but never hands off live."},{"type":"object","properties":{"channel":{"type":"string","enum":["ewebinar_moderator"],"description":"Escalation mode."},"settings":{"type":"object","properties":{},"additionalProperties":true,"description":"Always empty."}},"required":["channel"],"description":"Human hand-off in eWebinar: the agent offers a person and, once the attendee accepts, hands the chat to the webinar's moderators."},{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Address that receives hand-off requests."}},"required":["email"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off by email (standalone widget and API agents)."},{"type":"object","properties":{"channel":{"type":"string","enum":["integration"],"description":"Escalation mode."},"settings":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1,"description":"Id of the integration that receives hand-offs."}},"required":["integrationId"],"description":"Where hand-offs go."}},"required":["channel","settings"],"description":"Human hand-off through a connected integration (standalone agents)."}],"description":"How the agent involves people. On an eWebinar turn every hand-off mode (email, integration, or unset) behaves as ewebinar_moderator. Replaced as a whole when set.","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean","nullable":true,"description":"When the agent cannot answer, offer a person (the hand-off happens only if the visitor accepts). Default true."},"autoEscalateOnFrustration":{"type":"boolean","nullable":true,"description":"Offer a person when the visitor sounds frustrated. Default true."},"autoEscalateOnHumanRequest":{"type":"boolean","nullable":true,"description":"Hand off when the visitor asks for a person. Default true."},"autoResolveOnIntent":{"type":"boolean","nullable":true,"description":"Mark the conversation resolved when the visitor signals they are done. Default true."},"autoResolveAfterInactivityEnabled":{"type":"boolean","nullable":true,"description":"Resolve conversations that go quiet. Default true."},"autoResolveAfterInactivityDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true,"description":"Days of inactivity before a conversation is resolved. Default 3."}},"description":"When conversations are escalated or resolved. Merged key by key; null resets a key to its default.","nullable":true},"widget":{"type":"object","properties":{"displayMode":{"type":"string","enum":["button","input"],"nullable":true,"description":"button: a launcher bubble opens the chat. input: an always-visible input bar. Agents linked to eWebinar always use input."},"position":{"type":"string","enum":["bottom-left","bottom-right"],"nullable":true,"description":"Corner the widget sits in."},"primaryColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","nullable":true,"description":"Brand color as a hex value, e.g. #2f4fee."},"widgetTitle":{"type":"string","maxLength":120,"nullable":true,"description":"Title shown in the widget header."},"nameCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's name. Default require. Ignored on eWebinar."},"emailCollectionMode":{"type":"string","enum":["none","ask","require"],"nullable":true,"description":"Whether the widget asks for the visitor's email. Default ask. Ignored on eWebinar."},"visibilityRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable id for the rule (any unique string)."},"type":{"type":"string","enum":["show","hide"],"description":"Show or hide the widget where the rule matches."},"domain":{"type":"string","description":"Domain the rule applies to, e.g. example.com."},"path":{"type":"string","description":"Path prefix the rule applies to, e.g. /pricing. Empty matches every path."}},"required":["id","type","domain","path"]},"nullable":true,"description":"Where the embedded widget shows. Replaced as a whole when set."}},"description":"Standalone website widget appearance and visitor collection. Merged key by key; null resets a key.","nullable":true},"ewebinarMeta":{"type":"object","additionalProperties":{"type":"object","properties":{"webinarId":{"type":"string","description":"Webinar id inside eWebinar."},"title":{"type":"string","description":"Webinar title when it was linked."},"mediaRef":{"description":"Thumbnail reference.","nullable":true}},"required":["webinarId","title"],"additionalProperties":true},"description":"Read-only cache of each linked webinar's title and thumbnail, keyed by eWebinar id."}},"additionalProperties":true,"description":"The agent's stored settings. Keys that were never set are absent and use their default."},"effective":{"type":"object","properties":{"language":{"type":"string","description":"Language in effect."},"chatModel":{"type":"string","description":"Model in effect."},"groundingMode":{"type":"string","enum":["creative","balanced","conservative"],"description":"Grounding in effect."},"transcriptAnswerMode":{"type":"string","enum":["covered_so_far","answer_anytime"],"description":"Transcript answer mode in effect."},"escalationChannel":{"type":"string","description":"Escalation channel in effect, or null when unset (hand-off to people).","nullable":true},"conversationLifecycle":{"type":"object","properties":{"autoEscalateOnNoAnswer":{"type":"boolean"},"autoEscalateOnFrustration":{"type":"boolean"},"autoEscalateOnHumanRequest":{"type":"boolean"},"requireEscalationConsent":{"type":"boolean"},"autoResolveOnIntent":{"type":"boolean"},"autoResolveAfterInactivityEnabled":{"type":"boolean"},"autoResolveAfterInactivityDays":{"type":"number"}},"required":["autoEscalateOnNoAnswer","autoEscalateOnFrustration","autoEscalateOnHumanRequest","requireEscalationConsent","autoResolveOnIntent","autoResolveAfterInactivityEnabled","autoResolveAfterInactivityDays"],"description":"Lifecycle toggles with defaults applied."}},"required":["language","chatModel","groundingMode","transcriptAnswerMode","escalationChannel","conversationLifecycle"],"additionalProperties":true,"description":"The values the agent actually runs with, defaults included."}},"required":["settings","effective"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"update_agent_settings"}},"/agents/{agentId}/qa":{"get":{"description":"Q&A pairs of every status, with filters for the review queue.\n\n**MCP tool:** `list_qa_pairs` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List Q&A pairs","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"status","in":"query","description":"Comma-separated statuses to include: published, proposed, proposed_update, needs_answer, not_needed. Default all.","schema":{"type":"string"}},{"name":"sourceId","in":"query","description":"Only proposals from this conversation source (from list_conversation_sources).","schema":{"type":"string","format":"uuid"}},{"name":"importId","in":"query","description":"Only pairs created by this Q&A import.","schema":{"type":"string","format":"uuid"}},{"name":"search","in":"query","description":"Match against titles, questions and answers.","schema":{"type":"string","maxLength":200}},{"name":"sortBy","in":"query","description":"confidence: proposals first, most confident first. Default: oldest first.","schema":{"type":"string","enum":["confidence"]}},{"name":"excludeChatProposals","in":"query","description":"Leave out proposals from imported conversations.","schema":{"type":"string","enum":["true","false"]}},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size, 1-200. Default 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listQaPairs","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Q&A pair id."},"title":{"type":"string","description":"Display title, usually the first question.","nullable":true},"content":{"type":"string","description":"The answer.","nullable":true},"qa_status":{"type":"string","enum":["published","proposed","proposed_update","needs_answer","not_needed"],"description":"Review status (see the section description)."},"source_type":{"type":"string","description":"qa for pairs people wrote or approved; chat for proposals from imported conversations.","nullable":true},"source_id":{"type":"string","description":"The conversation source a proposal came from.","nullable":true},"metadata":{"type":"object","properties":{"qa":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"},"description":"The questions."}},"additionalProperties":true}},"additionalProperties":true,"description":"Questions under `qa.questions`, plus review details for proposals.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","qa_status","source_type","source_id","metadata","created_at"],"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_qa_pairs"},"post":{"description":"Adds a published Q&A pair the agent answers from immediately. Counts toward the account's training storage; 403 when storage is full.\n\n**MCP tool:** `create_qa_pair` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Create a Q&A pair","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"createQaPair","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"minItems":1,"maxItems":50,"description":"Ways a visitor might ask this question. One pair answers all of them, so list only questions this exact answer fully answers."},"answer":{"type":"string","minLength":1,"maxLength":20000,"description":"The answer the agent should give (markdown)."},"title":{"type":"string","maxLength":200,"description":"Display title. Defaults to the first question."}},"required":["questions","answer"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Q&A pair id."},"title":{"type":"string","description":"Display title, usually the first question.","nullable":true},"content":{"type":"string","description":"The answer.","nullable":true},"qa_status":{"type":"string","enum":["published","proposed","proposed_update","needs_answer","not_needed"],"description":"Review status (see the section description)."},"source_type":{"type":"string","description":"qa for pairs people wrote or approved; chat for proposals from imported conversations.","nullable":true},"source_id":{"type":"string","description":"The conversation source a proposal came from.","nullable":true},"metadata":{"type":"object","properties":{"qa":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"},"description":"The questions."}},"additionalProperties":true}},"additionalProperties":true,"description":"Questions under `qa.questions`, plus review details for proposals.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","qa_status","source_type","source_id","metadata","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"create_qa_pair"}},"/agents/{agentId}/qa/unanswered":{"get":{"description":"Questions from imported conversations that nobody answered (status needs_answer), newest first.\n\n**MCP tool:** `list_unanswered_questions` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List unanswered questions","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size, 1-200. Default 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listUnansweredQuestions","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Q&A pair id."},"title":{"type":"string","description":"Display title, usually the first question.","nullable":true},"content":{"type":"string","description":"The answer.","nullable":true},"qa_status":{"type":"string","enum":["published","proposed","proposed_update","needs_answer","not_needed"],"description":"Review status (see the section description)."},"source_type":{"type":"string","description":"qa for pairs people wrote or approved; chat for proposals from imported conversations.","nullable":true},"source_id":{"type":"string","description":"The conversation source a proposal came from.","nullable":true},"metadata":{"type":"object","properties":{"qa":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"},"description":"The questions."}},"additionalProperties":true}},"additionalProperties":true,"description":"Questions under `qa.questions`, plus review details for proposals.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","qa_status","source_type","source_id","metadata","created_at"],"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_unanswered_questions"}},"/agents/{agentId}/qa/answer":{"post":{"description":"Publishes the answer, turning the question into a published Q&A pair.\n\n**MCP tool:** `answer_unanswered_question` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Answer an unanswered question","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"answerUnansweredQuestion","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","description":"Id of the unanswered question (a needs_answer Q&A pair)."},"answer":{"type":"string","minLength":1,"maxLength":20000,"description":"The answer to publish."}},"required":["documentId","answer"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"answer_unanswered_question"}},"/agents/{agentId}/qa/dismiss-unanswered":{"post":{"description":"Deletes a question that does not need an answer.\n\n**MCP tool:** `dismiss_unanswered_question` (permission: Delete agents, training, chat logs and eval data).","summary":"Dismiss an unanswered question","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"dismissUnansweredQuestion","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","description":"Id of the unanswered question to dismiss."}},"required":["documentId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"dismiss_unanswered_question"}},"/agents/{agentId}/qa/{qaId}":{"get":{"description":"One Q&A pair with its questions, answer, status and review details.\n\n**MCP tool:** `get_qa_pair` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get a Q&A pair","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A pair id (from list_qa_pairs)."}],"operationId":"getQaPair","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Q&A pair id."},"title":{"type":"string","description":"Display title, usually the first question.","nullable":true},"content":{"type":"string","description":"The answer.","nullable":true},"qa_status":{"type":"string","enum":["published","proposed","proposed_update","needs_answer","not_needed"],"description":"Review status (see the section description)."},"source_type":{"type":"string","description":"qa for pairs people wrote or approved; chat for proposals from imported conversations.","nullable":true},"source_id":{"type":"string","description":"The conversation source a proposal came from.","nullable":true},"metadata":{"type":"object","properties":{"qa":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"},"description":"The questions."}},"additionalProperties":true}},"additionalProperties":true,"description":"Questions under `qa.questions`, plus review details for proposals.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","qa_status","source_type","source_id","metadata","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_qa_pair"},"put":{"description":"Changes the questions, answer or title. Omitted fields stay as they are.\n\n**MCP tool:** `update_qa_pair` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Update a Q&A pair","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A pair id (from list_qa_pairs)."}],"operationId":"updateQaPair","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"minItems":1,"maxItems":50,"description":"Ways a visitor might ask this question. One pair answers all of them, so list only questions this exact answer fully answers."},"answer":{"type":"string","minLength":1,"maxLength":20000,"description":"New answer."},"title":{"type":"string","maxLength":200,"description":"New display title."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Q&A pair id."},"title":{"type":"string","description":"Display title, usually the first question.","nullable":true},"content":{"type":"string","description":"The answer.","nullable":true},"qa_status":{"type":"string","enum":["published","proposed","proposed_update","needs_answer","not_needed"],"description":"Review status (see the section description)."},"source_type":{"type":"string","description":"qa for pairs people wrote or approved; chat for proposals from imported conversations.","nullable":true},"source_id":{"type":"string","description":"The conversation source a proposal came from.","nullable":true},"metadata":{"type":"object","properties":{"qa":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"},"description":"The questions."}},"additionalProperties":true}},"additionalProperties":true,"description":"Questions under `qa.questions`, plus review details for proposals.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","qa_status","source_type","source_id","metadata","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"update_qa_pair"},"delete":{"description":"Removes the pair from the agent's training.\n\n**MCP tool:** `delete_qa_pair` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete a Q&A pair","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A pair id (from list_qa_pairs)."}],"operationId":"deleteQaPair","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_qa_pair"}},"/agents/{agentId}/qa/{qaId}/approve":{"post":{"description":"Publishes a proposal (or applies a proposed update to a published pair), optionally with an edited answer or questions. 400 when the pair is not awaiting review.\n\n**MCP tool:** `approve_qa_pair` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Approve a proposed Q&A pair","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A pair id (from list_qa_pairs)."}],"operationId":"approveQaPair","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","minLength":1,"maxLength":20000,"description":"Publish this answer instead of the proposed one."},"questions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"minItems":1,"maxItems":50,"description":"Ways a visitor might ask this question. One pair answers all of them, so list only questions this exact answer fully answers."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Q&A pair id."},"title":{"type":"string","description":"Display title, usually the first question.","nullable":true},"content":{"type":"string","description":"The answer.","nullable":true},"qa_status":{"type":"string","enum":["published","proposed","proposed_update","needs_answer","not_needed"],"description":"Review status (see the section description)."},"source_type":{"type":"string","description":"qa for pairs people wrote or approved; chat for proposals from imported conversations.","nullable":true},"source_id":{"type":"string","description":"The conversation source a proposal came from.","nullable":true},"metadata":{"type":"object","properties":{"qa":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"},"description":"The questions."}},"additionalProperties":true}},"additionalProperties":true,"description":"Questions under `qa.questions`, plus review details for proposals.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","qa_status","source_type","source_id","metadata","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"approve_qa_pair"}},"/agents/{agentId}/qa/{qaId}/reject":{"post":{"description":"Dismisses a proposal; a rejected proposed update leaves the published answer as it was.\n\n**MCP tool:** `reject_qa_pair` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Reject a proposed Q&A pair","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A pair id (from list_qa_pairs)."}],"operationId":"rejectQaPair","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"rejected":{"type":"boolean","enum":[true]}},"required":["rejected"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"reject_qa_pair"}},"/agents/{agentId}/qa/{qaId}/restore":{"post":{"description":"Returns a not_needed pair to the review queue.\n\n**MCP tool:** `restore_qa_pair` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Restore a not-needed Q&A pair","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A pair id (from list_qa_pairs)."}],"operationId":"restoreQaPair","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Q&A pair id."},"title":{"type":"string","description":"Display title, usually the first question.","nullable":true},"content":{"type":"string","description":"The answer.","nullable":true},"qa_status":{"type":"string","enum":["published","proposed","proposed_update","needs_answer","not_needed"],"description":"Review status (see the section description)."},"source_type":{"type":"string","description":"qa for pairs people wrote or approved; chat for proposals from imported conversations.","nullable":true},"source_id":{"type":"string","description":"The conversation source a proposal came from.","nullable":true},"metadata":{"type":"object","properties":{"qa":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"},"description":"The questions."}},"additionalProperties":true}},"additionalProperties":true,"description":"Questions under `qa.questions`, plus review details for proposals.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","qa_status","source_type","source_id","metadata","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"restore_qa_pair"}},"/agents/{agentId}/qa/{qaId}/suggest-answer":{"get":{"description":"Reads a requested answer review without starting one or spending credits.\n\n**MCP tool:** `get_qa_answer_suggestion` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get an answer suggestion's status","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A pair id (from list_qa_pairs)."}],"operationId":"getQaAnswerSuggestion","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["draft","already_answered","insufficient","in_progress","review_gone"],"description":"Where the answer review stands."},"suggestedAnswer":{"type":"string","description":"The drafted answer, when outcome is draft."},"reason":{"type":"string"}},"required":["outcome"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"410":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_qa_answer_suggestion"},"post":{"description":"Drafts an answer to a needs_answer question from the agent's training, or moves it to not_needed when training already answers it. Spends one message credit when AI work runs; 402 when credits are exhausted, 422 when training cannot support an answer, 423 while another suggestion for it is running.\n\n**MCP tool:** `suggest_qa_answer` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Suggest an answer for an unanswered question","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A pair id (from list_qa_pairs)."}],"operationId":"suggestQaAnswer","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["draft","already_answered"],"description":"draft: a suggested answer; already_answered: training covers it."},"suggestedAnswer":{"type":"string","description":"The drafted answer, when outcome is draft."},"reason":{"type":"string"}},"required":["outcome"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"402":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"422":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"423":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"suggest_qa_answer"}},"/agents/{agentId}/qa/bulk-approve":{"post":{"description":"Approves the given proposals, or every pending proposal from a conversation source.\n\n**MCP tool:** `bulk_approve_qa_pairs` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Approve Q&A pairs in bulk","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"bulkApproveQaPairs","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500,"description":"Q&A pair ids to approve."},"sourceId":{"type":"string","format":"uuid","description":"Approve every pending proposal from this conversation source (used when ids is empty)."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ok":{"type":"boolean","description":"False when the pair was not found or not awaiting review."},"error":{"type":"string"}},"required":["id","ok"],"additionalProperties":true},"description":"One entry per id."}},"required":["results"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"bulk_approve_qa_pairs"}},"/agents/{agentId}/qa/bulk-reject":{"post":{"description":"Rejects the given proposals, or every matching one from a conversation source.\n\n**MCP tool:** `bulk_reject_qa_pairs` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Reject Q&A pairs in bulk","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"bulkRejectQaPairs","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500,"description":"Q&A pair ids to reject."},"sourceId":{"type":"string","format":"uuid","description":"Reject every matching proposal from this conversation source (used when ids is empty)."},"statuses":{"type":"array","items":{"type":"string","enum":["proposed","proposed_update","needs_answer"]},"minItems":1,"description":"With sourceId: which review statuses to reject. Default all three."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ok":{"type":"boolean","description":"False when the pair was not found or not awaiting review."},"error":{"type":"string"}},"required":["id","ok"],"additionalProperties":true},"description":"One entry per id."}},"required":["results"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"bulk_reject_qa_pairs"}},"/agents/{agentId}/qa/bulk-delete-not-needed":{"post":{"description":"Permanently removes a conversation source's not_needed pairs. Review and published pairs stay.\n\n**MCP tool:** `delete_not_needed_qa_pairs` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete not-needed Q&A pairs","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"bulkDeleteNotNeededQaPairs","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","format":"uuid","description":"Conversation source whose not_needed pairs to delete."}},"required":["sourceId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number","description":"Pairs deleted."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_not_needed_qa_pairs"}},"/agents/{agentId}/qa/bulk-delete":{"post":{"description":"Removes all of the agent's published Q&A pairs. Cannot be undone.\n\n**MCP tool:** `delete_all_published_qa_pairs` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete every published Q&A pair","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"deleteAllPublishedQaPairs","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number","description":"Pairs deleted."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_all_published_qa_pairs"}},"/agents/{agentId}/qa/imports/upload-url":{"post":{"description":"Step one of a file import: PUT the file to `uploadUrl`, then call create Q&A import with the `s3Key`.\n\n**MCP tool:** `create_qa_import_upload_url` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Get a Q&A file upload URL","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"createQaImportUploadUrl","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"File name including extension: .csv, .xlsx or .json."},"mimeType":{"type":"string","maxLength":200,"description":"The file's MIME type."}},"required":["fileName"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"Presigned URL. PUT the file bytes to it within an hour."},"s3Key":{"type":"string","description":"Pass to create_qa_import once the upload finishes."}},"required":["uploadUrl","s3Key"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"create_qa_import_upload_url"}},"/agents/{agentId}/qa/imports":{"post":{"description":"Starts a Q&A import from pasted content or an uploaded file. Matching files publish directly; other shapes are converted first. Poll the import for progress.\n\n**MCP tool:** `create_qa_import` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Import Q&A from a file","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"createQaImport","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","maxLength":2000000,"description":"File content pasted directly (JSON or CSV text). Preferred JSON: an array of { title?, questions: string[], answer }."},"s3Key":{"type":"string","maxLength":1000,"description":"Key from create_qa_import_upload_url, after uploading."},"fileName":{"type":"string","maxLength":255,"description":"File name with extension (.json, .csv, .xlsx); decides how content is parsed. Default pasted.json."},"name":{"type":"string","maxLength":255,"description":"Name shown on the import card."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Import id."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"create_qa_import"},"get":{"description":"The agent's 20 most recent Q&A imports, newest first.\n\n**MCP tool:** `list_qa_imports` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List Q&A imports","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"listQaImports","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Import id."},"name":{"type":"string","nullable":true,"description":"File or import name."},"status":{"type":"string","description":"pending, processing, completed or failed."}},"required":["id","status"],"additionalProperties":true},"description":"Every result."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_qa_imports"}},"/agents/{agentId}/qa/imports/{importId}":{"get":{"description":"Status and counts for one import.\n\n**MCP tool:** `get_qa_import` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get a Q&A import","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"importId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A import id (from list_qa_imports)."}],"operationId":"getQaImport","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Import id."},"name":{"type":"string","nullable":true,"description":"File or import name."},"status":{"type":"string","description":"pending, processing, completed or failed."}},"required":["id","status"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_qa_import"},"delete":{"description":"Removes the import record. Pairs it already created stay.\n\n**MCP tool:** `delete_qa_import` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete a Q&A import","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"importId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A import id (from list_qa_imports)."}],"operationId":"deleteQaImport","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_qa_import"}},"/agents/{agentId}/qa/imports/{importId}/retry":{"post":{"description":"Runs a failed import again.\n\n**MCP tool:** `retry_qa_import` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Retry a Q&A import","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"importId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Q&A import id (from list_qa_imports)."}],"operationId":"retryQaImport","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"retry_qa_import"}},"/agents/{agentId}/qa/ewebinar-saved-replies":{"get":{"description":"How many of the team's eWebinar saved replies an import would bring in. Acts through the person's eWebinar connection.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `preview_ewebinar_saved_replies_import` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Preview eWebinar saved replies","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"previewSavedRepliesImport","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"preview_ewebinar_saved_replies_import"}},"/agents/{agentId}/qa/imports/ewebinar-saved-replies":{"post":{"description":"Imports the team's eWebinar saved replies as proposed Q&A for review (or resets the existing saved-replies import). Acts through the person's eWebinar connection.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `import_ewebinar_saved_replies` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Import eWebinar saved replies","tags":["Q&A"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"importSavedReplies","responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Import id."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"import_ewebinar_saved_replies"}},"/agents/{agentId}/sources/counts":{"get":{"description":"Websites, documents and quick docs by status.\n\n**MCP tool:** `get_training_counts` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Count training sources","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"getTrainingCounts","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_training_counts"}},"/agents/{agentId}/sources/attention":{"get":{"description":"Paused website pages, proposals waiting for review and unanswered questions.\n\n**MCP tool:** `get_training_attention` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Count training items needing attention","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"getTrainingAttention","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_training_attention"}},"/agents/{agentId}/knowledge-documents":{"get":{"description":"The documents the agent retrieves from, as indexed from every source, newest first.\n\n**MCP tool:** `list_knowledge_documents` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List indexed documents","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"sourceId","in":"query","description":"Only documents produced by this source.","schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size, 1-500. Default 100.","schema":{"type":"integer","minimum":1,"maximum":500}}],"operationId":"listKnowledgeDocuments","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source_type":{"type":"string","description":"website, document, snippet, qa, chat or transcript."},"source_id":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"source_url":{"type":"string","nullable":true}},"required":["id","source_type","source_id","title"],"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_knowledge_documents"}},"/agents/{agentId}/snippets":{"get":{"description":"Typed markdown notes the agent trains on, newest first.\n\n**MCP tool:** `list_quick_docs` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List quick docs","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size, 1-200. Default 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listQuickDocs","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","description":"Title.","nullable":true},"content":{"type":"string","description":"Markdown content.","nullable":true},"status":{"type":"string","description":"pending, processing (or crawling), ready, failed or paused."},"error_message":{"type":"string","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","status","created_at"],"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_quick_docs"},"post":{"description":"Adds a markdown note to the agent's training; it is indexed in the background.\n\n**MCP tool:** `create_quick_doc` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Create a quick doc","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"createQuickDoc","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"description":"Title."},"content":{"type":"string","minLength":1,"maxLength":200000,"description":"Markdown content the agent should know."}},"required":["content"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","description":"Title.","nullable":true},"content":{"type":"string","description":"Markdown content.","nullable":true},"status":{"type":"string","description":"pending, processing (or crawling), ready, failed or paused."},"error_message":{"type":"string","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","status","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"create_quick_doc"}},"/agents/{agentId}/snippets/{quickDocId}":{"get":{"description":"One quick doc with its content and indexing status.\n\n**MCP tool:** `get_quick_doc` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get a quick doc","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"quickDocId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Quick doc id."}],"operationId":"getQuickDoc","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","description":"Title.","nullable":true},"content":{"type":"string","description":"Markdown content.","nullable":true},"status":{"type":"string","description":"pending, processing (or crawling), ready, failed or paused."},"error_message":{"type":"string","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","title","content","status","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_quick_doc"},"put":{"description":"Changes the title or content and re-indexes it.\n\n**MCP tool:** `update_quick_doc` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Update a quick doc","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"quickDocId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Quick doc id."}],"operationId":"updateQuickDoc","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"description":"New title."},"content":{"type":"string","minLength":1,"maxLength":200000,"description":"New markdown content."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"boolean","enum":[true]}},"required":["updated"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"update_quick_doc"},"delete":{"description":"Removes the quick doc from the agent's training.\n\n**MCP tool:** `delete_quick_doc` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete a quick doc","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"quickDocId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Quick doc id."}],"operationId":"deleteQuickDoc","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_quick_doc"}},"/agents/{agentId}/sources/documents":{"get":{"description":"Uploaded files the agent trains on.\n\n**MCP tool:** `list_documents` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List documents","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size, 1-200. Default 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listDocuments","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"File name.","nullable":true},"mime_type":{"type":"string","nullable":true},"status":{"type":"string","description":"pending, processing (or crawling), ready, failed or paused."},"error_message":{"type":"string","nullable":true},"size_bytes":{"oneOf":[{"type":"number"},{"type":"string"}],"nullable":true,"description":"File size."},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","name","status","created_at"],"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_documents"},"post":{"description":"Starts processing an uploaded file into training.\n\n**MCP tool:** `register_uploaded_document` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Register an uploaded document","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"registerUploadedDocument","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"s3Key":{"type":"string","minLength":1,"maxLength":1000,"description":"Key from create_document_upload_url, after uploading."},"fileName":{"type":"string","maxLength":255,"description":"File name to show. Defaults to the key's file name."},"mimeType":{"type":"string","maxLength":200,"description":"The file's MIME type."}},"required":["s3Key"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id of the new source."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"register_uploaded_document"}},"/agents/{agentId}/sources/documents/upload-url":{"post":{"description":"Step one of a document upload: PUT the file to `uploadUrl`, then register it with the `s3Key`.\n\n**MCP tool:** `create_document_upload_url` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Get a document upload URL","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"createDocumentUploadUrl","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"File name including extension (PDF, DOCX, TXT, MD, CSV, XLSX and similar; legacy .doc is not supported)."},"mimeType":{"type":"string","maxLength":200,"description":"The file's MIME type; sent as the upload's Content-Type."}},"required":["fileName"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"Presigned URL. PUT the file bytes to it within an hour."},"s3Key":{"type":"string","description":"Pass to the register step once the upload finishes."}},"required":["uploadUrl","s3Key"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"create_document_upload_url"}},"/agents/{agentId}/sources/documents/{documentId}":{"get":{"description":"One document's status and the indexed content extracted from it.\n\n**MCP tool:** `get_document` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get a document","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document id."}],"operationId":"getDocument","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"File name.","nullable":true},"mime_type":{"type":"string","nullable":true},"status":{"type":"string","description":"pending, processing (or crawling), ready, failed or paused."},"error_message":{"type":"string","nullable":true},"size_bytes":{"oneOf":[{"type":"number"},{"type":"string"}],"nullable":true,"description":"File size."},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","name","status","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_document"},"delete":{"description":"Removes the document and what was indexed from it.\n\n**MCP tool:** `delete_document` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete a document","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document id."}],"operationId":"deleteDocument","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_document"}},"/agents/{agentId}/sources/scan":{"post":{"description":"Lists the pages a crawl would find, grouped by path, without adding anything.\n\n**MCP tool:** `scan_website` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Scan a website","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"scanWebsite","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Website or sitemap URL to scan."},"mode":{"type":"string","enum":["crawl","sitemap","single_url"],"description":"crawl (default) follows links; sitemap reads a sitemap; single_url is one page."}},"required":["url"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"},"description":"URLs found."},"totalUrls":{"type":"number"},"pathBreakdown":{"type":"array","items":{"type":"object","properties":{"prefix":{"type":"string"},"count":{"type":"number"},"sample":{"type":"array","items":{"type":"string"}}},"required":["prefix","count","sample"],"additionalProperties":true},"description":"URL counts by first path segment, to choose include and exclude paths."}},"required":["urls","totalUrls","pathBreakdown"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"scan_website"}},"/agents/{agentId}/sources/websites":{"get":{"description":"Websites the agent trains on.\n\n**MCP tool:** `list_website_sources` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List website sources","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size, 1-200. Default 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listWebsiteSources","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"Start URL."},"source_name":{"type":"string","nullable":true},"source_mode":{"type":"string","nullable":true,"description":"crawl, sitemap or single_url."},"status":{"type":"string","description":"pending, processing (or crawling), ready, failed or paused."},"error_message":{"type":"string","nullable":true},"recrawl_interval":{"type":"string","nullable":true,"description":"weekly, biweekly, monthly or null."},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","url","status","created_at"],"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_website_sources"},"post":{"description":"Starts crawling a website into the agent's training.\n\n**MCP tool:** `create_website_source` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Add a website source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"createWebsiteSource","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Start URL (or sitemap URL in sitemap mode)."},"mode":{"type":"string","enum":["crawl","sitemap","single_url"],"description":"crawl follows links from the URL; sitemap reads a sitemap; single_url indexes one page."},"name":{"type":"string","maxLength":200,"description":"Name shown in eChat."},"includePaths":{"type":"array","items":{"type":"string"},"description":"Only crawl URLs under these path prefixes, e.g. [\"/docs\"]."},"excludePaths":{"type":"array","items":{"type":"string"},"description":"Skip URLs under these path prefixes."},"maxPages":{"type":"integer","minimum":1,"maximum":10000,"description":"Page limit for the crawl. Default 20."},"slowScrape":{"type":"boolean","description":"Crawl more slowly for sites that block fast crawlers or render with JavaScript."},"recrawlInterval":{"type":"string","enum":["weekly","biweekly","monthly"],"nullable":true,"description":"Re-crawl on this schedule to pick up changes. null or omitted: never."},"discoveredUrls":{"type":"array","items":{"type":"string"},"description":"URLs from scan_website to crawl, instead of discovering them again."}},"required":["url","mode"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"Start URL."},"source_name":{"type":"string","nullable":true},"source_mode":{"type":"string","nullable":true,"description":"crawl, sitemap or single_url."},"status":{"type":"string","description":"pending, processing (or crawling), ready, failed or paused."},"error_message":{"type":"string","nullable":true},"recrawl_interval":{"type":"string","nullable":true,"description":"weekly, biweekly, monthly or null."},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","url","status","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"create_website_source"}},"/agents/{agentId}/sources/websites/{websiteId}":{"get":{"description":"Crawl settings, status, the latest crawl job and a preview of the URL inventory.\n\n**MCP tool:** `get_website_source` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get a website source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Website source id."}],"operationId":"getWebsiteSource","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"Start URL."},"source_name":{"type":"string","nullable":true},"source_mode":{"type":"string","nullable":true,"description":"crawl, sitemap or single_url."},"status":{"type":"string","description":"pending, processing (or crawling), ready, failed or paused."},"error_message":{"type":"string","nullable":true},"recrawl_interval":{"type":"string","nullable":true,"description":"weekly, biweekly, monthly or null."},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","url","status","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_website_source"},"put":{"description":"Changes crawl settings; pass `recrawl: true` to apply them now.\n\n**MCP tool:** `update_website_source` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Update a website source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Website source id."}],"operationId":"updateWebsiteSource","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Name shown in eChat."},"includePaths":{"type":"array","items":{"type":"string"},"description":"Replace the include path prefixes."},"excludePaths":{"type":"array","items":{"type":"string"},"description":"Replace the exclude path prefixes."},"maxPages":{"type":"integer","minimum":1,"maximum":10000,"description":"New page limit."},"slowScrape":{"type":"boolean","description":"Crawl slowly."},"recrawlInterval":{"type":"string","enum":["weekly","biweekly","monthly"],"nullable":true,"description":"Re-crawl schedule; null turns it off."},"recrawl":{"type":"boolean","description":"Re-crawl now with the new settings."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"update_website_source"},"delete":{"description":"Removes the website and every page indexed from it.\n\n**MCP tool:** `delete_website_source` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete a website source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Website source id."}],"operationId":"deleteWebsiteSource","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_website_source"}},"/agents/{agentId}/sources/websites/{websiteId}/recrawl":{"post":{"description":"Crawls the website again to pick up changes.\n\n**MCP tool:** `recrawl_website_source` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Re-crawl a website source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Website source id."}],"operationId":"recrawlWebsiteSource","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean","description":"Re-crawl even when a recent crawl found no changes."},"fresh":{"type":"boolean","description":"Discard cached pages and fetch everything again."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"recrawl_website_source"}},"/agents/{agentId}/sources/websites/{websiteId}/retry-failed":{"post":{"description":"Retries the pages that failed in the last crawl.\n\n**MCP tool:** `retry_failed_website_pages` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Retry failed pages","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Website source id."}],"operationId":"retryFailedWebsitePages","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"retry_failed_website_pages"}},"/agents/{agentId}/sources/websites/{websiteId}/stop":{"post":{"description":"Stops a running crawl; pages already indexed stay.\n\n**MCP tool:** `stop_website_crawl` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Stop a crawl","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Website source id."}],"operationId":"stopWebsiteCrawl","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"stop_website_crawl"}},"/agents/{agentId}/sources/websites/{websiteId}/urls":{"get":{"description":"The URL inventory of a website source, with per-URL status.\n\n**MCP tool:** `list_website_urls` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List a website's URLs","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Website source id."},{"name":"search","in":"query","description":"Only URLs containing this text.","schema":{"type":"string","maxLength":200}},{"name":"includeBlocked","in":"query","description":"Include URLs excluded by the source's paths or robots rules.","schema":{"type":"string","enum":["true","false"]}},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size, 1-500. Default 50.","schema":{"type":"integer","minimum":1,"maximum":500}}],"operationId":"listWebsiteUrls","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_website_urls"}},"/agents/{agentId}/sources/chats":{"get":{"description":"Imported conversation sets (files and eWebinar archives) and their progress.\n\n**MCP tool:** `list_conversation_sources` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List conversation sources","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"listConversationSources","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"status":{"type":"string","description":"pending, normalizing, extracting, embedding, retrying, waiting_for_qa, stopping, stopped, ready or failed."},"integration_type":{"type":"string","nullable":true,"description":"ewebinar for eWebinar archive imports."},"total_conversations":{"type":"number","nullable":true},"extracted_nuggets":{"type":"number","nullable":true,"description":"Q&A extracted so far."},"unanswered_count":{"type":"number","nullable":true},"max_age_days":{"type":"number","nullable":true,"description":"How far back the import reaches."},"stop_reason":{"type":"string","nullable":true,"description":"Why the import stopped early, e.g. its credit budget."},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","name","status","created_at"],"additionalProperties":true},"description":"Every result."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_conversation_sources"},"post":{"description":"Extracts Q&A from an uploaded conversation export. Import work spends credits at cost; results land as proposed Q&A to review.\n\n**MCP tool:** `import_conversations_from_file` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Import conversations from a file","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"importConversationsFromFile","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"s3Key":{"type":"string","minLength":1,"maxLength":1000,"description":"Key from create_conversation_upload_url, after uploading."},"name":{"type":"string","maxLength":200,"description":"Name shown in eChat."},"maxAgeDays":{"type":"integer","minimum":1,"maximum":1460,"description":"How many days back to import. eWebinar imports are capped at 365 days in production."}},"required":["s3Key"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id of the new source."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"import_conversations_from_file"}},"/agents/{agentId}/sources/chats/upload-url":{"post":{"description":"Step one of a conversation file import: PUT the export to `uploadUrl`, then import it with the `s3Key`.\n\n**MCP tool:** `create_conversation_upload_url` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Get a conversation export upload URL","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"createConversationUploadUrl","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"File name including extension (CSV, JSON or NDJSON conversation export)."},"mimeType":{"type":"string","maxLength":200,"description":"The file's MIME type; sent as the upload's Content-Type."}},"required":["fileName"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"Presigned URL. PUT the file bytes to it within an hour."},"s3Key":{"type":"string","description":"Pass to the register step once the upload finishes."}},"required":["uploadUrl","s3Key"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"create_conversation_upload_url"}},"/agents/{agentId}/sources/chats/ewebinar":{"post":{"description":"Imports archived webinar chats from a linked eWebinar, newest first, and extracts Q&A to review. Spends credits at provider cost, capped by `maxCredits`. 409 when that eWebinar is already imported.\n\n**MCP tool:** `import_ewebinar_conversations` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Import eWebinar conversations","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"importEWebinarConversations","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"ewebinarId":{"type":"string","minLength":1,"description":"The linked eWebinar whose archived chats to import. Default: the agent's linked eWebinars."},"name":{"type":"string","maxLength":200,"description":"Name shown in eChat."},"maxAgeDays":{"type":"integer","minimum":1,"maximum":1460,"description":"How many days back to import. eWebinar imports are capped at 365 days in production."},"maxCredits":{"type":"integer","minimum":1,"description":"Stop once the import has spent this many credits (newest conversations are imported first)."},"from":{"type":"string","description":"Start of the window (last chat activity). Default: maxAgeDays ago."},"to":{"type":"string","description":"End of the window. Default: now."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id of the new source."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"import_ewebinar_conversations"}},"/agents/{agentId}/sources/chats/{conversationSourceId}":{"get":{"description":"One conversation source with its counts and settings.\n\n**MCP tool:** `get_conversation_source` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get a conversation source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"getConversationSource","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"status":{"type":"string","description":"pending, normalizing, extracting, embedding, retrying, waiting_for_qa, stopping, stopped, ready or failed."},"integration_type":{"type":"string","nullable":true,"description":"ewebinar for eWebinar archive imports."},"total_conversations":{"type":"number","nullable":true},"extracted_nuggets":{"type":"number","nullable":true,"description":"Q&A extracted so far."},"unanswered_count":{"type":"number","nullable":true},"max_age_days":{"type":"number","nullable":true,"description":"How far back the import reaches."},"stop_reason":{"type":"string","nullable":true,"description":"Why the import stopped early, e.g. its credit budget."},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","name","status","created_at"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_conversation_source"},"patch":{"description":"Changes the import window (Since) or credit budget. Widening the window takes effect with resume_conversation_import.\n\n**MCP tool:** `update_conversation_source` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Update a conversation source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"updateConversationSource","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"maxAgeDays":{"type":"integer","minimum":1,"maximum":1460,"description":"How many days back to import. eWebinar imports are capped at 365 days in production."},"maxCredits":{"type":"integer","minimum":1,"description":"New credit budget (eWebinar imports only)."}},"required":["maxAgeDays"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"update_conversation_source"},"delete":{"description":"Removes the source and its pending proposals. Q&A that was approved or answered stays in training.\n\n**MCP tool:** `delete_conversation_source` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete a conversation source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"deleteConversationSource","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_conversation_source"}},"/agents/{agentId}/sources/chats/{conversationSourceId}/progress":{"get":{"description":"Batch counts and progress for a running import.\n\n**MCP tool:** `get_conversation_import_progress` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get conversation import progress","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"getConversationImportProgress","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_conversation_import_progress"}},"/agents/{agentId}/sources/chats/{conversationSourceId}/retry":{"post":{"description":"Runs a failed import again from where it failed.\n\n**MCP tool:** `retry_conversation_import` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Retry a conversation import","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"retryConversationImport","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"retry_conversation_import"}},"/agents/{agentId}/sources/chats/{conversationSourceId}/stop":{"post":{"description":"Stops a running import after the current batch; what was extracted stays.\n\n**MCP tool:** `stop_conversation_import` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Stop a conversation import","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"stopConversationImport","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"stop_conversation_import"}},"/agents/{agentId}/sources/chats/{conversationSourceId}/resume":{"post":{"description":"Processes leftover batches (for example after the credit budget was reached) or a widened window.\n\n**MCP tool:** `resume_conversation_import` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Resume a conversation import","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"resumeConversationImport","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"resume_conversation_import"}},"/agents/{agentId}/sources/chats/{conversationSourceId}/continue":{"post":{"description":"Picks a stopped import up from its saved position.\n\n**MCP tool:** `continue_conversation_import` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Continue a stopped conversation import","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"continueConversationImport","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"continue_conversation_import"}},"/agents/{agentId}/sources/chats/{conversationSourceId}/renormalize":{"post":{"description":"Wipes the source's extracted results and imports it again from scratch.\n\n**MCP tool:** `reimport_conversation_source` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Re-import a conversation source","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."}],"operationId":"reimportConversationSource","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the action was applied."}},"required":["success"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"reimport_conversation_source"}},"/agents/{agentId}/sources/chats/{conversationSourceId}/unanswered":{"get":{"description":"Questions from this source's conversations that nobody answered.\n\n**MCP tool:** `list_conversation_source_unanswered` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List a conversation source's unanswered questions","tags":["Training sources"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationSourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation source id."},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size, 1-200. Default 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listConversationSourceUnanswered","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_conversation_source_unanswered"}},"/agents/{agentId}/visitors":{"get":{"description":"An agent's conversations (chat logs), most recently active first, with each one's latest visitor message and reply.\n\n**MCP tool:** `list_conversations` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List conversations","tags":["Chat logs"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"from","in":"query","description":"Only conversations started at or after this time.","schema":{"type":"string"}},{"name":"to","in":"query","description":"Only conversations started at or before this time.","schema":{"type":"string"}},{"name":"has_messages_only","in":"query","description":"Only conversations with at least one message (what Chat logs shows).","schema":{"type":"string","enum":["true","false"]}},{"name":"chat_opened_only","in":"query","description":"Only visitors who opened the chat.","schema":{"type":"string","enum":["true","false"]}},{"name":"ewebinar_conversation_id","in":"query","description":"Find the conversation for this eWebinar conversation id.","schema":{"type":"string","maxLength":200}},{"name":"is_test","in":"query","description":"true for conversations from the editor's test mode instead of real visitors.","schema":{"type":"string","enum":["true","false"]}},{"name":"count_only","in":"query","description":"Return only `totalCount`.","schema":{"type":"string","enum":["true","false"]}},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size, 1-200. Default 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listConversations","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Conversation id."},"name":{"type":"string","nullable":true,"description":"Visitor name, when collected."},"email":{"type":"string","nullable":true,"description":"Visitor email, when collected."},"conversation_state":{"type":"string","enum":["active","escalated","resolved"],"nullable":true,"description":"Where the conversation stands."},"message_count":{"type":"number","nullable":true},"ewebinar_id":{"type":"string","nullable":true,"description":"The eWebinar that hosted it, if any."},"ewebinar_title":{"type":"string","nullable":true,"description":"That eWebinar's title at the time."},"first_visit_at":{"type":"string","description":"ISO 8601 timestamp.","nullable":true},"last_visit_at":{"type":"string","description":"ISO 8601 timestamp.","nullable":true},"last_human_message_text":{"type":"string","nullable":true,"description":"The visitor's latest message."},"last_agent_message_text":{"type":"string","nullable":true,"description":"The latest reply."}},"required":["id"],"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_conversations"}},"/agents/{agentId}/visitors/{conversationId}":{"get":{"description":"One conversation's visitor details, state and eWebinar.\n\n**MCP tool:** `get_conversation` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get a conversation","tags":["Chat logs"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation (visitor) id, from list_conversations."},{"name":"is_test","in":"query","description":"true for conversations from the editor's test mode instead of real visitors.","schema":{"type":"string","enum":["true","false"]}}],"operationId":"getConversation","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Conversation id."},"name":{"type":"string","nullable":true,"description":"Visitor name, when collected."},"email":{"type":"string","nullable":true,"description":"Visitor email, when collected."},"conversation_state":{"type":"string","enum":["active","escalated","resolved"],"nullable":true,"description":"Where the conversation stands."},"message_count":{"type":"number","nullable":true},"ewebinar_id":{"type":"string","nullable":true,"description":"The eWebinar that hosted it, if any."},"ewebinar_title":{"type":"string","nullable":true,"description":"That eWebinar's title at the time."},"first_visit_at":{"type":"string","description":"ISO 8601 timestamp.","nullable":true},"last_visit_at":{"type":"string","description":"ISO 8601 timestamp.","nullable":true},"last_human_message_text":{"type":"string","nullable":true,"description":"The visitor's latest message."},"last_agent_message_text":{"type":"string","nullable":true,"description":"The latest reply."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_conversation"},"delete":{"description":"Deletes the conversation and its messages and images.\n\n**MCP tool:** `delete_conversation` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete a conversation","tags":["Chat logs"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation (visitor) id, from list_conversations."}],"operationId":"deleteConversation","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_conversation"}},"/agents/{agentId}/visitors/{conversationId}/messages":{"get":{"description":"The transcript, newest page first. Each page is oldest-first; `nextCursor` means older messages exist.\n\n**MCP tool:** `list_conversation_messages` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List a conversation's messages","tags":["Chat logs"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Conversation (visitor) id, from list_conversations."},{"name":"is_test","in":"query","description":"true for conversations from the editor's test mode instead of real visitors.","schema":{"type":"string","enum":["true","false"]}},{"name":"cursor","in":"query","description":"The oldest message already loaded; returns the page before it.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size. Default 50.","schema":{"type":"integer","minimum":1,"maximum":200}}],"operationId":"listConversationMessages","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string","description":"Message text.","nullable":true},"message_type":{"type":"string","description":"visitor for the visitor's messages; other values are replies."},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"contentParts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image"]}},"required":["type"],"additionalProperties":true},"description":"Ordered text and image parts."}},"required":["id","text","message_type","created_at"],"additionalProperties":true},"description":"Messages, oldest first."},"nextCursor":{"type":"string","description":"Present when older messages exist; pass it as cursor to load them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_conversation_messages"}},"/agents/{agentId}/stats":{"get":{"description":"Daily conversation and message counts, oldest day first.\n\n**MCP tool:** `get_agent_stats` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get agent analytics","tags":["Analytics"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."},{"name":"from","in":"query","description":"First day (YYYY-MM-DD, UTC). Pass with to.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","description":"Last day (YYYY-MM-DD, UTC). Pass with from.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"operationId":"getAgentStats","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"stat_date":{"type":"string","description":"Day (UTC)."}},"required":["stat_date"],"additionalProperties":true},"description":"One row per day with conversation and message counts."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_agent_stats"}},"/eval/suites":{"get":{"description":"An agent's evaluation sets with their latest and first run scores.\n\n**MCP tool:** `list_eval_suites` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List eval suites","tags":["Evaluations"],"parameters":[{"name":"agentId","in":"query","description":"Agent id (a UUID from list_agents / GET /agents).","required":true,"schema":{"type":"string","minLength":1}}],"operationId":"listEvalSuites","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"suites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chat_id":{"type":"string","description":"The agent the suite evaluates."},"name":{"type":"string"},"status":{"type":"string","description":"uploading, normalizing, sampling, selecting (waiting for a manual pick), ready or failed."},"case_count":{"type":"number","nullable":true,"description":"Conversations in the suite."},"total_conversations":{"type":"number","nullable":true,"description":"Conversations available in the source."},"reference_source":{"type":"string","nullable":true,"description":"human_agent: compare with people's replies. ai_agent: compare with an earlier AI moderator."},"date_from":{"type":"string","description":"Start of the suite's date range, or null when none was set. For an uploaded file, conversations before it are left out; an eWebinar suite records its held-out range here.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"total_runs":{"type":"number"},"scored_runs":{"type":"number","description":"Completed runs that have a score. A run where nothing could be scored (every conversation failed, or the judge was off) is not counted."},"latest_overall_score":{"type":"number","nullable":true,"description":"Latest completed run's average, among runs that have a score."},"first_overall_score":{"type":"number","nullable":true,"description":"First completed run's average among runs that have a score, to see the trend."},"latest_run_status":{"type":"string","nullable":true}},"required":["id","chat_id","name","status","created_at"],"additionalProperties":true},"description":"The agent's suites, newest first (up to 100)."}},"required":["suites"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_eval_suites"},"post":{"description":"Builds a suite from an uploaded conversation export or an existing conversation source. Sampling runs in the background; the suite is usable once its status is ready.\n\n**MCP tool:** `create_eval_suite` (permission: Create eval suites and run evaluations (runs spend credits)).","summary":"Create an eval suite","tags":["Evaluations"],"parameters":[],"operationId":"createEvalSuite","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"description":"Agent id (a UUID from list_agents / GET /agents)."},"name":{"type":"string","maxLength":200,"description":"Suite name. Default Eval Suite."},"s3Key":{"type":"string","maxLength":1000,"description":"Uploaded conversation export (from create_eval_suite_upload_url)."},"chatSourceId":{"type":"string","format":"uuid","description":"Or: sample from an existing conversation source (from list_conversation_sources)."},"referenceSource":{"type":"string","enum":["human_agent","ai_agent"],"description":"human_agent (default): compare with people's replies. ai_agent: compare with an earlier AI moderator's replies."},"mode":{"type":"string","enum":["support","sales"],"description":"Judging perspective. Default support."},"dateFrom":{"type":"string","description":"For an uploaded file, only conversations on or after this date. Not applied to a conversation source (chatSourceId)."},"dateTo":{"type":"string","description":"Stored with the suite; not applied when building it."},"manualSelection":{"type":"boolean","description":"Pick conversations yourself (suite waits in selecting status) instead of sampling."},"minTurns":{"type":"integer","minimum":1,"maximum":20,"description":"Skip conversations with fewer reference replies than this. Default 2."},"sampleLimit":{"type":"integer","minimum":1,"maximum":500,"description":"Conversations to sample into the suite. Default 50."}},"required":["agentId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Suite id."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:evals","x-mcp-tool":"create_eval_suite"}},"/eval/suites/ewebinar-conversations":{"get":{"description":"Archived webinar chats that could go into an eval suite, preferring ones the agent was not trained on (held out). Acts through the person's eWebinar connection.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `list_ewebinar_eval_conversations` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List eWebinar conversations for an eval","tags":["Evaluations"],"parameters":[{"name":"agentId","in":"query","description":"Agent id (a UUID from list_agents / GET /agents).","required":true,"schema":{"type":"string","minLength":1}},{"name":"ewebinarId","in":"query","description":"One linked eWebinar. Default: all the agent's linked eWebinars.","schema":{"type":"string"}},{"name":"from","in":"query","description":"Start of the window.","schema":{"type":"string"}},{"name":"to","in":"query","description":"End of the window.","schema":{"type":"string"}},{"name":"maxAgeDays","in":"query","description":"Window length in days, when from is omitted.","schema":{"type":"integer","minimum":1}},{"name":"minTurns","in":"query","description":"Minimum reference replies. Default 2.","schema":{"type":"integer","minimum":1,"maximum":20}},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size, 1-500. Default 200.","schema":{"type":"integer","minimum":1,"maximum":500}}],"operationId":"listEWebinarEvalConversations","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"required":["conversations"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_ewebinar_eval_conversations"}},"/eval/suites/ewebinar-suggested":{"post":{"description":"Builds a suite from an eWebinar-linked agent's archived webinar chats, held out from its training where possible. Acts through the person's eWebinar connection.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `create_ewebinar_eval_suite` (permission: Create eval suites and run evaluations (runs spend credits)).","summary":"Create an eval suite from eWebinar conversations","tags":["Evaluations"],"parameters":[],"operationId":"createEWebinarEvalSuite","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"description":"Agent id (a UUID from list_agents / GET /agents)."},"selectedConversationIds":{"type":"array","items":{"type":"string"},"maxItems":500,"description":"eWebinar conversation ids to use (from list_ewebinar_eval_conversations). Default: a sample."},"ewebinarIds":{"type":"array","items":{"type":"string"},"description":"Linked eWebinars to draw from. Default: all of them."},"from":{"type":"string","description":"Start of the window."},"to":{"type":"string","description":"End of the window."},"maxAgeDays":{"type":"integer","minimum":1,"description":"Window length in days, when from is omitted."},"minTurns":{"type":"integer","minimum":1,"maximum":20,"description":"Skip conversations with fewer reference replies than this. Default 2."},"sampleLimit":{"type":"integer","minimum":1,"maximum":500,"description":"Conversations to sample into the suite. Default 50."}},"required":["agentId"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Suite id."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:evals","x-mcp-tool":"create_ewebinar_eval_suite"}},"/eval/suites/upload-url":{"post":{"description":"Step one of a file-based suite: PUT the export to `uploadUrl`, then create the suite with the `s3Key`.\n\n**MCP tool:** `create_eval_suite_upload_url` (permission: Create eval suites and run evaluations (runs spend credits)).","summary":"Get an eval conversation upload URL","tags":["Evaluations"],"parameters":[],"operationId":"createEvalSuiteUploadUrl","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"description":"Agent id (a UUID from list_agents / GET /agents)."},"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"Conversation export file name (CSV, JSON or NDJSON)."},"mimeType":{"type":"string","maxLength":200,"description":"The file's MIME type."}},"required":["agentId","fileName"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"Presigned URL. PUT the file bytes to it within an hour."},"s3Key":{"type":"string","description":"Pass to create_eval_suite once the upload finishes."}},"required":["uploadUrl","s3Key"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:evals","x-mcp-tool":"create_eval_suite_upload_url"}},"/eval/suites/{suiteId}":{"get":{"description":"The suite and the conversations in it.\n\n**MCP tool:** `get_eval_suite` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get an eval suite","tags":["Evaluations"],"parameters":[{"name":"suiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval suite id (from list_eval_suites)."}],"operationId":"getEvalSuite","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"suite":{"type":"object","properties":{"id":{"type":"string"},"chat_id":{"type":"string","description":"The agent the suite evaluates."},"name":{"type":"string"},"status":{"type":"string","description":"uploading, normalizing, sampling, selecting (waiting for a manual pick), ready or failed."},"case_count":{"type":"number","nullable":true,"description":"Conversations in the suite."},"total_conversations":{"type":"number","nullable":true,"description":"Conversations available in the source."},"reference_source":{"type":"string","nullable":true,"description":"human_agent: compare with people's replies. ai_agent: compare with an earlier AI moderator."},"date_from":{"type":"string","description":"Start of the suite's date range, or null when none was set. For an uploaded file, conversations before it are left out; an eWebinar suite records its held-out range here.","nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["id","chat_id","name","status","created_at"],"additionalProperties":true},"cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":true},"description":"The suite's conversations (ids and turn counts)."}},"required":["suite","cases"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_eval_suite"},"delete":{"description":"Deletes the suite with its conversations, runs and results.\n\n**MCP tool:** `delete_eval_suite` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete an eval suite","tags":["Evaluations"],"parameters":[{"name":"suiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval suite id (from list_eval_suites)."}],"operationId":"deleteEvalSuite","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_eval_suite"}},"/eval/suites/{suiteId}/conversation-previews":{"get":{"description":"For a suite created with manualSelection: candidate conversations with short summaries, to choose from.\n\n**MCP tool:** `preview_eval_suite_conversations` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Preview a suite's candidate conversations","tags":["Evaluations"],"parameters":[{"name":"suiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval suite id (from list_eval_suites)."},{"name":"limit","in":"query","description":"Previews to return, 1-150. Default 75.","schema":{"type":"integer","minimum":1,"maximum":150}}],"operationId":"getEvalSuiteConversationPreviews","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"suite":{"type":"object","properties":{"status":{"type":"string"},"sampleLimit":{"type":"number","description":"How many conversations the suite was created to hold; a sensible number to select."}},"required":["status"],"additionalProperties":true}},"required":["suite"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"preview_eval_suite_conversations"}},"/eval/suites/{suiteId}/select-conversations":{"post":{"description":"Finishes a manual-selection suite with the chosen conversations. A suite takes one choice, while it is waiting for it (status selecting); after that its conversations are fixed, because its runs' results belong to them, and this answers 409. Create a new suite to evaluate other conversations.\n\n**MCP tool:** `select_eval_suite_conversations` (permission: Create eval suites and run evaluations (runs spend credits)).","summary":"Choose a suite's conversations","tags":["Evaluations"],"parameters":[{"name":"suiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval suite id (from list_eval_suites)."}],"operationId":"selectEvalSuiteConversations","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"selectedConversationIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"Conversation ids from preview_eval_suite_conversations."}},"required":["selectedConversationIds"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:evals","x-mcp-tool":"select_eval_suite_conversations"}},"/eval/suites/{suiteId}/cases":{"get":{"description":"The conversations (cases) in a suite, with turn counts.\n\n**MCP tool:** `list_eval_cases` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List a suite's conversations","tags":["Evaluations"],"parameters":[{"name":"suiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval suite id (from list_eval_suites)."},{"name":"cursor","in":"query","description":"Pass the previous page's nextCursor.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Page size, 1-500. Default 100.","schema":{"type":"integer","minimum":1,"maximum":500}}],"operationId":"listEvalCases","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":true},"description":"This page of results."},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` to fetch the next page. Absent or null on the last page."},"totalCount":{"type":"number","description":"Total matching rows, when the route counts them."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_eval_cases"}},"/eval/suites/{suiteId}/cases/{caseId}":{"get":{"description":"One conversation in a suite, with every message.\n\n**MCP tool:** `get_eval_case` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get a suite conversation","tags":["Evaluations"],"parameters":[{"name":"suiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval suite id (from list_eval_suites)."},{"name":"caseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Case id (from list_eval_cases)."}],"operationId":"getEvalCase","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"case":{"type":"object","properties":{},"additionalProperties":true}},"required":["case"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_eval_case"}},"/eval/suites/{suiteId}/runs":{"get":{"description":"A suite's runs with their status and aggregate scores.\n\n**MCP tool:** `list_eval_runs` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List eval runs","tags":["Evaluations"],"parameters":[{"name":"suiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval suite id (from list_eval_suites)."}],"operationId":"listEvalRuns","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suite_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","description":"pending, running, completed, stopped or failed."},"completed_cases":{"type":"number","nullable":true},"total_cases":{"type":"number","nullable":true},"scores_summary":{"type":"object","properties":{"avgOverall":{"type":"number","description":"Average score, 1-5."}},"additionalProperties":true,"nullable":true,"description":"Aggregate scores once cases finish."},"config":{"type":"object","properties":{},"additionalProperties":true,"nullable":true,"description":"Model and judge settings."},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"completed_at":{"type":"string","description":"ISO 8601 timestamp.","nullable":true}},"required":["id","suite_id","name","status","created_at"],"additionalProperties":true},"description":"Runs, newest first (up to 100)."}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_eval_runs"},"post":{"description":"Replays every conversation in a ready suite through the agent as it is configured now and scores the replies. Runs in the background and spends message credits for the replies and judging.\n\n**MCP tool:** `start_eval_run` (permission: Create eval suites and run evaluations (runs spend credits)).","summary":"Start an eval run","tags":["Evaluations"],"parameters":[{"name":"suiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval suite id (from list_eval_suites)."}],"operationId":"startEvalRun","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Run name. Default Run N."},"config":{"type":"object","properties":{"model":{"type":"string","enum":["claude-opus-4-8","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-sonnet-4-6"],"description":"Answer with this model instead of the agent's own, to compare models."},"judge":{"type":"boolean","description":"Score replies with the judge. Default true."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"Sampling temperature for models that accept one."}},"description":"Run settings. Omit to evaluate the agent exactly as configured."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Run id."}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:evals","x-mcp-tool":"start_eval_run"}},"/eval/runs/{runId}":{"get":{"description":"The run's status, aggregate scores and per-conversation results.\n\n**MCP tool:** `get_eval_run` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get an eval run","tags":["Evaluations"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval run id (from list_eval_runs)."}],"operationId":"getEvalRun","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string"},"suite_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","description":"pending, running, completed, stopped or failed."},"completed_cases":{"type":"number","nullable":true},"total_cases":{"type":"number","nullable":true},"scores_summary":{"type":"object","properties":{"avgOverall":{"type":"number","description":"Average score, 1-5."}},"additionalProperties":true,"nullable":true,"description":"Aggregate scores once cases finish."},"config":{"type":"object","properties":{},"additionalProperties":true,"nullable":true,"description":"Model and judge settings."},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"completed_at":{"type":"string","description":"ISO 8601 timestamp.","nullable":true}},"required":["id","suite_id","name","status","created_at"],"additionalProperties":true},"results":{"type":"array","items":{"type":"object","properties":{"case_id":{"type":"string"},"overall_score":{"type":"number","nullable":true,"description":"Average score, 1-5. A placeholder 0 when unscored_reason is set."},"unscored_reason":{"type":"string","nullable":true,"description":"Why the conversation has no score (it failed, timed out, ran out of credits, or the judge could not score it); null when it has one."}},"required":["case_id"],"additionalProperties":true},"description":"Per-conversation results with each turn's reply and scores."}},"required":["run","results"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_eval_run"},"delete":{"description":"Deletes the run and its results.\n\n**MCP tool:** `delete_eval_run` (permission: Delete agents, training, chat logs and eval data).","summary":"Delete an eval run","tags":["Evaluations"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval run id (from list_eval_runs)."}],"operationId":"deleteEvalRun","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"Always true on success."}},"required":["deleted"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:delete","x-mcp-tool":"delete_eval_run"}},"/eval/runs/{runId}/stop":{"post":{"description":"Stops a pending or running evaluation; finished conversations keep their scores and no further credits are spent. A run stopped before it starts evaluates nothing.\n\n**MCP tool:** `stop_eval_run` (permission: Create eval suites and run evaluations (runs spend credits)).","summary":"Stop an eval run","tags":["Evaluations"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Eval run id (from list_eval_runs)."}],"operationId":"stopEvalRun","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"completedCases":{"type":"number"}},"required":["success","completedCases"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:evals","x-mcp-tool":"stop_eval_run"}},"/eval/runs/{runId}/diff/{otherRunId}":{"get":{"description":"Per-conversation score changes between two runs of the same suite.\n\n**MCP tool:** `compare_eval_runs` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Compare two eval runs","tags":["Evaluations"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The baseline run."},{"name":"otherRunId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The run to compare against the baseline (same suite)."}],"operationId":"compareEvalRuns","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"runA":{"type":"object","properties":{},"additionalProperties":true,"description":"Baseline run summary."},"runB":{"type":"object","properties":{},"additionalProperties":true,"description":"Compared run summary."},"diffs":{"type":"array","items":{"type":"object","properties":{"caseId":{"type":"string"},"scoreA":{"type":"number","description":"Null when that run has no score for the conversation.","nullable":true},"scoreB":{"type":"number","description":"Null when that run has no score for the conversation.","nullable":true},"delta":{"type":"number","description":"scoreB minus scoreA; null unless both runs scored it.","nullable":true},"unscoredA":{"type":"string","nullable":true,"description":"Why the baseline run has no score for the conversation, when it has a result but no score."},"unscoredB":{"type":"string","nullable":true,"description":"Why the compared run has no score for the conversation, when it has a result but no score."}},"required":["caseId","scoreA","scoreB","delta"],"additionalProperties":true},"description":"Per-conversation scores and replies from both runs."}},"required":["runA","runB","diffs"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"compare_eval_runs"}},"/billing/subscription/summary":{"get":{"description":"The account's plan, message credit balance, training storage and agent slots.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `get_account_usage` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get plan and usage","tags":["Account"],"parameters":[],"operationId":"getAccountUsage","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","description":"The account's plan."},"credits":{"type":"object","properties":{"balance":{"type":"number","description":"Message credits available now."}},"required":["balance"],"additionalProperties":true,"description":"Credit balance and top-up settings."},"storage":{"type":"object","properties":{"used_bytes":{"type":"number"},"max_bytes":{"type":"number","nullable":true}},"required":["used_bytes","max_bytes"],"additionalProperties":true,"description":"Training storage used and allowed."},"agents":{"type":"object","properties":{"used_count":{"type":"number"},"max_count":{"type":"number","nullable":true}},"required":["used_count","max_count"],"additionalProperties":true,"description":"Agents used and allowed (null max means unlimited)."}},"required":["plan","credits","storage","agents"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_account_usage"}},"/account/integrations/ewebinar/webinars":{"get":{"description":"Webinars on the person's eWebinar team that an agent can moderate. 409 means the eWebinar connection needs to be renewed by signing in again.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `list_ewebinar_webinars` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"List the team's eWebinars","tags":["eWebinar"],"parameters":[],"operationId":"listEWebinarWebinars","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"ewebinarId":{"type":"string","description":"Id to put in an agent's settings.ewebinarIds."},"webinarId":{"type":"string","description":"Webinar id inside eWebinar."},"title":{"type":"string"},"status":{"type":"string","enum":["published","draft"],"description":"Whether the webinar is published."},"durationSeconds":{"type":"number","nullable":true},"seriesName":{"type":"string","nullable":true},"aiModerator":{"type":"object","properties":{},"additionalProperties":true,"nullable":true,"description":"The chatbot currently moderating the webinar, if any."}},"required":["ewebinarId","webinarId","title","status"],"additionalProperties":true}}},"required":["items"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"list_ewebinar_webinars"}},"/account/integrations/ewebinar/webinars/{ewebinarId}":{"get":{"description":"One webinar on the person's eWebinar team.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `get_ewebinar_webinar` (permission: Read agents, training, chat logs, analytics and eval results).","summary":"Get an eWebinar","tags":["eWebinar"],"parameters":[{"name":"ewebinarId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"eWebinar id (the webinar set id from list_ewebinar_webinars)."}],"operationId":"getEWebinarWebinar","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"ewebinarId":{"type":"string","description":"Id to put in an agent's settings.ewebinarIds."},"webinarId":{"type":"string","description":"Webinar id inside eWebinar."},"title":{"type":"string"},"status":{"type":"string","enum":["published","draft"],"description":"Whether the webinar is published."},"durationSeconds":{"type":"number","nullable":true},"seriesName":{"type":"string","nullable":true},"aiModerator":{"type":"object","properties":{},"additionalProperties":true,"nullable":true,"description":"The chatbot currently moderating the webinar, if any."}},"required":["ewebinarId","webinarId","title","status"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:read","x-mcp-tool":"get_ewebinar_webinar"}},"/account/integrations/ewebinar/webinars/{ewebinarId}/transcript":{"get":{"description":"Returns the transcript an eWebinar-linked agent answers from. When the agent does not have it yet, or with refresh=true, fetches it from eWebinar and updates the agent's training.\n\n**Needs a signed-in person** — API keys cannot call this route.\n\n**MCP tool:** `sync_ewebinar_transcript` (permission: Create and configure agents and manage their training (some training actions spend credits)).","summary":"Load a webinar transcript into an agent","tags":["eWebinar"],"parameters":[{"name":"ewebinarId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"eWebinar id (the webinar set id from list_ewebinar_webinars)."},{"name":"agentId","in":"query","description":"The agent linked to this eWebinar. Default: the most recently updated linked agent.","schema":{"type":"string","minLength":1}},{"name":"refresh","in":"query","description":"Fetch the transcript from eWebinar again even when the agent already has it.","schema":{"type":"string","enum":["true","false"]}}],"operationId":"syncEWebinarTranscript","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"transcript":{"type":"string","description":"The transcript text."}},"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write","x-mcp-tool":"sync_ewebinar_transcript"}},"/chatbots/{agentId}/chat":{"post":{"description":"Runs one visitor turn through the agent and returns its reply. Authenticate with an API key (Pro plan and above). Each reply spends message credits at the agent's model rate; 402 means the account is out of credits, 409 that the agent is still being set up.\n\n**API key only.**\n\n**Not available over MCP.**","summary":"Send a message","tags":["Messages"],"parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Agent id (a UUID from list_agents / GET /agents)."}],"operationId":"sendMessage","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"visitorId":{"type":"string","minLength":1,"description":"Your stable id for this conversation. The transcript, visitor details and escalation state are kept per visitorId."},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"description":"user for the visitor, assistant for earlier agent replies."},"content":{"type":"string","description":"Message text (longer than 8,000 characters is truncated)."}},"required":["role","content"]},"minItems":1,"description":"The conversation so far, oldest first. Every user message after the last assistant message is the turn being answered."},"user":{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"Visitor's name."},"email":{"type":"string","nullable":true,"description":"Visitor's email, used for human follow-up."}},"description":"Who the visitor is, when you know."},"includeCitations":{"type":"boolean","description":"false when you will not show citations; the reply then carries none. Default true."}},"required":["visitorId","messages"],"additionalProperties":true}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"The agent's reply."},"messageId":{"type":"string","description":"Id of the saved reply, for chat logs."},"replies":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"needsResponse":{"type":"boolean"}},"required":["content"],"additionalProperties":true},"description":"Present when the reply is several messages or flags a person; text is the first."},"reachHuman":{"type":"boolean","description":"True when the visitor should be offered a person."},"handoff":{"type":"object","properties":{"outcome":{"type":"string","enum":["none","offer","handoff"],"description":"offer: a person was offered. handoff: hand the conversation to a person now."},"reason":{"type":"string"}},"required":["outcome"],"additionalProperties":true},"citations":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"Sources the reply drew on."}},"required":["text","reachHuman","handoff"],"additionalProperties":true}}}},"400":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the problem is, e.g. `body.settings.language`."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"],"additionalProperties":true},"description":"One entry per invalid field."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"401":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"402":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"403":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"404":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}},"409":{"description":"Error envelope returned by every route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":true,"description":"Error envelope returned by every route."}}}}},"x-echat-capability":"echat:write"}}},"info":{"title":"eChat API","version":"1.0.0","description":"The eChat REST API: create, configure, train and evaluate AI agents, read their chat logs, and send them visitor messages.\n\n**Authentication.** Send `Authorization: Bearer <token>`. Server-to-server callers use an API key created under Account settings → API keys (Pro plan and above). Keys act for the whole account; a few routes need a signed-in person and say so. AI assistants connect through the MCP server at `/mcp` instead, which signs in through eWebinar.\n\n**Agents.** The dashboard calls agents `/chats`; every `/agents` path below is also served under `/chats`.\n\n**Errors** are `{ \"error\": \"message\" }` with an HTTP status. An API-key request that does not match this reference is rejected with 400 and an `issues` list naming each invalid field.\n\n**Pagination.** Lists that page return `nextCursor`; pass it back as `cursor` until it is absent."},"servers":[{"url":"https://api.echat.ewebinar.com","description":"Production"},{"url":"https://api.dev.echat.ewebinar.com","description":"Development"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An eChat API key (`fc_…`) or a signed-in session token."}}},"security":[{"bearerAuth":[]}]}