Returns an agent’s activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).
Conversations in the range by their lowest answer confidence score, in 10 bins of 0.1: index 0 is 0–0.1, index 9 is 0.9–1. A conversation with no scored answers counts as 1.
Conversations in the range by the hour they started in timeZone: 24 counts, index 0 is 00:00–01:00. Counts come from whole UTC hours, so zones with a 30- or 45-minute offset are approximate.
Credits the agent used per UTC day that overlaps the range. Days with no usage are omitted.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Chatbase","colors":{"primary":"#18181b","light":"#f4f4f5","dark":"#18181b"},"logo":{"light":"https://mintcdn.com/chatbase/pJU9vM3D9oN_YQME/logo/light.svg?fit=max\u0026auto=format\u0026n=pJU9vM3D9oN_YQME\u0026q=85\u0026s=a45a73af7ac778cd0920dbb6ad1aaa93","dark":"https://mintcdn.com/chatbase/8k6_6eFSz4sj8EO0/logo/dark.svg?fit=max\u0026auto=format\u0026n=8k6_6eFSz4sj8EO0\u0026q=85\u0026s=c0c106d2f92f6a87f872a2be66706041","href":"https://chatbase.co"},"favicon":"https://mintcdn.com/chatbase/NsUPSmNqecm03uiz/favicon.ico?fit=max\u0026auto=format\u0026n=NsUPSmNqecm03uiz\u0026q=85\u0026s=b37388fc54cd76cfaf3efcb8ab4a4dc8","appearance":{},"navbar":{"links":[{"href":"https://chatbase.co/help","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://www.chatbase.co/dashboard"}},"footer":{"socials":{"x":"https://x.com/chatbase_co","linkedin":"https://linkedin.com/company/chatbase-co","youtube":"https://www.youtube.com/@chatbase_"}},"seo":{"metatags":{"canonical":"https://www.chatbase.co/docs"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"chatbase","hasAudioNarration":false,"actualSubdomain":"chatbase","customDomains":["chatbase.co"],"gitSource":{"type":"github","owner":"chatbase-co","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af4a63f3e956335301cf2b8","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"User Guide","count":108},{"language":"default","tag":"API Reference","count":82},{"language":"default","tag":"Endpoints","count":68},{"language":"default","tag":"API v2","count":61},{"language":"default","tag":"Helpdesk","count":39},{"language":"default","tag":"Integrations","count":35},{"language":"default","tag":"Developer Guide","count":32},{"language":"default","tag":"AI Agent Management","count":32},{"language":"default","tag":"SDKs","count":26},{"language":"default","tag":"API v1","count":21}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".nav-dropdown-trigger{border-color:transparent!important;border-bottom-color:rgb(var(--gray-500) / 0.2)!important;border-radius:0!important;padding:0.5rem 0.875rem 0.875rem 1rem!important}.nav-dropdown-trigger .nav-dropdown-item-icon{display:none!important}.nav-dropdown-trigger .nav-dropdown-item-text-container{padding-left:0!important}.nav-dropdown-trigger .nav-dropdown-item-title{font-weight:600!important}.nav-dropdown-item-title::after{display:inline-block;margin-left:0.5rem;padding:0.125rem 0.5rem;border-radius:0.375rem;font-size:0.7rem;font-weight:600;line-height:1.2;vertical-align:middle}:is(.nav-dropdown-trigger,.nav-dropdown-item):has([style*=\"/code.svg\"]) .nav-dropdown-item-title::after{content:\"Current\";color:rgb(22 163 74);background:rgb(22 163 74 / 0.12)}:is(.nav-dropdown-trigger,.nav-dropdown-item):has([style*=\"/box-archive.svg\"]) .nav-dropdown-item-title::after{content:\"Deprecated\";color:rgb(217 119 6);background:rgb(217 119 6 / 0.12)}"}],"page":{"pagePath":"api-reference/v2/agents/get-agent-analytics","slug":"/api-reference/v2/agents/get-agent-analytics","pageMetadata":{"title":"Get agent analytics","description":"Returns an agent's activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/analytics","href":"/api-reference/v2/agents/get-agent-analytics","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Returns an agent’s activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get agent analytics","description":"Returns an agent's activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/analytics","href":"/api-reference/v2/agents/get-agent-analytics","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"getAgentAnalytics","x-mcp":{"tool":"chatbase_get_agent_analytics","scopes":["analytics:read"],"annotations":{"readOnly":true,"idempotent":true}},"tags":["Agents"],"summary":"Get agent analytics","description":"Returns an agent's activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).","security":["aa1cec54-8672-4bbb-bb02-8d10d6e25d5d"],"parameters":["6881e21c-a102-4237-b639-b8d508b8e33c","0762006f-a518-4136-a409-75a3c62c34b0","98f418df-80df-40dd-a42e-b7075cb55675","fd777117-49b8-4ec6-9dfd-1456be78cb93"],"responses":{"200":"239b6914-dbd8-4947-a7b1-4722a01df421","400":"f4f43497-affd-438d-9ac8-641e55e313f0","401":"94396cda-a8c9-4eee-a018-6fd16550d814","403":"d36c3feb-deba-4dc7-8a47-0e630bc764e7","404":"73492670-895f-4e2c-9309-35cc87b81559","429":"3d513602-d3fa-4c1e-9e57-16dea4eb9981","500":"05737b50-bfcd-48ce-8bf1-d76f8126eb6c","503":"1adf5c92-bcfe-4075-b613-df7362c18400"},"method":"get","type":"path","servers":["78cf23a7-d603-4fca-ab35-b06a05cc4f13"],"path":"/agents/{agentId}/analytics","baseUrlOptions":["https://www.chatbase.co/api/v2"],"title":"Get agent analytics","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"6881e21c-a102-4237-b639-b8d508b8e33c":{"schema":{"type":"string","minLength":1,"description":"The agent ID","example":"5QHA6VB-DIAbBhxwqxfdi","isRequired":true,"uniqueKey":"","typeLabel":"string"},"required":true,"description":"The agent ID","name":"agentId","in":"path"},"0762006f-a518-4136-a409-75a3c62c34b0":{"schema":{"type":"string","description":"Range start (`YYYY-MM-DD` or ISO 8601). Defaults to 7 days before `endDate`.","isRequired":false,"uniqueKey":"","typeLabel":"string"},"required":false,"description":"Range start (`YYYY-MM-DD` or ISO 8601). Defaults to 7 days before `endDate`.","name":"startDate","in":"query"},"98f418df-80df-40dd-a42e-b7075cb55675":{"schema":{"type":"string","description":"Range end (`YYYY-MM-DD`, inclusive, or ISO 8601). Defaults to now; a later end is capped to now.","isRequired":false,"uniqueKey":"","typeLabel":"string"},"required":false,"description":"Range end (`YYYY-MM-DD`, inclusive, or ISO 8601). Defaults to now; a later end is capped to now.","name":"endDate","in":"query"},"fd777117-49b8-4ec6-9dfd-1456be78cb93":{"schema":{"type":"string","default":"UTC","description":"IANA time zone for `conversationsByHour`, e.g. `America/New_York`. Defaults to `UTC`.","example":"UTC","isRequired":false,"uniqueKey":"","typeLabel":"string"},"required":false,"description":"IANA time zone for `conversationsByHour`, e.g. `America/New_York`. Defaults to `UTC`.","name":"timeZone","in":"query"}},"responses":{"239b6914-dbd8-4947-a7b1-4722a01df421":{"description":"Agent analytics for the range","content":{"application/json":{"schema":{"type":"object","properties":{"buckets":{"type":"array","items":{"type":"object","properties":{"start":{"type":"number","description":"Bucket start, inclusive (Unix timestamp in seconds)","isRequired":true,"uniqueKey":"buckets.items.[INDEX].start","typeLabel":"number"},"end":{"type":"number","description":"Bucket end, exclusive (Unix timestamp in seconds)","isRequired":true,"uniqueKey":"buckets.items.[INDEX].end","typeLabel":"number"},"conversations":{"type":"number","description":"Conversations last active in this bucket","isRequired":true,"uniqueKey":"buckets.items.[INDEX].conversations","typeLabel":"number"},"messages":{"type":"number","description":"Messages in those conversations","isRequired":true,"uniqueKey":"buckets.items.[INDEX].messages","typeLabel":"number"},"positive":{"type":"number","description":"Conversations with positive sentiment","isRequired":true,"uniqueKey":"buckets.items.[INDEX].positive","typeLabel":"number"},"neutral":{"type":"number","description":"Conversations with neutral sentiment","isRequired":true,"uniqueKey":"buckets.items.[INDEX].neutral","typeLabel":"number"},"negative":{"type":"number","description":"Conversations with negative sentiment","isRequired":true,"uniqueKey":"buckets.items.[INDEX].negative","typeLabel":"number"},"escalated":{"type":"number","description":"Conversations escalated to a human (ticket or live-chat handoff)","isRequired":true,"uniqueKey":"buckets.items.[INDEX].escalated","typeLabel":"number"},"thumbsUp":{"type":"number","description":"Messages rated thumbs up","isRequired":true,"uniqueKey":"buckets.items.[INDEX].thumbsUp","typeLabel":"number"},"thumbsDown":{"type":"number","description":"Messages rated thumbs down","isRequired":true,"uniqueKey":"buckets.items.[INDEX].thumbsDown","typeLabel":"number"},"ticketsByStatus":{"oneOf":[{"type":"array","items":{"type":"object","required":["value","count"],"properties":{"value":{"type":"string","enum":["new","on_you","on_customer","on_hold","closed","cancelled"],"isRequired":true,"uniqueKey":"buckets.items.[INDEX].ticketsByStatus.oneOf.0.items.[INDEX].value","typeLabel":"enum\u003cstring>"},"count":{"type":"number","isRequired":true,"uniqueKey":"buckets.items.[INDEX].ticketsByStatus.oneOf.0.items.[INDEX].count","typeLabel":"number"}},"uniqueKey":"buckets.items.[INDEX].ticketsByStatus.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"Help desk tickets created in this bucket, by their current status category. Statuses with no tickets are omitted. `null` when help desk is off for the agent or the key cannot read tickets.","isRequired":true,"uniqueKey":"buckets.items.[INDEX].ticketsByStatus.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","required":["value","count"],"properties":{"value":{"type":"string","enum":["new","on_you","on_customer","on_hold","closed","cancelled"]},"count":{"type":"number"}}},"description":"Help desk tickets created in this bucket, by their current status category. Statuses with no tickets are omitted. `null` when help desk is off for the agent or the key cannot read tickets.","isRequired":true,"uniqueKey":"buckets.items.[INDEX].ticketsByStatus.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"buckets.items.[INDEX].ticketsByStatus","typeLabel":"object[] | null"},"procedures":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","isRequired":true,"uniqueKey":"buckets.items.[INDEX].procedures.items.[INDEX].value","typeLabel":"string"},"count":{"type":"number","isRequired":true,"uniqueKey":"buckets.items.[INDEX].procedures.items.[INDEX].count","typeLabel":"number"}},"required":["value","count"],"uniqueKey":"buckets.items.[INDEX].procedures.items.[INDEX]","typeLabel":"object"},"description":"Procedure run statuses (`completed`, `stalled`, `turn_limit`, …) in conversations last active in this bucket. Each count is the number of conversation–procedure pairs that reached that status.","isRequired":true,"uniqueKey":"buckets.items.[INDEX].procedures","typeLabel":"object[]"},"tools":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","isRequired":true,"uniqueKey":"buckets.items.[INDEX].tools.items.[INDEX].value","typeLabel":"string"},"count":{"type":"number","isRequired":true,"uniqueKey":"buckets.items.[INDEX].tools.items.[INDEX].count","typeLabel":"number"}},"required":["value","count"],"uniqueKey":"buckets.items.[INDEX].tools.items.[INDEX]","typeLabel":"object"},"description":"Tool result statuses (`success`, `error`, …) in conversations last active in this bucket. Each count is the number of conversation–tool pairs that returned that status.","isRequired":true,"uniqueKey":"buckets.items.[INDEX].tools","typeLabel":"object[]"},"actionTypes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","isRequired":true,"uniqueKey":"buckets.items.[INDEX].actionTypes.items.[INDEX].value","typeLabel":"string"},"count":{"type":"number","isRequired":true,"uniqueKey":"buckets.items.[INDEX].actionTypes.items.[INDEX].count","typeLabel":"number"}},"required":["value","count"],"uniqueKey":"buckets.items.[INDEX].actionTypes.items.[INDEX]","typeLabel":"object"},"description":"Action types (e.g. `collect-leads`) in conversations last active in this bucket. Each count is the number of conversations where that type ran, so one conversation can count under several types.","isRequired":true,"uniqueKey":"buckets.items.[INDEX].actionTypes","typeLabel":"object[]"}},"required":["start","end","conversations","messages","positive","neutral","negative","escalated","thumbsUp","thumbsDown","ticketsByStatus","procedures","tools","actionTypes"],"uniqueKey":"buckets.items.[INDEX]","typeLabel":"object"},"description":"The range split into 7 equal buckets, oldest first","isRequired":true,"uniqueKey":"buckets","typeLabel":"object[]"},"sources":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].value","typeLabel":"string"},"count":{"type":"number","isRequired":true,"uniqueKey":"sources.items.[INDEX].count","typeLabel":"number"}},"required":["value","count"],"uniqueKey":"sources.items.[INDEX]","typeLabel":"object"},"description":"Conversations in the range by source","isRequired":true,"uniqueKey":"sources","typeLabel":"object[]"},"toolsUsed":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","isRequired":true,"uniqueKey":"toolsUsed.items.[INDEX].value","typeLabel":"string"},"count":{"type":"number","isRequired":true,"uniqueKey":"toolsUsed.items.[INDEX].count","typeLabel":"number"}},"required":["value","count"],"uniqueKey":"toolsUsed.items.[INDEX]","typeLabel":"object"},"description":"Conversations in the range by tool used","isRequired":true,"uniqueKey":"toolsUsed","typeLabel":"object[]"},"countries":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","isRequired":true,"uniqueKey":"countries.items.[INDEX].value","typeLabel":"string"},"count":{"type":"number","isRequired":true,"uniqueKey":"countries.items.[INDEX].count","typeLabel":"number"}},"required":["value","count"],"uniqueKey":"countries.items.[INDEX]","typeLabel":"object"},"description":"Conversations in the range by country code","isRequired":true,"uniqueKey":"countries","typeLabel":"object[]"},"confidence":{"type":"array","items":{"type":"number","uniqueKey":"confidence.items.[INDEX]","typeLabel":"number"},"description":"Conversations in the range by their lowest answer confidence score, in 10 bins of 0.1: index 0 is 0–0.1, index 9 is 0.9–1. A conversation with no scored answers counts as 1.","isRequired":true,"uniqueKey":"confidence","typeLabel":"number[]"},"conversationsByHour":{"type":"array","items":{"type":"number","uniqueKey":"conversationsByHour.items.[INDEX]","typeLabel":"number"},"description":"Conversations in the range by the hour they started in `timeZone`: 24 counts, index 0 is 00:00–01:00. Counts come from whole UTC hours, so zones with a 30- or 45-minute offset are approximate.","isRequired":true,"uniqueKey":"conversationsByHour","typeLabel":"number[]"},"creditsByDay":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"UTC day (`YYYY-MM-DD`)","isRequired":true,"uniqueKey":"creditsByDay.items.[INDEX].date","typeLabel":"string"},"credits":{"type":"number","isRequired":true,"uniqueKey":"creditsByDay.items.[INDEX].credits","typeLabel":"number"}},"required":["date","credits"],"uniqueKey":"creditsByDay.items.[INDEX]","typeLabel":"object"},"description":"Credits the agent used per UTC day that overlaps the range. Days with no usage are omitted.","isRequired":true,"uniqueKey":"creditsByDay","typeLabel":"object[]"}},"required":["buckets","sources","toolsUsed","countries","confidence","conversationsByHour","creditsByDay"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"buckets":[{"start":123,"end":123,"conversations":123,"messages":123,"positive":123,"neutral":123,"negative":123,"escalated":123,"thumbsUp":123,"thumbsDown":123,"ticketsByStatus":[{"value":"new","count":123}],"procedures":[{"value":"\u003cstring>","count":123}],"tools":[{"value":"\u003cstring>","count":123}],"actionTypes":[{"value":"\u003cstring>","count":123}]}],"sources":[{"value":"\u003cstring>","count":123}],"toolsUsed":[{"value":"\u003cstring>","count":123}],"countries":[{"value":"\u003cstring>","count":123}],"confidence":[123],"conversationsByHour":[123],"creditsByDay":[{"date":"\u003cstring>","credits":123}]}}},"exampleType":"generated"}},"exampleType":"generated"},"f4f43497-affd-438d-9ac8-641e55e313f0":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Field-level validation errors","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"VALIDATION_INVALID_BODY":{"title":"VALIDATION_INVALID_BODY","value":{"error":{"code":"VALIDATION_INVALID_BODY","message":"Invalid request"}}},"VALIDATION_INVALID_DATE_RANGE":{"title":"VALIDATION_INVALID_DATE_RANGE","value":{"error":{"code":"VALIDATION_INVALID_DATE_RANGE","message":"startDate must not be after endDate"}}},"VALIDATION_SEARCH_WINDOW_EXCEEDED":{"title":"VALIDATION_SEARCH_WINDOW_EXCEEDED","value":{"error":{"code":"VALIDATION_SEARCH_WINDOW_EXCEEDED","message":"The requested dates are before the searchable window"}}}},"exampleType":"examples"}},"exampleType":"examples"},"94396cda-a8c9-4eee-a018-6fd16550d814":{"description":"No Authorization header present. Provide a valid API key as a Bearer token in the Authorization header: `Authorization: Bearer \u003capi-key>`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Field-level validation errors","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"AUTH_MISSING_API_KEY","message":"Authentication required"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"AUTH_MISSING_API_KEY","message":"Authentication required"}}}},"exampleType":"examples"}},"exampleType":"examples"},"d36c3feb-deba-4dc7-8a47-0e630bc764e7":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Field-level validation errors","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"AUTH_INSUFFICIENT_PERMISSIONS":{"title":"AUTH_INSUFFICIENT_PERMISSIONS","value":{"error":{"code":"AUTH_INSUFFICIENT_PERMISSIONS","message":"You don't have permission to perform this action"}}},"SUBSCRIPTION_API_RESTRICTED_PLAN":{"title":"SUBSCRIPTION_API_RESTRICTED_PLAN","value":{"error":{"code":"SUBSCRIPTION_API_RESTRICTED_PLAN","message":"A Basic plan or higher is required to access the API"}}}},"exampleType":"examples"}},"exampleType":"examples"},"73492670-895f-4e2c-9309-35cc87b81559":{"description":"No agent matches the provided `agentId`, or it does not belong to the authenticated account.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Field-level validation errors","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"AGENT_NOT_FOUND","message":"Agent not found"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"AGENT_NOT_FOUND","message":"Agent not found"}}}},"exampleType":"examples"}},"exampleType":"examples"},"3d513602-d3fa-4c1e-9e57-16dea4eb9981":{"description":"Rate limit exceeded. Check the `X-RateLimit-Reset` response header for the Unix epoch seconds when the limit resets.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Field-level validation errors","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"RATE_LIMIT_TOO_MANY_REQUESTS","message":"Too many requests, please try again later"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"RATE_LIMIT_TOO_MANY_REQUESTS","message":"Too many requests, please try again later"}}}},"exampleType":"examples"}},"exampleType":"examples"},"05737b50-bfcd-48ce-8bf1-d76f8126eb6c":{"description":"An unhandled server error occurred. If the issue persists, contact support with the `x-request-id` response header value for debugging.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Field-level validation errors","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"INTERNAL_SERVER_ERROR","message":"Something went wrong, please try again"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"INTERNAL_SERVER_ERROR","message":"Something went wrong, please try again"}}}},"exampleType":"examples"}},"exampleType":"examples"},"1adf5c92-bcfe-4075-b613-df7362c18400":{"description":"Service unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Field-level validation errors","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"SERVICE_UNDER_MAINTENANCE":{"title":"SERVICE_UNDER_MAINTENANCE","value":{"error":{"code":"SERVICE_UNDER_MAINTENANCE","message":"The API is temporarily unavailable for scheduled maintenance, please try again later"}}},"CONVERSATION_SEARCH_BUSY":{"title":"CONVERSATION_SEARCH_BUSY","value":{"error":{"code":"CONVERSATION_SEARCH_BUSY","message":"Conversation search is temporarily unavailable, please retry"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"aa1cec54-8672-4bbb-bb02-8d10d6e25d5d":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key from your account settings","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"78cf23a7-d603-4fca-ab35-b06a05cc4f13":{"url":"https://www.chatbase.co/api/v2","description":"Chatbase API v2"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key from your account settings","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key from your account settings","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-v2-openapi.json"},"subdomain":"chatbase","siteName":"Chatbase","title":"Get agent analytics - Chatbase","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T15:21:40.019Z","originalFileLocation":"api-reference/v2/agents/get-agent-analytics.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Returns an agent\u0026#x27;s activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).\">\u003cmeta data-mint-head name=\"application-name\" content=\"Chatbase\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get agent analytics - Chatbase\">\u003cmeta data-mint-head property=\"og:description\" content=\"Returns an agent\u0026#x27;s activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Chatbase\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://chatbase.mintlify.site/docs/_mintlify/api/og/v2?division=Agents\u0026amp;title=Get+agent+analytics\u0026amp;description=Returns+an+agent%27s+activity+over+a+date+range+split+into+7+equal+buckets%3A+conversations%2C+messages%2C+sentiment%2C+escalations%2C+ratings%2C+help+desk+tickets%2C+procedure\u0026amp;theme=430b654938fc40910c40f1cb\u0026amp;signature=481880a9c28b4f30ead7531f24fdeb49897684f093813d6462f0477d829295f8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get agent analytics - Chatbase\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Returns an agent\u0026#x27;s activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chatbase.mintlify.site/docs/_mintlify/api/og/v2?division=Agents\u0026amp;title=Get+agent+analytics\u0026amp;description=Returns+an+agent%27s+activity+over+a+date+range+split+into+7+equal+buckets%3A+conversations%2C+messages%2C+sentiment%2C+escalations%2C+ratings%2C+help+desk+tickets%2C+procedure\u0026amp;theme=430b654938fc40910c40f1cb\u0026amp;signature=481880a9c28b4f30ead7531f24fdeb49897684f093813d6462f0477d829295f8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/chatbase/sZYcuOsK-Dv6V9lc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Chatbase\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#18181b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/v2/agents/get-agent-analytics.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.chatbase.co/#organization\",\"name\":\"Chatbase\",\"url\":\"https://www.chatbase.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/chatbase/pJU9vM3D9oN_YQME/logo/light.svg?fit=max\u0026auto=format\u0026n=pJU9vM3D9oN_YQME\u0026q=85\u0026s=a45a73af7ac778cd0920dbb6ad1aaa93\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.chatbase.co/docs#website\",\"name\":\"Chatbase\",\"url\":\"https://www.chatbase.co/docs\",\"publisher\":{\"@id\":\"https://www.chatbase.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics#webpage\",\"url\":\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics\",\"name\":\"Get agent analytics\",\"description\":\"Returns an agent's activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).\",\"dateModified\":\"2026-11-11T15:21:40.019Z\",\"isPartOf\":{\"@id\":\"https://www.chatbase.co/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://www.chatbase.co/docs/api-reference/v2/health/health-check\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Agents\",\"item\":\"https://www.chatbase.co/docs/api-reference/v2/agents/list-agents\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Get agent analytics\",\"item\":\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics#apireference\",\"headline\":\"Get agent analytics\",\"name\":\"Get agent analytics\",\"description\":\"Returns an agent's activity over a date range split into 7 equal buckets: conversations, messages, sentiment, escalations, ratings, help desk tickets, procedure runs, tool calls and action types per bucket. For the whole range it adds conversation counts by source, action, country, answer confidence and hour of day, plus credits per day. Conversations count by last activity, and the range must fall inside the searchable window (since the 1st of the month 12 months ago, UTC).\",\"url\":\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics\",\"mainEntityOfPage\":{\"@id\":\"https://www.chatbase.co/docs/api-reference/v2/agents/get-agent-analytics#webpage\"},\"dateModified\":\"2026-11-11T15:21:40.019Z\",\"publisher\":{\"@id\":\"https://www.chatbase.co/#organization\"},\"isPartOf\":{\"@id\":\"https://www.chatbase.co/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Chatbase\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Chatbase\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/v2/agents/get-agent-analytics.md","siteName":"Chatbase","nav":{"global":null,"tabs":[{"tab":"User Guide","pages":[{"title":"User Guide","href":"/user-guides/quick-start/introduction"}]},{"tab":"Developer Guide","pages":[{"title":"Developer Guide","href":"/developer-guides/overview"}]},{"tab":"API Reference","dropdowns":[{"dropdown":"API v2","icon":"code","groups":[{"group":"Getting Started","pages":[{"title":"API v2 Overview","sidebarTitle":"Overview","href":"/api-reference/v2/overview"},{"title":"Authentication","href":"/api-reference/v2/authentication"},{"title":"Streaming","href":"/api-reference/v2/streaming"},{"title":"Error Handling","href":"/api-reference/v2/error-handling"},{"title":"Pagination","href":"/api-reference/v2/pagination"}]},{"group":"Guides","pages":[{"title":"Agents","href":"/api-reference/v2/agents"},{"title":"User Conversations","href":"/api-reference/v2/user-conversations"},{"title":"Conversation Search","href":"/api-reference/v2/conversation-search"},{"title":"Sources","href":"/api-reference/v2/sources"},{"title":"Helpdesk","href":"/api-reference/v2/helpdesk"},{"title":"WhatsApp","href":"/api-reference/v2/whatsapp"},{"title":"Voice Sessions","href":"/api-reference/v2/voice"},{"title":"Client Actions","href":"/api-reference/v2/client-actions"}]},{"group":"Endpoints","pages":[{"group":"Health","pages":[{"title":"Health check","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /health","href":"/api-reference/v2/health/health-check"}]},{"group":"Agents","pages":[{"title":"List agents","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents","href":"/api-reference/v2/agents/list-agents"},{"title":"Create agent","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents","href":"/api-reference/v2/agents/create-agent"},{"title":"Get agent","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}","href":"/api-reference/v2/agents/get-agent"},{"title":"Update agent","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json put /agents/{agentId}","href":"/api-reference/v2/agents/update-agent"},{"title":"Delete agent","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json delete /agents/{agentId}","href":"/api-reference/v2/agents/delete-agent"},{"title":"Update agent styles","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json put /agents/{agentId}/styles","href":"/api-reference/v2/agents/update-agent-styles"},{"title":"Toggle auto-retrain","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json put /agents/{agentId}/auto-retrain","href":"/api-reference/v2/agents/toggle-auto-retrain"},{"title":"Clone agent","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/clone","href":"/api-reference/v2/agents/clone-agent"},{"title":"Train agent (deprecated)","description":"**Deprecated.** Sources train as soon as they are created, updated or deleted, so changes take effect immediately and there is nothing to trigger. The call does nothing and always succeeds. Poll `GET /agents/{agentId}/sources/{sourceId}` and read `status` to follow a source, or `GET /agents/{agentId}` for the agent-level `status`.","deprecated":true,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/train","href":"/api-reference/v2/agents/train-agent-deprecated"},{"title":"Get agent analytics","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/analytics","href":"/api-reference/v2/agents/get-agent-analytics"},{"title":"Chat with an agent","description":"Send a message to an agent and receive a response. Supports streaming responses when `stream: true` is set in the request body.","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/chat","href":"/api-reference/v2/agents/chat-with-an-agent"},{"title":"Retry a message","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/conversations/{conversationId}/retry","href":"/api-reference/v2/agents/retry-a-message"},{"title":"Start a voice session","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/voice/sessions","href":"/api-reference/v2/agents/start-a-voice-session"},{"title":"Submit a tool result","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/conversations/{conversationId}/tool-result","href":"/api-reference/v2/agents/submit-a-tool-result"}]},{"group":"Conversations","pages":[{"title":"List conversations","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/conversations","href":"/api-reference/v2/conversations/list-conversations"},{"title":"Export conversations","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/conversations/export","href":"/api-reference/v2/conversations/export-conversations"},{"title":"Search conversations","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/conversations/search","href":"/api-reference/v2/conversations/search-conversations"},{"title":"Get a conversation","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/conversations/{conversationId}","href":"/api-reference/v2/conversations/get-a-conversation"},{"title":"Delete conversation","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json delete /agents/{agentId}/conversations/{conversationId}","href":"/api-reference/v2/conversations/delete-conversation"},{"title":"Update conversation status","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json patch /agents/{agentId}/conversations/{conversationId}","href":"/api-reference/v2/conversations/update-conversation-status"},{"title":"List conversation messages","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/conversations/{conversationId}/messages","href":"/api-reference/v2/conversations/list-conversation-messages"},{"title":"List conversations for a user","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/users/{userId}/conversations","href":"/api-reference/v2/conversations/list-conversations-for-a-user"},{"title":"Delete all conversations for a user","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json delete /agents/{agentId}/users/{userId}/conversations","href":"/api-reference/v2/conversations/delete-all-conversations-for-a-user"},{"title":"Update message feedback","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json patch /agents/{agentId}/conversations/{conversationId}/messages/{messageId}/feedback","href":"/api-reference/v2/conversations/update-message-feedback"}]},{"group":"Collected Data","pages":[{"title":"List collected data","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/collected-data","href":"/api-reference/v2/collected-data/list-collected-data"}]},{"group":"Sources","pages":[{"title":"Get sources summary","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/sources/summary","href":"/api-reference/v2/sources/get-sources-summary"},{"title":"List sources","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/sources","href":"/api-reference/v2/sources/list-sources"},{"title":"Create source","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/sources","href":"/api-reference/v2/sources/create-source"},{"title":"Get source","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/sources/{sourceId}","href":"/api-reference/v2/sources/get-source"},{"title":"Update source","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json put /agents/{agentId}/sources/{sourceId}","href":"/api-reference/v2/sources/update-source"},{"title":"Delete source","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json delete /agents/{agentId}/sources/{sourceId}","href":"/api-reference/v2/sources/delete-source"},{"title":"Restore source (deprecated)","deprecated":true,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/sources/{sourceId}/restore","href":"/api-reference/v2/sources/restore-source-deprecated"},{"title":"Create file source","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /api/v2/agents/{agentId}/sources","href":"/api-reference/v2/sources/create-file-source"},{"title":"Update file source","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json put /api/v2/agents/{agentId}/sources/{sourceId}","href":"/api-reference/v2/sources/update-file-source"}]},{"group":"WhatsApp","pages":[{"title":"List WhatsApp templates","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/whatsapp/templates","href":"/api-reference/v2/whatsapp/list-whatsapp-templates"},{"title":"Send a WhatsApp template message","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/whatsapp/messages/template","href":"/api-reference/v2/whatsapp/send-a-whatsapp-template-message"}]},{"group":"Helpdesk","pages":[{"title":"List ticket statuses","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/helpdesk/ticket-statuses","href":"/api-reference/v2/helpdesk/list-ticket-statuses"},{"title":"List teams","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/helpdesk/teams","href":"/api-reference/v2/helpdesk/list-teams"},{"title":"List attendance rows","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/helpdesk/attendance","href":"/api-reference/v2/helpdesk/list-attendance-rows"},{"title":"List activity segments","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/helpdesk/activity","href":"/api-reference/v2/helpdesk/list-activity-segments"},{"title":"List tickets","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/helpdesk/tickets","href":"/api-reference/v2/helpdesk/list-tickets"},{"title":"Create a ticket","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/helpdesk/tickets","href":"/api-reference/v2/helpdesk/create-a-ticket"},{"title":"Search tickets","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/helpdesk/tickets/search","href":"/api-reference/v2/helpdesk/search-tickets"},{"title":"Get a ticket","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/helpdesk/tickets/{ticketNumber}","href":"/api-reference/v2/helpdesk/get-a-ticket"},{"title":"Update a ticket","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json patch /agents/{agentId}/helpdesk/tickets/{ticketNumber}","href":"/api-reference/v2/helpdesk/update-a-ticket"},{"title":"List ticket messages","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json get /agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages","href":"/api-reference/v2/helpdesk/list-ticket-messages"},{"title":"Add a message to a ticket","deprecated":null,"version":null,"openapi":"/api-v2-openapi.json post /agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages","href":"/api-reference/v2/helpdesk/add-a-message-to-a-ticket"}]}]}]},{"dropdown":"API v1","icon":"box-archive","groups":[{"group":"Getting Started","pages":[{"title":"API v1 Overview","sidebarTitle":"Overview","href":"/api-reference/v1/overview"}]},{"group":"Endpoints","pages":[{"group":"Chat","pages":[{"title":"Chat with a chatbot","deprecated":null,"version":null,"openapi":"/openapi.yaml post /chat","href":"/api-reference/v1/chat/chat-with-a-chatbot"}]},{"group":"Chatbots","pages":[{"title":"Create a new chatbot","deprecated":null,"version":null,"openapi":"/openapi.yaml post /create-chatbot","href":"/api-reference/v1/chatbots/create-a-new-chatbot"},{"title":"Get all chatbots","deprecated":null,"version":null,"openapi":"/openapi.yaml get /get-chatbots","href":"/api-reference/v1/chatbots/get-all-chatbots"},{"title":"Delete a chatbot","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /delete-chatbot","href":"/api-reference/v1/chatbots/delete-a-chatbot"},{"title":"Update a chatbot","deprecated":null,"version":null,"openapi":"/openapi.yaml post /update-chatbot-data","href":"/api-reference/v1/chatbots/update-a-chatbot"},{"title":"Update chatbot settings","deprecated":null,"version":null,"openapi":"/openapi.yaml post /update-chatbot-settings","href":"/api-reference/v1/chatbots/update-chatbot-settings"}]},{"group":"Conversations","pages":[{"title":"Get conversations for a chatbot","deprecated":null,"version":null,"openapi":"/openapi.yaml get /get-conversations","href":"/api-reference/v1/conversations/get-conversations-for-a-chatbot"}]},{"group":"Leads","pages":[{"title":"Get leads for a chatbot","deprecated":null,"version":null,"openapi":"/openapi.yaml get /get-leads","href":"/api-reference/v1/leads/get-leads-for-a-chatbot"}]},{"group":"Assets","pages":[{"title":"Upload chatbot icon","deprecated":null,"version":null,"openapi":"/openapi.yaml post /upload-chatbot-icon","href":"/api-reference/v1/assets/upload-chatbot-icon"},{"title":"Upload chatbot profile picture","deprecated":null,"version":null,"openapi":"/openapi.yaml post /upload-chatbot-profile-picture","href":"/api-reference/v1/assets/upload-chatbot-profile-picture"},{"title":"Delete chatbot icon","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /delete-chatbot-icon","href":"/api-reference/v1/assets/delete-chatbot-icon"},{"title":"Delete chatbot profile picture","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /delete-chatbot-profile-picture","href":"/api-reference/v1/assets/delete-chatbot-profile-picture"}]},{"group":"Contacts","pages":[{"title":"Get contacts for a chatbot","deprecated":null,"version":null,"openapi":"/openapi.yaml get /chatbots/{chatbotId}/contacts","href":"/api-reference/v1/contacts/get-contacts-for-a-chatbot"},{"title":"Create contacts for a chatbot","deprecated":null,"version":null,"openapi":"/openapi.yaml post /chatbots/{chatbotId}/contacts","href":"/api-reference/v1/contacts/create-contacts-for-a-chatbot"},{"title":"Get a specific contact","deprecated":null,"version":null,"openapi":"/openapi.yaml get /chatbots/{chatbotId}/contacts/{contactId}","href":"/api-reference/v1/contacts/get-a-specific-contact"},{"title":"Delete a contact","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /chatbots/{chatbotId}/contacts/{contactId}","href":"/api-reference/v1/contacts/delete-a-contact"},{"title":"Update a contact","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /chatbots/{chatbotId}/contacts/{contactId}","href":"/api-reference/v1/contacts/update-a-contact"},{"title":"Get custom attributes schema","deprecated":null,"version":null,"openapi":"/openapi.yaml get /chatbots/{chatbotId}/custom-attributes","href":"/api-reference/v1/contacts/get-custom-attributes-schema"},{"title":"Create custom attribute","deprecated":null,"version":null,"openapi":"/openapi.yaml post /chatbots/{chatbotId}/custom-attributes","href":"/api-reference/v1/contacts/create-custom-attribute"},{"title":"Update custom attribute","deprecated":null,"version":null,"openapi":"/openapi.yaml put /chatbots/{chatbotId}/custom-attributes/{name}","href":"/api-reference/v1/contacts/update-custom-attribute"}]}]}]}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"Help \u0026 Support","pages":[{"title":"Help \u0026 Support","href":"/faq/faq"}]}]},"basePath":"","title":"Get agent analytics - Chatbase","buildId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","deploymentId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-EBSrFTg1.js","utils-Y_7TcRh4.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D1wvvkPH.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-aT0ty6oN.js","snippetPresets-DoNRuyJc.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-CXRajFpn.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BAyOsINj.js","shallow-CIcHqV1v.js","getApiPlaygroundDisplay-C5igZwEf.js","CodeSnippet-BFWnQLNh.js","CodeSnippets-Cx2mFgZW.js","Page-DCFaZE46.js","getPastedJson-BOy09PZp.js","icon-BwmYtB6R.js","MethodPill-DAIhq-iu.js","DuplicateIcon-DFM8Q3ph.js","createIcon-0UdvzB4Z.js","DynamicMarkdown-DYYZTGpa.js","SectionHeading-BFCDRUuH.js","axios-vUo_bRtp.js","Markdown-C6TcKjiR.js","clsx-Y_UC780V.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-PCbBHBTv.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-D4q_oRML.js"]}