botruntime
API ReferenceAdmin API

Get Bot Analytics

Get bot analytics

GET
/v1/admin/bots/{id}/analytics

Path Parameters

id*string

Bot ID

Query Parameters

startDate*string

Start date/time (inclusive)

endDate*string

End date/time (inclusive)

Header Parameters

x-workspace-id*string

Workspace ID

x-multiple-integrations?string

Whether the client supports bots with multiple instances of the same integration. Set to "true" to receive integration instances keyed by their alias instead of their id. This header will be removed in the future, and the API will always return multiple instances keyed by alias.

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/admin/bots/string/analytics?startDate=string&endDate=string" \  -H "x-workspace-id: string"
{  "records": [    {      "startDateTimeUtc": "string",      "endDateTimeUtc": "string",      "returningUsers": 0,      "newUsers": 0,      "sessions": 0,      "messages": 0,      "userMessages": 0,      "botMessages": 0,      "events": 0,      "eventTypes": {        "property1": 0,        "property2": 0      },      "customEvents": {        "property1": 0,        "property2": 0      },      "llm": {        "calls": 0,        "errors": 0,        "inputTokens": 0,        "outputTokens": 0,        "latency": {          "mean": 0,          "sd": 0,          "min": 0,          "max": 0        },        "tokensPerSecond": {          "mean": 0,          "sd": 0,          "min": 0,          "max": 0        },        "cost": {          "sum": 0,          "mean": 0,          "sd": 0,          "min": 0,          "max": 0        }      }    }  ]}
{  "records": [    {      "startDateTimeUtc": "string",      "endDateTimeUtc": "string",      "returningUsers": 0,      "newUsers": 0,      "sessions": 0,      "messages": 0,      "userMessages": 0,      "botMessages": 0,      "events": 0,      "eventTypes": {        "property1": 0,        "property2": 0      },      "customEvents": {        "property1": 0,        "property2": 0      },      "llm": {        "calls": 0,        "errors": 0,        "inputTokens": 0,        "outputTokens": 0,        "latency": {          "mean": 0,          "sd": 0,          "min": 0,          "max": 0        },        "tokensPerSecond": {          "mean": 0,          "sd": 0,          "min": 0,          "max": 0        },        "cost": {          "sum": 0,          "mean": 0,          "sd": 0,          "min": 0,          "max": 0        }      }    }  ]}