Skip to content

List Sessions

GET /sessions

?subject_kind= + ?subject_id= are what lets a multi-person workspace list its own threads instead of the whole campo’s (annex 01 §5.1: a session belongs to whoever it is about, and a listing that ignores that hands the peón the patrón’s conversations).

Filtered server-side, before paginate runs, following the precedent list_run_events set for ?type= (D-571, D-628): a filter applied to a page already fetched hides every match that fell outside that page, and an unpaginated caller would never notice because the first page usually looks right. ix_session_subject covers the pair. An unrecognized subject_kind is a 422 from the enum, the same rule list_run_events documents for ?type= — a silently empty page and “that kind does not exist” are different answers.

The two are independent, matching GET /knowledge-bases’ subject_kind/subject_id pair: subject_kind alone narrows to “every user, across ids” for an operator triaging a kind of subject, and either alone is still a real, if broad, filter.

NameInTypeNotes
agent_idquerystring (uuid) | nulloptional—
subject_kindqueryuser | guest | nulloptional—
subject_idquerystring | nulloptionalmax length 200
limitqueryintegeroptionalDefault 50. min 1 max 200
cursorquerystring | nulloptional—
offsetqueryinteger | nulloptionalmin 0
StatusDescriptionBody
200Successful ResponsePage_SessionView_
422Validation ErrorHTTPValidationError
Terminal window
curl -X GET https://your-deployment.example.com/sessions \
-H "Authorization: Bearer $COBRE_TOKEN"
FieldTypeNotes
itemsSessionView[]required—
next_cursorstring | nulloptional—
totalinteger | nulloptional—