Chat History

List chat threads

Changed on
get/api/v1/deployments/{deploymentId}/chat-history/threads

Request

  • Base URL: https://your-tenant.cubecloud.dev
  • URL: https://your-tenant.cubecloud.dev/api/v1/deployments/{deploymentId}/chat-history/threads
  • Auth: HTTP bearer

Path parameters

deploymentIdinteger required

Query parameters

createdAfterstring nullable

Only threads whose createdAt is at or after this ISO 8601 date or date-time.

createdBeforestring nullable

Only threads whose createdAt is at or before this ISO 8601 date-time. A date alone (2026-10-01) includes that whole day, UTC.

updatedAfterstring nullable

Only threads whose updatedAt is at or after this ISO 8601 date or date-time. A thread is updated by every new turn, so this is the filter for incremental exports.

updatedBeforestring nullable

Only threads whose updatedAt is at or before this ISO 8601 date-time. A date alone (2026-10-01) includes that whole day, UTC.

userIdinteger[] nullable

Cube user ids. Repeat the parameter to match any of several values, up to 100.

userEmailstring[] nullable

User emails, matched case-insensitively against Cube users and against the email an embedded user signed in with. Repeat the parameter to match any of several values, up to 100.

externalUserIdstring[] nullable

External ids of embedded-analytics users, as your application passed them. Repeat the parameter to match any of several values, up to 100.

userType'internal' | 'external'
sourcestring[] nullable

Where the thread was started: web (the Cube app or embedded analytics), api (the Chat API), mcp, slack or scheduled (a scheduled task). Repeat the parameter to match any of several values, up to 100.

initialContextstring[] nullable

The surface inside the app the thread began on. Repeat the parameter to match any of several values, up to 100.

agentIdinteger[] nullable

Agent ids; -1 selects the Auto agent. Repeat the parameter to match any of several values, up to 100.

searchstring nullable

Case-insensitive match on the thread title or its chat id.

sortBy'createdAt' | 'updatedAt'
sortOrder'asc' | 'desc'
includeTurnsboolean nullable

Return every thread with its turns. Pages then default to 20 threads and hold at most 50.

afterstring
firstinteger

Response

Changes