Attachments
api/compliance/apps/projects/attachments
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/compliance/apps/projects/attachments Changed · +35 / -26 lines
### Path parameters ### Query parameters ### Headers #### Response (200) ## Domain types ### Path Parameters ### Query Parameters ### Header Parameters #### Response ## Domain Types
---- -title: Attachments -url: https://platform.claude.com/docs/en/api/compliance/apps/projects/attachments ---- - # Attachments ## List project attachments -**get** `/v1/compliance/apps/projects/{project_id}/attachments` +**GET** `/v1/compliance/apps/projects/{project_id}/attachments` List files and documents attached to a project.
The text content of attached project documents can be fetched using the GET /v1/compliance/apps/projects/documents/{claude_proj_doc_id} endpoint. -### Path Parameters +### Path parameters - `project_id: string` The project ID (tagged ID, e.g., claude_proj_abc123) -### Query Parameters +### Query parameters - `limit: optional number` Maximum results (default: 20, max: 100) + default: 20, maximum: 100, minimum: 1 + - `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. -### Header Parameters +### 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 }` +- `data: array of object or object` List of attachments sorted chronologically by created_at, tie break by id - - `ComplianceProjectFileReference object { id, created_at, filename, 4 more }` + - `ComplianceProjectFileReference object` File attachment reference for compliance responses.
Creation timestamp (RFC 3339 format) + format: date-time + - `filename: string` Display name of the file (e.g., 'document.pdf')
Discriminator marking this as a binary file - - `"project_file"` + default: project_file - - `ComplianceProjectDocReference object { id, created_at, filename, 3 more }` + - `ComplianceProjectDocReference object` Project document attachment reference for compliance responses.
Creation timestamp (RFC 3339 format) + format: date-time + - `filename: string` Display name of the document (e.g., 'document.txt')
MIME type of the project document, always set to plain text - - `"text/plain"` + default: text/plain - `type: "project_doc"` Discriminator marking this as a plain text document - - `"project_doc"` + default: project_doc - `updated_at: string or null` Last-modified timestamp of the document. Reserved for future use — currently always null. + format: date-time + - `has_more: boolean` Whether more records exist beyond the current result set
### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/attachments \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### Attachment List Response -- `AttachmentListResponse = object { id, created_at, filename, 4 more } or object { id, created_at, filename, 3 more }` +- `AttachmentListResponse = object or object` File attachment reference for compliance responses. - - `ComplianceProjectFileReference object { id, created_at, filename, 4 more }` + - `ComplianceProjectFileReference object` File attachment reference for compliance responses.
Creation timestamp (RFC 3339 format) + format: date-time + - `filename: string` Display name of the file (e.g., 'document.pdf')
Discriminator marking this as a binary file - - `"project_file"` + default: project_file - - `ComplianceProjectDocReference object { id, created_at, filename, 3 more }` + - `ComplianceProjectDocReference object` Project document attachment reference for compliance responses.
Creation timestamp (RFC 3339 format) + format: date-time + - `filename: string` Display name of the document (e.g., 'document.txt')
MIME type of the project document, always set to plain text - - `"text/plain"` + default: text/plain - `type: "project_doc"` Discriminator marking this as a plain text document - - `"project_doc"` + default: project_doc - `updated_at: string or null` Last-modified timestamp of the document. Reserved for future use — currently always null. + + format: date-time