List project attachments
api/compliance/apps/projects/attachments/list
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/list Changed · +23 / -20 lines
# List project attachments ## Path parameters ## Query parameters ## Headers ## Returns ## Example ### Response (200) ## List project attachments ### Path Parameters ### Query Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: List project attachments -url: https://platform.claude.com/docs/en/api/compliance/apps/projects/attachments/list ---- +# List project 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. List files and project documents attached to the project referenced by project_id.
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 +## 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
To get the next page, use the 'next_page' from the current response as the 'page' in your next request -### Example +## 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 {