---
title: "Daily platform usage"
method: GET
path: "/tenants/{tenant_id}/analytics/daily"
tags: ["Platform Analytics"]
---

# Daily platform usage

`GET /tenants/{tenant_id}/analytics/daily`

## Request

- Base URL: `https://api.textcortex.com/v2`
- URL: `https://api.textcortex.com/v2/tenants/{tenant_id}/analytics/daily`
- Auth: HTTP bearer

### Access and API address

Ask your TextCortex contact for your API gateway hostname, tenant ID, and a
tenant analytics key with `tenant_analytics:read` access. Analytics API access
must be enabled for that tenant. Send `Authorization: Bearer <key>`.
An ordinary generation API key, wallet key, or user session token is not an
analytics key. Keep the key in your server-side secret store.

These operations use **/v2**. Use the API gateway supplied for your tenant,
not the dashboard hostname. Set `api_host` to that hostname when using Try It.
No request body is required.

### Dates and reporting

Both `date_start` and `date_end` are required, in YYYY-MM-DD format, inclusive.
The end must not precede the start and their difference must be at most
365 days (up to 366 included dates). Split larger exports into smaller ranges.
Message counts use UTC days. Unknown query parameters return 400.

Results are stored daily reports, not a real-time feed. Recent dates may not be
populated yet; reports can change after refresh or backfill. Missing rows are
not proof of zero activity. An empty result has `data.objects: []`.
The response envelope contains `status`, `message`, and `data`.

### Errors and recovery

Check the HTTP status before parsing a success body. HTTP 400 errors use a
`detail` string; HTTP 422 validation errors use a `detail` array. Correct invalid
parameters before retrying. For 401, confirm the gateway, tenant ID, key and
analytics enablement with your TextCortex contact. Never send the key in a
support message or log. Retry read-only requests after 429 or transient 5xx
errors with bounded exponential backoff and jitter, honoring `Retry-After` when
present. A persistent 500 may require TextCortex to check server configuration.
Proxies can return non-JSON errors.

### Daily totals

Returns one available row per tenant and date, ordered by date ascending,
without pagination. These are daily metrics, not lifetime totals.
`total_conversations` counts conversations whose latest recorded activity falls
on that date when the report is computed; it is not a count of newly created
conversations or every conversation touched that day.

`total_stored_bytes` measures the files uploaded on that date that were included
in the report. It is not current total storage or a storage limit. Divide by
1,073,741,824 for GiB. File, agent and knowledge-base counts reflect non-deleted
resources when computed, so recomputing history can change these values.

```bash
curl --fail-with-body --get \
  'https://YOUR_API_HOST/v2/tenants/YOUR_TENANT_ID/analytics/daily' \
  --header "Authorization: Bearer ${TEXTCORTEX_ANALYTICS_API_KEY}" \
  --header 'Accept: application/json' \
  --data-urlencode 'date_start=2026-10-01' \
  --data-urlencode 'date_end=2026-10-07'
```

## Path parameters

- `tenant_id` string, required

## Query parameters

- `date_start` string, date, required
- `date_end` string, date, required

## Response `200`

Successful Response

- TenantAnalyticsDailyResponse
  - `data` TenantAnalyticsDailyData, required
    - `objects` TenantAnalyticsDailyRow[], required
      - `date` string, date, required: Reporting date, YYYY-MM-DD.
      - `tenant_id` string, required: Tenant identifier associated with the analytics key.
      - `total_conversations` integer, required: Conversations whose latest recorded activity falls on this date when computed, including deleted conversations.
      - `total_customizations` integer, required: Non-default agents created on this date and not deleted when computed.
      - `total_knowledge_bases` integer, required: Knowledge bases created on this date and not deleted when computed.
      - `total_stored_bytes` integer, required: Size in bytes of the files included in total_uploaded_files; not current total storage.
      - `total_uploaded_files` integer, required: Non-deleted files created on this date when computed.
      - `total_user_messages` integer, required: User messages recorded on this UTC day, across conversation branches, including retained historical usage from deleted conversations.
  - `message` string, required
  - `status` string, required

## Other responses

- `400`: Invalid date range, unknown parameter, or empty/invalid cursor
- `401`: Missing, invalid, expired, revoked or wrong-tenant key, missing scope, or analytics access disabled
- `422`: Missing or malformed dates, or limit outside 1 to 5000. Validation detail is an array.
- `500`: Server or authentication configuration error

## Changes

- **2026-11-04** `b27459bd3c96`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/textcortex/apis/textcortex-api/changes/tenants/:tenant_id/analytics/daily/get.md)

---

[API](https://skmtc.dev/textcortex/apis/textcortex-api.md) - [All operations](https://skmtc.dev/textcortex/apis/textcortex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/textcortex/apis/textcortex-api/revisions/b27459bd3c96?raw)
