Chats
get/api/v2/chats

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v2/chats
  • Auth
    API key in header Coder-Session-Token

Query parameters

qstring

Search query. Supports title:<substring> (case-insensitive, quote multi-word values), archived:bool, has_unread:bool, status:<waiting\|running\|error\|requires_action\|interrupting\|paused> (chat status, repeated or comma-separated), pr_status:<draft\|open\|merged\|closed\|none> (none matches chats with no pull request) as repeated or comma-separated values, source:<created_by_me\|shared_with_me>, diff_url:<url> (quote values containing colons), pr:<number> (exact PR number match), repo:<owner/repo> (case-insensitive substring match against git remote origin or URL), pr_title:<text> (case-insensitive PR title substring), search:<text> (full-text search across chat titles, PR titles, PR numbers, and message bodies; message bodies match English word stems, e.g. refactor matches refactoring, and ignore English stopwords; titles and PR titles match whole words case-insensitively without stemming; quote multi-word values; cannot be combined with title, pr_title, or pr; a value that tokenizes to no searchable words, e.g. punctuation only, returns an empty list). Bare terms are not supported; use title:<value> or search:<value>.

labelstring[]

Filter by label as key:value. Repeat for multiple (AND logic).

after_idstring uuid

After ID

limitinteger

Page limit

offsetinteger

Page offset

project_idstring uuid

Only chats in this project.

Response

OK

agent_idstring uuid
archivedboolean
build_idstring uuid
childrenCodersdkChat[] circular
client_type'ui' | 'api'
created_atstring date-time
has_unreadboolean

HasUnread is true when assistant messages exist beyond the owner's read cursor, which updates on stream connect and disconnect and via UpdateChatRequest.Read.

idstring uuid
labelsobject
last_model_config_idstring uuid
last_reasoning_effortstring
last_turn_summarystring
mcp_server_idsstring[]
organization_idstring uuid
owner_idstring uuid
owner_namestring
owner_usernamestring
parent_chat_idstring uuid
pin_orderinteger
plan_mode'plan'
project_idstring uuid
queued_for_capacityboolean

QueuedForCapacity reports that the chat is waiting for a concurrent agent slot. Single-chat reads derive it; list responses leave it false.

root_chat_idstring uuid
sharedboolean

Shared is true when this chat's root chat has explicit user or group ACL entries.

status'waiting' | 'running' | 'error' | 'requires_action' | 'interrupting' | 'paused'
summarystring

Summary is the persisted whole-chat summary, generated in the background. It is nil until the first summary has been produced.

titlestring
title_source'fallback' | 'generated' | 'user'
title_updated_atstring date-time

TitleUpdatedAt orders title changes. Title writes do not change UpdatedAt.

updated_atstring date-time
warningsstring[]
workspace_idstring uuid

Changes