Claude Platform Docs

To enable the Compliance API, see the setup guide.

Set up the Compliance API

프로젝트 첨부 파일 목록 조회

GET/v1/compliance/apps/projects/{project_id}/attachments

프로젝트에 첨부된 파일과 문서를 나열합니다.

project_id로 참조된 프로젝트에 첨부된 파일과 프로젝트 문서를 나열합니다. 여기에는 첨부된 파일의 ID와 첨부된 프로젝트 문서가 포함됩니다.

첨부된 파일의 원시 바이너리 콘텐츠는 GET /v1/compliance/apps/chats/files/{claude_file_id}/content 엔드포인트를 사용하여 다운로드할 수 있습니다.

첨부된 프로젝트 문서의 텍스트 콘텐츠는 GET /v1/compliance/apps/projects/documents/{claude_proj_doc_id} 엔드포인트를 사용하여 가져올 수 있습니다.

Path parameters
project_id: string

The project ID (tagged ID, e.g., claude_proj_abc123)

Query parameters
limit: optional number

Maximum results (default: 20, max: 100)

default20
maximum100
minimum1
page: optional string

Opaque pagination token from a previous response's next_page field. Pass this to retrieve the next page of results. 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.

Headers
"x-api-key": optional string
Returns
data: array of object{ id, created_at, filename, 4 more } or object{ id, created_at, filename, 3 more }

List of attachments sorted chronologically by created_at, tie break by id

One of the following:
ComplianceProjectFileReference object{ id, created_at, filename, 4 more }

File attachment reference for compliance responses.

id: string

File identifier (e.g., 'claude_file_abcd')

created_at: string

Creation timestamp (RFC 3339 format)

formatdate-time
filename: string

Display name of the file (e.g., 'document.pdf')

md5: string or null

Lowercase hex MD5 of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file /metadata endpoint for the authoritative value.

mime_type: string

MIME type of the file's preferred downloadable variant when one is recorded, else 'application/octet-stream'. Use the per-file /metadata endpoint for the authoritative value.

size_bytes: number or null

Size in bytes of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file /metadata endpoint for the authoritative value.

type: "project_file"

Discriminator marking this as a binary file

defaultproject_file
ComplianceProjectDocReference object{ id, created_at, filename, 3 more }

Project document attachment reference for compliance responses.

id: string

Project document identifier (e.g., 'claude_proj_doc_abcd')

created_at: string

Creation timestamp (RFC 3339 format)

formatdate-time
filename: string

Display name of the document (e.g., 'document.txt')

mime_type: "text/plain"

MIME type of the project document, always set to plain text

defaulttext/plain
type: "project_doc"

Discriminator marking this as a plain text document

defaultproject_doc
updated_at: string or null

Last-modified timestamp of the document. Reserved for future use — currently always null.

formatdate-time
has_more: boolean

Whether more records exist beyond the current result set

next_page: string or null

To get the next page, use the 'next_page' from the current response as the 'page' in your next request

프로젝트 첨부 파일 목록 조회
cURL
curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/attachments \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
Returns Examples
Response 200
{
  "data": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "filename": "filename",
      "md5": "md5",
      "mime_type": "mime_type",
      "size_bytes": 0,
      "type": "project_file"
    }
  ],
  "has_more": true,
  "next_page": "next_page"
}