Repository Public
1---2title: Attachments3url: https://platform.claude.com/docs/en/api/compliance/apps/projects/attachments4---56# Attachments78## List project attachments910**GET** `/v1/compliance/apps/projects/{project_id}/attachments`1112List files and documents attached to a project.1314List files and project documents attached to the project referenced by project_id.15This includes the IDs of attached files, and attached project documents.1617The raw binary content of attached files can be downloaded using the18GET /v1/compliance/apps/chats/files/{claude_file_id}/content endpoint.1920The text content of attached project documents can be fetched using the21GET /v1/compliance/apps/projects/documents/{claude_proj_doc_id} endpoint.2223### Path parameters2425- `project_id: string`2627 The project ID (tagged ID, e.g., claude_proj_abc123)2829### Query parameters3031- `limit: optional number`3233 Maximum results (default: 20, max: 100)3435 default: 20, maximum: 100, minimum: 13637- `page: optional string`3839 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.4041### Headers4243- `"x-api-key": optional string`4445### Returns4647- `data: array of ComplianceProjectFileReference or ComplianceProjectDocReference`4849 List of attachments sorted chronologically by created_at, tie break by id5051 - `ComplianceProjectFileReference object`5253 File attachment reference for compliance responses.5455 - `type: "project_file"`5657 Discriminator marking this as a binary file5859 default: project_file6061 - `id: string`6263 File identifier (e.g., 'claude_file_abcd')6465 - `created_at: string`6667 Creation timestamp (RFC 3339 format)6869 format: date-time7071 - `filename: string`7273 Display name of the file (e.g., 'document.pdf')7475 - `md5: string or null`7677 Lowercase hex MD5 of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file `/metadata` endpoint for the authoritative value.7879 - `mime_type: string`8081 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.8283 - `size_bytes: number or null`8485 Size in bytes of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file `/metadata` endpoint for the authoritative value.8687 - `ComplianceProjectDocReference object`8889 Project document attachment reference for compliance responses.9091 - `type: "project_doc"`9293 Discriminator marking this as a plain text document9495 default: project_doc9697 - `id: string`9899 Project document identifier (e.g., 'claude_proj_doc_abcd')100101 - `created_at: string`102103 Creation timestamp (RFC 3339 format)104105 format: date-time106107 - `filename: string`108109 Display name of the document (e.g., 'document.txt')110111 - `mime_type: "text/plain"`112113 MIME type of the project document, always set to plain text114115 default: text/plain116117 - `updated_at: string or null`118119 Last-modified timestamp of the document. Reserved for future use — currently always null.120121 format: date-time122123- `has_more: boolean`124125 Whether more records exist beyond the current result set126127- `next_page: string or null`128129 To get the next page, use the 'next_page' from the current response as the 'page' in your next request130131### Example132133```bash134curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/attachments \135 -H 'anthropic-version: 2023-06-01' \136 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"137```138139#### Response (200)140141```json142{143 "data": [144 {145 "id": "id",146 "created_at": "2019-12-27T18:11:19.117Z",147 "filename": "filename",148 "md5": "md5",149 "mime_type": "mime_type",150 "size_bytes": 0,151 "type": "project_file"152 }153 ],154 "has_more": true,155 "next_page": "next_page"156}157```158159## Domain types160161### Attachment List Response162163- `AttachmentListResponse = ComplianceProjectFileReference or ComplianceProjectDocReference`164165 - `ComplianceProjectFileReference object`166167 File attachment reference for compliance responses.168169 - `type: "project_file"`170171 Discriminator marking this as a binary file172173 default: project_file174175 - `id: string`176177 File identifier (e.g., 'claude_file_abcd')178179 - `created_at: string`180181 Creation timestamp (RFC 3339 format)182183 format: date-time184185 - `filename: string`186187 Display name of the file (e.g., 'document.pdf')188189 - `md5: string or null`190191 Lowercase hex MD5 of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file `/metadata` endpoint for the authoritative value.192193 - `mime_type: string`194195 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.196197 - `size_bytes: number or null`198199 Size in bytes of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file `/metadata` endpoint for the authoritative value.200201 - `ComplianceProjectDocReference object`202203 Project document attachment reference for compliance responses.204205 - `type: "project_doc"`206207 Discriminator marking this as a plain text document208209 default: project_doc210211 - `id: string`212213 Project document identifier (e.g., 'claude_proj_doc_abcd')214215 - `created_at: string`216217 Creation timestamp (RFC 3339 format)218219 format: date-time220221 - `filename: string`222223 Display name of the document (e.g., 'document.txt')224225 - `mime_type: "text/plain"`226227 MIME type of the project document, always set to plain text228229 default: text/plain230231 - `updated_at: string or null`232233 Last-modified timestamp of the document. Reserved for future use — currently always null.234235 format: date-time236