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

下載助理透過工具使用所建立之檔案的二進位內容。