List chats
CoderSessionTokenCoder-Session-Token<token>q?stringSearch query. Supports title:<substring> (case-insensitive, quote multi-word values), archived:bool, has_unread:bool, status:<waiting\|running\|error\|requires_action\|interrupting> (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>.
label?array<string>Filter by label as key:value. Repeat for multiple (AND logic).
after_id?stringAfter ID
uuidlimit?integerPage limit
offset?integerPage offset
project_id?stringOnly chats in this project.
uuidOK
application/json- response
[index: integer]?The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/api/v2/chats" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"[ { "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "archived": true, "build_id": "bfb1f3fa-bf7b-43a5-9e0b-26cc050e44cb", "children": [ {} ], "client_type": "ui", "context": { "dirty": true, "dirty_since": "2019-08-24T14:15:22Z", "error": "string", "resources": [ { "error": "string", "kind": "instruction_file", "size_bytes": 0, "skill_description": "string", "skill_name": "string", "source": "string", "source_path": "string", "status": "ok", "tools": [ { "description": "string", "name": "string" } ] } ] }, "created_at": "2019-08-24T14:15:22Z", "diff_status": { "additions": 0, "approved": true, "author_avatar_url": "string", "author_login": "string", "base_branch": "string", "changed_files": 0, "changes_requested": true, "chat_id": "efc9fe20-a1e5-4a8c-9c48-f1b30c1e4f86", "commits": 0, "deletions": 0, "git_branch": "string", "head_branch": "string", "pr_number": 0, "pull_request_draft": true, "pull_request_state": "string", "pull_request_title": "string", "refreshed_at": "2019-08-24T14:15:22Z", "remote_origin": "string", "reviewer_count": 0, "stale_at": "2019-08-24T14:15:22Z", "url": "string" }, "diff_statuses": [ { "additions": 0, "approved": true, "author_avatar_url": "string", "author_login": "string", "base_branch": "string", "changed_files": 0, "changes_requested": true, "chat_id": "efc9fe20-a1e5-4a8c-9c48-f1b30c1e4f86", "commits": 0, "deletions": 0, "git_branch": "string", "head_branch": "string", "pr_number": 0, "pull_request_draft": true, "pull_request_state": "string", "pull_request_title": "string", "refreshed_at": "2019-08-24T14:15:22Z", "remote_origin": "string", "reviewer_count": 0, "stale_at": "2019-08-24T14:15:22Z", "url": "string" } ], "files": [ { "created_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "mime_type": "string", "name": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "size_bytes": 0 } ], "has_unread": true, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "inline_mcp_servers": [ { "allow_in_subagents": true, "created_at": "2019-08-24T14:15:22Z", "forward_coder_headers": true, "has_custom_headers": true, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "slug": "string", "tool_allow_list": [ "string" ], "tool_deny_list": [ "string" ], "updated_at": "2019-08-24T14:15:22Z", "url": "string" } ], "labels": { "property1": "string", "property2": "string" }, "last_error": { "detail": "string", "kind": "generic", "message": "string", "provider": "string", "retryable": true, "status_code": 0 }, "last_model_config_id": "30ebb95f-c255-4759-9429-89aa4ec1554c", "last_reasoning_effort": "string", "last_turn_summary": "string", "mcp_server_ids": [ "6645753c-0a13-4667-8dd3-d80a8e4fd76f" ], "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "owner_name": "string", "owner_username": "string", "parent_chat_id": "c3609ee6-3b11-4a93-b9ae-e4fabcc99359", "pin_order": 0, "plan_mode": "plan", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "queued_for_capacity": true, "root_chat_id": "2898031c-fdce-4e3e-8c53-4481dd42fcd7", "shared": true, "status": "waiting", "summary": "string", "title": "string", "title_source": "fallback", "title_updated_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "warnings": [ "string" ], "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9" }]