Skip to main content
GET
/
v1
/
admin
/
bots
/
{id}
/
analytics
cURL
curl --request GET \
  --url https://api.botpress.cloud/v1/admin/bots/{id}/analytics \
  --header 'Authorization: Bearer <token>' \
  --header 'x-workspace-id: <x-workspace-id>'
{
  "records": [
    {
      "startDateTimeUtc": "<string>",
      "endDateTimeUtc": "<string>",
      "returningUsers": 123,
      "newUsers": 123,
      "sessions": 123,
      "messages": 123,
      "userMessages": 123,
      "botMessages": 123,
      "events": 123,
      "eventTypes": {},
      "customEvents": {},
      "llm": {
        "calls": 123,
        "errors": 123,
        "inputTokens": 123,
        "outputTokens": 123,
        "latency": {
          "mean": 123,
          "sd": 123,
          "min": 123,
          "max": 123
        },
        "tokensPerSecond": {
          "mean": 123,
          "sd": 123,
          "min": 123,
          "max": 123
        },
        "cost": {
          "sum": 123,
          "mean": 123,
          "sd": 123,
          "min": 123,
          "max": 123
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-workspace-id
string
required

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.

Path Parameters

id
string
required

Bot ID

Query Parameters

startDate
string
required

Start date/time (inclusive)

endDate
string
required

End date/time (inclusive)

Response

Success

records
object[]
required