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 排序。

删除对话
DELETE/v1/compliance/apps/chats/{claude_chat_id}

永久删除聊天及其所有关联的消息和文件。这是一项无法撤销的破坏性操作。

Models
ChatListResponse object{ id, created_at, deleted_at, 8 more }

Chat metadata for listing chats (without messages).

ChatDeleteResponse object{ type: "claude_chat_deleted", id }

Response for deleting a Claude chat.

type: optional "claude_chat_deleted"

Constant string confirming deletion

defaultclaude_chat_deleted
id: string

The ID of the Claude chat that was deleted

对话消息

获取对话消息
GET/v1/compliance/apps/chats/{claude_chat_id}/messages

检索特定对话的消息历史记录和文件元数据。

对话文件

获取文件元数据
GET/v1/compliance/apps/chats/files/{claude_file_id}

检索对话消息中引用的文件的元数据,而不下载文件内容。使用同级的 /content 端点下载字节内容。

删除文件
DELETE/v1/compliance/apps/chats/files/{claude_file_id}

永久删除特定文件。这是一个破坏性操作,无法撤销。

下载文件内容
GET/v1/compliance/apps/chats/files/{claude_file_id}/content

下载对话消息中引用的文件的二进制内容。

获取 Claude 生成的文件元数据
GET/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}

返回助手通过工具使用创建的文件的元数据。

下载 Claude 生成的文件
GET/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content

下载助手通过工具使用创建的文件的二进制内容。