Claude Platform Docs

To enable the Compliance API, see the setup guide.

Set up the Compliance API

チャットの一覧取得

GET/v1/compliance/apps/chats

対象を絞ったコンプライアンスレビューのためのフィルタリング機能を備えた、チャットのメタデータを一覧表示します。結果は order_by キーによって時系列順(時刻の昇順)に並べ替えられ、同順の場合はidで順序が決まります。

order_by=updated_at を使用した "incremental polling"(増分ポーリング)では、チャットが新しいメッセージを受信した場合、プロジェクトに移動された場合やプロジェクトから移動された場合、またはclaude.aiで削除された場合に、そのチャットが再度返されます。名前の変更など、その他の編集の後にチャットが再度返されることは保証されません。

非推奨のお知らせ: user_ids[] と任意の updated_at.* フィルターの組み合わせは非推奨であり、2026-09-22以降はHTTP 400で拒否されます。更新時刻による増分ポーリングを行う場合は、user_ids[] を省略し、order_by=updated_at を設定して after_id カーソルによるページネーションを使用してください。これにより、組織全体の同じチャットが単一のリクエストストリームで返されます。ユーザーごとの一覧表示には、デフォルトの order_by とともに created_at.* フィルターを使用してください(または時刻フィルターを使用しないでください)。order_by=updated_at と組み合わせた user_ids[] はすでに拒否されます。

Query parameters
after_id: optional string

Pagination cursor for retrieving the next page of results. To paginate, pass the last_id value from the most recent response. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.

before_id: optional string

Pagination cursor for retrieving the previous page of results. To paginate, pass the first_id value from the most recent response. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.

created_at: optional object{ gt, gte, lt, lte }
gt: optional string

Filter chats created after this time (RFC 3339 format)

formatdate-time
gte: optional string

Filter chats created at or after this time (RFC 3339 format)

formatdate-time
lt: optional string

Filter chats created before this time (RFC 3339 format)

formatdate-time
lte: optional string

Filter chats created at or before this time (RFC 3339 format)

formatdate-time
limit: optional number

Maximum results (default: 100, max: 1000)

default100
minimum1
maximum1000
order_by: optional "created_at" or "updated_at"

Sort key for results. created_at (default) sorts by chat creation time. updated_at sorts by last update time and is only supported for org-wide queries (omit user_ids[]). For org-wide queries, any time filter must match the sort key: created_at.* filters require order_by=created_at, and updated_at.* filters require order_by=updated_at.

defaultcreated_at
One of the following:
"created_at"
"updated_at"
organization_ids: optional array of string

Filter by organization IDs (accepts org_... or organization UUID). Enumerate IDs via GET /v1/compliance/organizations.

project_ids: optional array of string

Filter by project IDs (accepts claude_proj_...). Enumerate IDs via GET /v1/compliance/apps/projects. Requires user_ids[]; not supported for org-wide queries.

updated_at: optional object{ gt, gte, lt, lte }
gt: optional string

Filter chats updated after this time (RFC 3339 format). Combining updated_at filters with user_ids[] is deprecated and will be rejected after 2026-09-22; for updated_at-windowed polling, omit user_ids[] and use order_by=updated_at with after_id pagination.

formatdate-time
gte: optional string

Filter chats updated at or after this time (RFC 3339 format). Combining updated_at filters with user_ids[] is deprecated and will be rejected after 2026-09-22; for updated_at-windowed polling, omit user_ids[] and use order_by=updated_at with after_id pagination.

formatdate-time
lt: optional string

Filter chats updated before this time (RFC 3339 format). Combining updated_at filters with user_ids[] is deprecated and will be rejected after 2026-09-22; for updated_at-windowed polling, omit user_ids[] and use order_by=updated_at with after_id pagination.

formatdate-time
lte: optional string

Filter chats updated at or before this time (RFC 3339 format). Combining updated_at filters with user_ids[] is deprecated and will be rejected after 2026-09-22; for updated_at-windowed polling, omit user_ids[] and use order_by=updated_at with after_id pagination.

formatdate-time
user_ids: optional array of string

Filter to chats created by specific users (max 10 per request). Omit for an org-wide query. Enumerate IDs via GET /v1/compliance/organizations/{org_uuid}/users. Deprecated combination: passing user_ids[] together with any updated_at.* filter is deprecated and will be rejected after 2026-09-22. For updated_at-windowed polling, omit user_ids[] and use order_by=updated_at with after_id pagination.

maxItems10
Headers
"anthropic-version": optional string

The version of the Claude API you want to use.

Read more about versioning and our version history here.

"x-api-key": optional string
Returns
data: array of object{ id, created_at, deleted_at, 8 more }

List of chat metadata sorted chronologically by the request's order_by key (default created_at), tie break by id

id: string

Chat ID

created_at: string

Creation timestamp

formatdate-time
deleted_at: string or null

Deletion timestamp if deleted

formatdate-time
href: string

URL to view this chat in claude.ai

model: string or null

Model selected for this chat (e.g. 'claude-opus-5'). May be null for legacy chats that never had a model recorded.

name: string

Chat name. Empty when deleted_at is set.

organization_uuid: string

Organization UUID this chat belongs to

project_id: string or null

Project ID this chat belongs to

updated_at: string

Last update timestamp. Updated when the chat receives a new message, is moved into or out of a project, or is deleted in claude.ai. Other edits, such as renaming the chat, are not guaranteed to change it.

formatdate-time
user: object{ id, email_address } or null

The user who created the chat. Null when the API key is restricted to one organization and the creator is no longer a member of it.

id: string

User identifier

email_address: string

User's email address

organization_id: string⁠Deprecated

Organization ID this chat belongs to

first_id: string or null

Opaque pagination cursor for the first chat in the current result set. Pass as before_id on the next request to page backwards. Backward pagination is only supported for per-user queries (user_ids[] set); org-wide queries do not accept before_id. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.

has_more: boolean

Whether more records exist beyond the current result set

last_id: string or null

Opaque pagination cursor for the last chat in the current result set. Pass as after_id on the next request to page forwards. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.

チャットの一覧取得
cURL
curl https://api.anthropic.com/v1/compliance/apps/chats \
    -H 'anthropic-version: 2023-06-01' \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
Returns Examples
Response 200
{
  "data": [
    {
      "id": "claude_chat_abc123",
      "name": "Product Requirements Discussion",
      "created_at": "2025-06-07T08:09:10Z",
      "updated_at": "2025-06-07T09:10:11Z",
      "organization_id": "org_abc123",
      "organization_uuid": "abcdef01-2345-6789-abcd-ef0123456789",
      "project_id": "claude_proj_xyz789",
      "model": "claude-opus-5",
      "user": {
        "id": "user_xyz456",
        "email_address": "user@example.com"
      },
      "href": "https://claude.ai/chat/abcdef01-2345-6789-abcd-ef0123456789"
    }
  ],
  "has_more": false,
  "first_id": "eyJrIjogImNyZWF0ZWRfYXQiLCAidCI6ICIyMDI1LTA2LTA3VDA4OjA5OjEwKzAwOjAwIiwgImlkIjogImFiY2RlZjAxLTIzNDUtNjc4OS1hYmNkLWVmMDEyMzQ1Njc4OSJ9",
  "last_id": "eyJrIjogImNyZWF0ZWRfYXQiLCAidCI6ICIyMDI1LTA2LTA3VDA4OjA5OjEwKzAwOjAwIiwgImlkIjogImFiY2RlZjAxLTIzNDUtNjc4OS1hYmNkLWVmMDEyMzQ1Njc4OSJ9"
}