Skip to content

List the caller's threads, newest first or in their own order​

GET
/api/threads

The caller's own threads, and nobody else's: there is no listing of another person's threads or of everyone's, for any role (ADR 0039). A request that carries an owner parameter, whatever its value, is a 400 (owner is not supported (ADR 0039)); until 2026-10-03 it was the administrators' way to list others' threads.

Order (ADR 0042). recent (the default) is a flat list, id descending (ids sort by creation). rail is the order the person made of their list: the threads of the list's own level (the ones with no nestedUnder), the pinned first, then the rest, each by the place arrangeThread gave it (a new thread is on top; ties newest first), then the archived ones by when they were archived, newest first; and each is followed by the threads nested under it, newest first. With rail, limit counts the threads of the list's own level, so a page never splits a block, and before is the id of the last of them. before names a thread of the caller's: an unknown one, another person's, one nested under another (with rail) or one the archived filter does not list as a block (with rail) has no page after it: an empty list.

Archived. exclude (the default) leaves the archived out: with rail, a block archived by its parent goes with it, and a child archived alone is left out of its parent's block; with recent, each row by its own state. only lists the archived: with rail, the archived threads of the list's own level, each with all its children, and the threads archived while their parent is not, each on its own; with recent, the archived rows. include lists everything: with rail, the archived blocks last. Until 2026-10-03 the list had no archived threads, so the default changes nothing for a client that never archives.

Authorizations​

bearerToken

A JWT signed by the configured issuer (RS256, RS384, ES256 or EdDSA), with the configured audience. Read when auth.mode is jwt or jwt_or_proxy_header. A missing or refused token gets 401 with WWW-Authenticate: Bearer; an issuer whose keys cannot be fetched gets 503.

Type
HTTP (bearer)
or
dpopToken

A JWT as bearerToken, bound to the key of the client (cnf.jkt, RFC 7638), sent as Authorization: DPoP <token> with one DPoP header holding a proof signed by that key (RFC 9449, ADR 0054). Read only when auth.dpop is configured. A bad proof gets 401 with WWW-Authenticate: DPoP error="invalid_dpop_proof", algs="ES256 EdDSA", a bad or unbound token error="invalid_token".

Type
HTTP (DPoP)
or
proxyIdentity

Set by oauth2-proxy after OIDC login; requests without it get 401. Read when auth.mode is proxy_header (the default) or jwt_or_proxy_header without a bearer token.

Type
API Key (header: X-Auth-Request-Email)

Parameters​

Query Parameters

limit
Type
integer
Minimum
1
Maximum
100
Default
50
before

Cursor: thread id to page before

Type
string
branches

include: list the threads made by an edit of a message too (ADR 0029). Without it they are left out: an edit is a branch of a conversation the list already shows (listBranches says where its siblings are), and limit counts the threads listed. A thread made by "fork from here" is a conversation of its own and is always listed.

Type
string
Valid values
"include"
order

recent (the default): newest first, flat. rail: the person's own order, blocks of a thread and the threads nested under it (ADR 0042)

Type
string
Valid values
"recent""rail"
Default
"recent"
archived

exclude (the default): the threads that are not archived. only: the archived ones. include: all of them

Type
string
Valid values
"exclude""only""include"
Default
"exclude"

Responses​

Threads

JSON
[
  
{
  
  
"id": "00000000-0000-4000-8000-000000000002",
  
  
"owner": "user@example.com",
  
  
"title": "Release notes for 0.4",
  
  
"description": "Drafts the notes from the merged pull requests.",
  
  
"target": {
  
  
  
"agentId": "chat"
  
  
},
  
  
"state": "done",
  
  
"createdAt": "2026-01-14T16:02:10Z",
  
  
"updatedAt": "2026-01-14T16:05:52Z",
  
  
"lastSeq": 12,
  
  
"pinned": true
  
},
  
{
  
  
"id": "00000000-0000-4000-8000-000000000001",
  
  
"owner": "user@example.com",
  
  
"title": "Fix the failing login test",
  
  
"target": {
  
  
  
"agentId": "coder"
  
  
},
  
  
"state": "working",
  
  
"createdAt": "2026-01-15T09:12:03Z",
  
  
"updatedAt": "2026-01-15T09:14:41Z",
  
  
"lastSeq": 7
  
}
]

Samples​

Powered by VitePress OpenAPI