Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Your workspace ID.
Path Parameters
Bot ID
Query Parameters
Start date/time (inclusive)
End date/time (exclusive)
Response
Success
curl --request GET \
  --url https://api.botpress.cloud/v1/admin/bots/{id}/analytics \
  --header 'Authorization: Bearer <token>' \
  --header 'x-workspace-id: <api-key>'{
  "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
        }
      }
    }
  ]
}Get bot analytics
curl --request GET \
  --url https://api.botpress.cloud/v1/admin/bots/{id}/analytics \
  --header 'Authorization: Bearer <token>' \
  --header 'x-workspace-id: <api-key>'{
  "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
        }
      }
    }
  ]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Your workspace ID.
Bot ID
Start date/time (inclusive)
End date/time (exclusive)
Success
Show child attributes
Was this page helpful?