Skip to main content
POST
Retrieve conversation histories for admin users

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
institution
string

Institution ID to filter histories (space-separated for multiple)

usersearch
string

Search term to filter by user email, first name, or last name. Also matches a raw 24-hex user _id (for actioned accounts whose PII has been scrubbed).

account
string

Account ID to filter by account's institutions (space-separated for multiple)

accountType
enum<string>

Filter by user account type

Available options:
user,
admin,
super
course_name
string

Filter by course name (case-insensitive partial match)

includeForgotten
boolean
default:false

When true, include conversations the user soft-deleted (forgotten); each such row carries forgotten=true so the UI can label them. Hidden by default.

includeInactive
boolean
default:false

Include users of any account status (not just non-deleted) in the usersearch resolution, so inactive/actioned accounts surface. Default false.

includeDeleted
boolean
default:false

Include soft-deleted (status:'deleted') history rows, not just active. Default false.

daterange
(string<date> | null)[]

Date range filter as [startDate, endDate]. Defaults to last 30 days if not provided. Use null for open-ended ranges. An optional third element 'exact' marks start/end as exact instants (client-computed local-day bounds) used as-is; without it each provided bound is flattened to the server's (UTC) day.

Required array length: 2 - 3 elements
Example:
page
integer
default:1

Page number for pagination (1-based)

Required range: x >= 1
pageSize
integer
default:1000

Number of records per page (max 5000). Default 1000 for backward compatibility.

Required range: 1 <= x <= 5000
limit
integer
deprecated

Deprecated: use 'pageSize' instead.

limitsearch
integer
deprecated

Deprecated: use 'pageSize' instead.

summary
boolean

When true, returns an AI-generated summary instead of raw data

summaryInstruction
string

Custom instruction for the AI summary generation

Response

Successfully retrieved conversation histories

success
boolean
data
object[]
total
integer

Total number of matching records across all pages

hasMore
boolean

Whether more pages exist beyond the current page

page
integer

Current page number (1-based)

pageSize
integer

Records per page (resolved/clamped value)

message
string