---
title: "Fetch bot usage statistics"
method: GET
path: "/bot/{botId}/usage/fetch"
tags: ["Bot"]
---

# Fetch bot usage statistics

`GET /bot/{botId}/usage/fetch`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/bot/{botId}/usage/fetch`
- Auth: HTTP bearer

Retrieve usage statistics for a specific bot, including total tokens
(BASE type only), total conversations, and total messages. Optionally
filter by date range.

## Path parameters

- `botId` string, required: The ID of the bot

## Query parameters

- `from` string, date-time: Start date for the period (ISO 8601 format)
- `to` string, date-time: End date for the period (ISO 8601 format)

## Response `200`

Bot usage statistics retrieved successfully

- object
  - `tokens` integer: Total number of BASE tokens used
  - `conversations` integer: Total number of conversations
  - `messages` integer: Total number of messages

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
