Projects
api/compliance/apps/projects
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 Changed · +201 / -447 lines
### Query parameters ### Headers #### Response (200) ### Path parameters ### Headers #### Response (200) ### Path parameters ### Headers #### Response (200) ## Domain types ## Projects › Attachments ### List project attachments #### Path parameters #### Query parameters #### Headers #### Returns #### Example ##### Response (200) ## Projects › Collaborators ### List project collaborators #### Path parameters #### Query parameters #### Headers #### Returns #### Example ##### Response (200) ## Projects › Documents ### Get project document content #### Path parameters #### Headers #### Returns #### Example ##### Response (200) ### Get project document metadata #### Path parameters #### Headers #### Returns #### Example ##### Response (200) ### Delete project document #### Path parameters #### Headers #### Returns #### Example ##### Response (200) ### Query Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters #### Response ## Domain Types # Attachments ## List project attachments ### Path Parameters ### Query Parameters ### Header Parameters #### Response ## Domain Types ### Attachment List Response # Collaborators ## List project collaborators ### Path Parameters ### Query Parameters ### Header Parameters #### Response ## Domain Types ### Collaborator List Response # Documents ## Get project document content ### Path Parameters ### Header Parameters #### Response ## Get project document metadata ### Path Parameters ### Header Parameters #### Response ## Delete project document ### Path Parameters ### Header Parameters #### Response ## Domain Types ### Document Retrieve Response ### Document Metadata Response ### Document Delete Response
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
---- -title: Projects -url: https://platform.claude.com/docs/en/api/compliance/apps/projects ---- - # Projects ## List projects -**get** `/v1/compliance/apps/projects` +**GET** `/v1/compliance/apps/projects` Lists project metadata with filtering capabilities. Results are sorted chronologically (time ascending) by created_at. -### Query Parameters - -- `created_at: optional object { gt, gte, lt, lte }` +### Query parameters + +- `created_at: optional object` - `gt: optional string` Filter projects created after this time (RFC 3339 format) + format: date-time + - `gte: optional string` Filter projects created at or after this time (RFC 3339 format) + format: date-time + - `lt: optional string` Filter projects created before this time (RFC 3339 format) + format: date-time + - `lte: optional string` Filter projects created at or before this time (RFC 3339 format) + format: date-time + - `limit: optional number` Maximum results (default: 20, max: 100) + default: 20, maximum: 100, minimum: 1 + - `organization_ids: optional array of string` Filter by organization IDs (accepts `org_...` or organization UUID). Enumerate IDs via `GET /v1/compliance/organizations`.
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. -- `updated_at: optional object { gt, gte, lt, lte }` +- `updated_at: optional object` - `gt: optional string` Filter projects updated after this time (RFC 3339 format) + format: date-time + - `gte: optional string` Filter projects updated at or after this time (RFC 3339 format) + format: date-time + - `lt: optional string` Filter projects updated before this time (RFC 3339 format) + format: date-time + - `lte: optional string` Filter projects updated at or before this time (RFC 3339 format) + format: date-time + - `user_ids: optional array of string` Filter by user IDs. Enumerate IDs via `GET /v1/compliance/organizations/{org_uuid}/users`. -### Header Parameters +### Headers - `"x-api-key": optional string` ### Returns -- `data: array of object { id, created_at, deleted_at, 6 more }` +- `data: array of object` List of projects sorted by creation date ascending
Project creation timestamp + format: date-time + - `deleted_at: string or null` Timestamp when the project was deleted by an end user, or null otherwise + format: date-time + - `is_private: boolean` If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators
Project name - - `organization_id: string` - - Organization identifier (tagged ID) - - `organization_uuid: string` Organization UUID this project belongs to
Project last update timestamp - - `user: object { id, email_address } or null` + format: date-time + + - `user: object or null` The user who created a project or project document.
User's email address + - `organization_id: string` + + **Deprecated** + + Organization identifier (tagged ID) + - `has_more: boolean` Whether more records exist beyond the current result set
### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/projects \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Get project details -**get** `/v1/compliance/apps/projects/{project_id}` +**GET** `/v1/compliance/apps/projects/{project_id}` Get detailed information for a specific project. -### Path Parameters +### Path parameters - `project_id: string` The project ID (tagged ID, e.g., claude_proj_abc123) -### Header Parameters +### Headers - `"x-api-key": optional string`
Project creation timestamp + format: date-time + - `deleted_at: string or null` Timestamp when the project was deleted by an end user, or null otherwise + format: date-time + - `description: string` Project description
Project name -- `organization_id: string` - - Organization identifier (tagged ID) - - `organization_uuid: string` Organization UUID this project belongs to
Project last update timestamp -- `user: object { id, email_address } or null` + format: date-time + +- `user: object or null` The user who created a project or project document.
User's email address +- `organization_id: string` + + **Deprecated** + + Organization identifier (tagged ID) + ### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Delete project -**delete** `/v1/compliance/apps/projects/{project_id}` +**DELETE** `/v1/compliance/apps/projects/{project_id}` Delete a project for compliance purposes.
Project must have no attached chats - returns 409 if chats exist. -### Path Parameters +### Path parameters - `project_id: string` The project ID (tagged ID, e.g., claude_proj_abc123) -### Header Parameters +### Headers - `"x-api-key": optional string`
Constant string confirming deletion. - - `"claude_project_deleted"` + default: claude_project_deleted ### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID \ -X DELETE \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### Project List Response -- `ProjectListResponse object { id, created_at, deleted_at, 6 more }` +- `ProjectListResponse object` Project information for compliance responses.
Project creation timestamp + format: date-time + - `deleted_at: string or null` Timestamp when the project was deleted by an end user, or null otherwise + format: date-time + - `is_private: boolean` If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators
Project name - - `organization_id: string` - - Organization identifier (tagged ID) - - `organization_uuid: string` Organization UUID this project belongs to
Project last update timestamp - - `user: object { id, email_address } or null` + format: date-time + + - `user: object or null` The user who created a project or project document.
User's email address + - `organization_id: string` + + **Deprecated** + + Organization identifier (tagged ID) + ### Project Retrieve Response -- `ProjectRetrieveResponse object { id, attachments_count, chats_count, 10 more }` +- `ProjectRetrieveResponse object` Detailed project information for compliance responses.
Project creation timestamp + format: date-time + - `deleted_at: string or null` Timestamp when the project was deleted by an end user, or null otherwise + format: date-time + - `description: string` Project description
Project name - - `organization_id: string` - - Organization identifier (tagged ID) - - `organization_uuid: string` Organization UUID this project belongs to
Project last update timestamp - - `user: object { id, email_address } or null` + format: date-time + + - `user: object or null` The user who created a project or project document.
User's email address + - `organization_id: string` + + **Deprecated** + + Organization identifier (tagged ID) + ### Project Delete Response -- `ProjectDeleteResponse object { id, type }` +- `ProjectDeleteResponse object` Response for deleting a Claude project.
Constant string confirming deletion. - - `"claude_project_deleted"` - -# Attachments - -## List project attachments - -**get** `/v1/compliance/apps/projects/{project_id}/attachments` + default: claude_project_deleted + +## Projects › Attachments + +### List project 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 }` +#### Returns + +- `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"` - - - `ComplianceProjectDocReference object { id, created_at, filename, 3 more }` + default: project_file + + - `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 - -```http +#### Example + +```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 - -### Attachment List Response - -- `AttachmentListResponse = object { id, created_at, filename, 4 more } or object { id, created_at, filename, 3 more }` - - File attachment reference for compliance responses. - - - `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) - - - `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 - - - `"project_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) - - - `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 - - - `"text/plain"` - - - `type: "project_doc"` - - Discriminator marking this as a plain text document - - - `"project_doc"` - - - `updated_at: string or null` - - Last-modified timestamp of the document. Reserved for future use — currently always null. - -# Collaborators - -## List project collaborators - -**get** `/v1/compliance/apps/projects/{project_id}/collaborators` +## Projects › Collaborators + +### List project collaborators + +**GET** `/v1/compliance/apps/projects/{project_id}/collaborators` List the users, groups, and organization-wide grants on a project.
RBAC group, the whole organization, or all holders of an organization-level role. -### 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 { granted_at, role, type, user_id } or object { granted_at, group_id, role, type } or object { granted_at, organization_uuid, role, type } or object { granted_at, organization_role, role, type }` +#### Returns + +- `data: array of object or object or object or object` List of collaborators sorted chronologically by granted_at, tie break by the underlying role-assignment UUID - - `ComplianceProjectUserCollaborator object { granted_at, role, type, user_id }` + - `ComplianceProjectUserCollaborator object` An individual user granted a role on a project.
When this collaborator was granted access (RFC 3339 format) + format: date-time + - `role: "admin" or "editor" or "owner" or "viewer"` Role granted on the project
Discriminator marking this as an individual user collaborator - - `"user"` + default: user - `user_id: string or null` Identifier of the user granted access (tagged ID), or null if their account has since been deleted - - `ComplianceProjectGroupCollaborator object { granted_at, group_id, role, type }` + - `ComplianceProjectGroupCollaborator object` An RBAC group granted a role on a project.
When this collaborator was granted access (RFC 3339 format) + format: date-time + - `group_id: string` Identifier of the group granted access (tagged ID)
Discriminator marking this as a group collaborator - - `"group"` - - - `ComplianceProjectOrganizationCollaborator object { granted_at, organization_uuid, role, type }` + default: group + + - `ComplianceProjectOrganizationCollaborator object` An entire organization granted a role on a project.
When this collaborator was granted access (RFC 3339 format) + format: date-time + - `organization_uuid: string` UUID of the organization granted access
Discriminator marking this as an organization-wide grant - - `"organization"` - - - `ComplianceProjectOrganizationRoleCollaborator object { granted_at, organization_role, role, type }` + default: organization + + - `ComplianceProjectOrganizationRoleCollaborator object` All holders of an organization-level role granted a role on a project.
When this collaborator was granted access (RFC 3339 format) + format: date-time + - `organization_role: string` The organization-level role whose holders are granted access
Discriminator marking this as a grant to all organization members holding a specific org-level role - - `"organization_role"` + default: organization_role - `has_more: boolean`
To get the next page, use the 'next_page' from the current response as the 'page' in your next request -### Example - -```http +#### Example + +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/collaborators \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +##### Response (200) ```json {
} ``` -## Domain Types - -### Collaborator List Response - -- `CollaboratorListResponse = object { granted_at, role, type, user_id } or object { granted_at, group_id, role, type } or object { granted_at, organization_uuid, role, type } or object { granted_at, organization_role, role, type }` - - An individual user granted a role on a project. - - - `ComplianceProjectUserCollaborator object { granted_at, role, type, user_id }` - - An individual user granted a role on a project. - - - `granted_at: string` - - When this collaborator was granted access (RFC 3339 format) - - - `role: "admin" or "editor" or "owner" or "viewer"` - - Role granted on the project - - - `"admin"` - - - `"editor"` - - - `"owner"` - - - `"viewer"` - - - `type: "user"` - - Discriminator marking this as an individual user collaborator - - - `"user"` - - - `user_id: string or null` - - Identifier of the user granted access (tagged ID), or null if their account has since been deleted - - - `ComplianceProjectGroupCollaborator object { granted_at, group_id, role, type }` - - An RBAC group granted a role on a project. - - - `granted_at: string` - - When this collaborator was granted access (RFC 3339 format) - - - `group_id: string` - - Identifier of the group granted access (tagged ID) - - - `role: "admin" or "editor" or "owner" or "viewer"` - - Role granted on the project - - - `"admin"` - - - `"editor"` - - - `"owner"` - - - `"viewer"` - - - `type: "group"` - - Discriminator marking this as a group collaborator - - - `"group"` - - - `ComplianceProjectOrganizationCollaborator object { granted_at, organization_uuid, role, type }` - - An entire organization granted a role on a project. - - - `granted_at: string` - - When this collaborator was granted access (RFC 3339 format) - - - `organization_uuid: string` - - UUID of the organization granted access - - - `role: "admin" or "editor" or "owner" or "viewer"` - - Role granted on the project - - - `"admin"` - - - `"editor"` - - - `"owner"` - - - `"viewer"` - - - `type: "organization"` - - Discriminator marking this as an organization-wide grant - - - `"organization"` - - - `ComplianceProjectOrganizationRoleCollaborator object { granted_at, organization_role, role, type }` - - All holders of an organization-level role granted a role on a project. - - - `granted_at: string` - - When this collaborator was granted access (RFC 3339 format) - - - `organization_role: string` - - The organization-level role whose holders are granted access - - - `role: "admin" or "editor" or "owner" or "viewer"` - - Role granted on the project - - - `"admin"` - - - `"editor"` - - - `"owner"` - - - `"viewer"` - - - `type: "organization_role"` - - Discriminator marking this as a grant to all organization members holding a specific org-level role - - - `"organization_role"` - -# Documents - -## Get project document content - -**get** `/v1/compliance/apps/projects/documents/{document_id}` +## Projects › Documents + +### Get project document content + +**GET** `/v1/compliance/apps/projects/documents/{document_id}` Get detailed information for a specific project document. -### Path Parameters +#### Path parameters - `document_id: string` The document ID (tagged ID, e.g., claude_proj_doc_abc123) -### Header Parameters +#### Headers - `"x-api-key": optional string` -### Returns +#### Returns - `id: string`
Document creation timestamp + format: date-time + - `filename: string` Document filename -- `user: object { id, email_address } or null` +- `user: object or null` The user who created a project or project document.
User's email address -### Example - -```http +#### Example + +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +##### Response (200) ```json {
} ``` -## Get project document metadata - -**get** `/v1/compliance/apps/projects/documents/{document_id}/metadata` +### Get project document metadata + +**GET** `/v1/compliance/apps/projects/documents/{document_id}/metadata` Returns metadata for a project document, without the content body.
fields here are computed over the UTF-8 encoding of that text, so a DLP consumer can dedupe or match hashes without downloading every document. -### Path Parameters +#### Path parameters - `document_id: string` The document ID (tagged ID, e.g., claude_proj_doc_abc123) -### Header Parameters +#### Headers - `"x-api-key": optional string` -### Returns +#### Returns - `id: string`
Document creation timestamp + format: date-time + - `filename: string` Document filename
MIME type of the document content, always plain text - - `"text/plain"` + default: text/plain - `size_bytes: number` Size in bytes of the document content (UTF-8 encoded) -- `user: object { id, email_address } or null` +- `user: object or null` The user who created a project or project document.
User's email address -### Example - -```http +#### Example + +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID/metadata \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +##### Response (200) ```json {
} ``` -## Delete project document - -**delete** `/v1/compliance/apps/projects/documents/{document_id}` +### Delete project document + +**DELETE** `/v1/compliance/apps/projects/documents/{document_id}` Delete a project document for compliance purposes. Hard-deletes the project document permanently. -### Path Parameters +#### Path parameters - `document_id: string` The document ID (tagged ID, e.g., claude_proj_doc_abc123) -### Header Parameters +#### Headers - `"x-api-key": optional string` -### Returns +#### Returns - `id: string`
Constant string confirming deletion. - - `"claude_project_document_deleted"` - -### Example - -```http + default: claude_project_document_deleted + +#### Example + +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \ -X DELETE \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +##### Response (200) ```json {
"type": "claude_project_document_deleted" } ``` - -## Domain Types - -### Document Retrieve Response - -- `DocumentRetrieveResponse object { id, content, created_at, 2 more }` - - Project document information for compliance responses. - - - `id: string` - - Project document identifier (tagged ID) - - - `content: string` - - Document text content - - - `created_at: string` - - Document creation timestamp - - - `filename: string` - - Document filename - - - `user: object { id, email_address } or null` - - The user who created a project or project document. - - Fields that reference this type are null when the creator's account has - been deleted or the creator is no longer a member of an organization the - key may read. - - - `id: string` - - User identifier (tagged ID) - - - `email_address: string` - - User's email address - -### Document Metadata Response - -- `DocumentMetadataResponse object { id, claude_project_id, created_at, 5 more }` - - Project document metadata for GET /v1/compliance/apps/projects/documents/{document_id}/metadata. - - Returns metadata only. Use the sibling endpoint (without `/metadata`) - to fetch the document text content. - - - `id: string` - - Project document identifier (tagged ID) - - - `claude_project_id: string` - - The project this document belongs to - - - `created_at: string` - - Document creation timestamp - - - `filename: string` - - Document filename - - - `md5: string` - - Lowercase hex MD5 of the document content (UTF-8 encoded). Matches the `content` field returned by the sibling content endpoint. - - - `mime_type: "text/plain"` - - MIME type of the document content, always plain text - - - `"text/plain"` - - - `size_bytes: number` - - Size in bytes of the document content (UTF-8 encoded) - - - `user: object { id, email_address } or null` - - The user who created a project or project document. - - Fields that reference this type are null when the creator's account has - been deleted or the creator is no longer a member of an organization the - key may read. - - - `id: string` - - User identifier (tagged ID) - - - `email_address: string` - - User's email address - -### Document Delete Response - -- `DocumentDeleteResponse object { id, type }` - - Response for deleting a project document. - - - `id: string` - - The ID of the project document that was deleted - - - `type: "claude_project_document_deleted"` - - Constant string confirming deletion. - - - `"claude_project_document_deleted"`