chats

List Chats

List chats where the current identity is an active participant.

Keyset-paginated, search-aware, and filterable:

  • ?archived=true lists chats the caller has archived.
  • ?unread_only=true filters to chats with unread messages, excluding effectively-muted chats (TOS-575; resolved in SQL per TOS-634).
  • ?q=<text> filters to chats whose title or any active participant's display name matches (case-insensitive substring), across the caller's entire chat history rather than the first page.
  • ?cursor=<token> resumes after a previous page. The token for the next page (None on the last page) is returned in the X-Next-Cursor response header so the JSON body stays a plain list.
  • ?needs_you_only=true (TOS-7692) keeps only chats whose needs_you is set. It composes with every other filter and with the cursor.

TOS-7692: every row carries last_message_preview, needs_you and working (see services/chats/list_signals.py for their sources), and the X-Needs-You-Count header counts the caller's chats that need them in the requested archive state, ignoring every other filter. Both ride the existing list statements; neither adds a round trip.

TOS-2596 filter axes. Every one of these used to be applied in the browser to whatever page was already loaded, so a filter hid rows instead of running a query - selecting a capture source the caller owned 991 conversations from returned nothing, because none were on page one, and infinite scroll had to be disabled whenever a filter was active. As query params they compose with the cursor, so a page holds limit matches:

  • ?source=<slug> restricts to one capture source; the reserved value thinqos selects native conversations (no capture source).
  • ?capture_connection_id=<uuid> narrows to one connection/deployment.
  • ?capture_org_id=<external org id> narrows to one customer ORG across every connection the caller has for it. Use this, not capture_connection_id, for a user-facing "conversations from <org>" filter: one customer reached through two deployments is two connection rows for the same caller, so a per-connection filter returns part of that customer's history while looking complete.
  • ?origin=<slug>&origin=<slug>|<external org id>&origin=thinqos (TOS-4379) selects SEVERAL origins at once, OR'd: a whole source, one customer org of an org-scoped source (slug|org), or native conversations. When present it supersedes source and capture_org_id.
  • ?pinned_only=true.
  • ?kinds=direct&kinds=room&... OR's the conversation kinds (direct, room, topic, agent, people).
  • ?activity_since=<iso8601> bounds by last activity. Send an absolute instant so "Today"/"This week" resolve in the CALLER's timezone.
  • ?participant_identity_id=<uuid> narrows to chats that identity is ALSO in (TOS-3292) - an intersection with the caller's own participation, so it can only remove rows. Used by the agent schedule picker to list the chats an agent can be scheduled into.

TOS-2216: the retired ?surface=history split (a separate view of concluded conversations) is gone. concluded_at may still be set internally (see ChatService.conclude_chat/reopen_chat) but no longer excludes a chat from this list - the only user-visible axes are read/unread and archived/unarchived, both participant scoped.

get/api/chats

Request

  • Base URL: https://app.thinqos.com (the document declares no server; this is the origin it was published from)
  • URL: https://app.thinqos.com/api/chats
  • Auth: none declared

Query parameters

archivedboolean
unread_onlyboolean
needs_you_onlyboolean
qstring nullable
cursorstring nullable
limitinteger
sourcestring nullable
capture_connection_idstring uuid nullable
capture_org_idstring nullable
originstring[] nullable
pinned_onlyboolean
kindsstring[] nullable
activity_sincestring date-time nullable
participant_identity_idstring uuid nullable

Headers

x-impersonate-identity-idstring nullable

Response

Successful Response

idstring uuid required
titlestring nullable required
container_kindstring required
statusstring required
descriptionstring nullable
root_container_idstring uuid nullable
topic_parent_idstring uuid nullable
is_pinnedboolean
extraction_excludedboolean
mind_context_disabledboolean
tenant_idstring uuid nullable
tenant_namestring nullable
tenant_is_orgboolean
message_countinteger required
message_count_cappedboolean
unread_countinteger
last_message_atstring date-time nullable required
started_atstring date-time nullable required
has_active_recipientsboolean
facilitation_mode'natural' | 'facilitated'
facilitator_identity_idstring uuid nullable
alternate_facilitator_identity_idsstring[]
max_respondersinteger
max_chain_depthinteger
top_k_claimantsinteger
max_concurrent_generationsinteger
max_concurrent_generations_per_providerinteger
max_root_container_spend_usdnumber nullable
participant_countinteger
viewer_rolestring nullable
mutedboolean
group_keystring nullable
display_titlestring nullable
display_subtitlestring nullable
lifecycle'live' | 'concluded'
concluded_atstring date-time nullable
sourcestring nullable
source_display_namestring nullable
source_icon_urlstring nullable
source_recognizedboolean nullable
capture_connection_idstring uuid nullable
conversation_kind'DIRECT' | 'ROOM' | 'TOPIC' | 'RUN' | 'CAPTURE' | 'ASSISTANT' nullable
is_person_conversationboolean

Changes

No recorded changes to this operation across all 2 revisions of this API.