SPB Git

Repository Public

projects.md 23.2 KB 1,103 lines markdown

1---2title: Projects3url: https://platform.claude.com/docs/en/api/compliance/apps/projects4---56# Projects78## List projects910**GET** `/v1/compliance/apps/projects`1112Lists project metadata with filtering capabilities. Results13are sorted chronologically (time ascending) by created_at.1415### Query parameters1617- `created_at: optional object`1819  - `gt: optional string`2021    Filter projects created after this time (RFC 3339 format)2223    format: date-time2425  - `gte: optional string`2627    Filter projects created at or after this time (RFC 3339 format)2829    format: date-time3031  - `lt: optional string`3233    Filter projects created before this time (RFC 3339 format)3435    format: date-time3637  - `lte: optional string`3839    Filter projects created at or before this time (RFC 3339 format)4041    format: date-time4243- `limit: optional number`4445  Maximum results (default: 20, max: 100)4647  default: 20, maximum: 100, minimum: 14849- `organization_ids: optional array of string`5051  Filter by organization IDs (accepts `org_...` or organization UUID). Enumerate IDs via `GET /v1/compliance/organizations`.5253- `page: optional string`5455  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.5657- `updated_at: optional object`5859  - `gt: optional string`6061    Filter projects updated after this time (RFC 3339 format)6263    format: date-time6465  - `gte: optional string`6667    Filter projects updated at or after this time (RFC 3339 format)6869    format: date-time7071  - `lt: optional string`7273    Filter projects updated before this time (RFC 3339 format)7475    format: date-time7677  - `lte: optional string`7879    Filter projects updated at or before this time (RFC 3339 format)8081    format: date-time8283- `user_ids: optional array of string`8485  Filter by user IDs. Enumerate IDs via `GET /v1/compliance/organizations/{org_uuid}/users`.8687### Headers8889- `"x-api-key": optional string`9091### Returns9293- `data: array of object`9495  List of projects sorted by creation date ascending9697  - `id: string`9899    Project identifier (tagged ID)100101  - `created_at: string`102103    Project creation timestamp104105    format: date-time106107  - `deleted_at: string or null`108109    Timestamp when the project was deleted by an end user, or null otherwise110111    format: date-time112113  - `is_private: boolean`114115    If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators116117  - `name: string`118119    Project name120121  - `organization_uuid: string`122123    Organization UUID this project belongs to124125  - `updated_at: string`126127    Project last update timestamp128129    format: date-time130131  - `user: object or null`132133    The user who created a project or project document.134135    Fields that reference this type are null when the creator's account has136    been deleted or the creator is no longer a member of an organization the137    key may read.138139    - `id: string`140141      User identifier (tagged ID)142143    - `email_address: string`144145      User's email address146147  - `organization_id: string`148149    **Deprecated**150151    Organization identifier (tagged ID)152153- `has_more: boolean`154155  Whether more records exist beyond the current result set156157- `next_page: string or null`158159  Token to retrieve the next page. Use this as the 'page' parameter in your next request160161### Example162163```bash164curl https://api.anthropic.com/v1/compliance/apps/projects \165    -H 'anthropic-version: 2023-06-01' \166    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"167```168169#### Response (200)170171```json172{173  "data": [174    {175      "id": "claude_proj_abc123",176      "name": "Q4 Product Planning",177      "created_at": "2025-06-01T10:00:00Z",178      "updated_at": "2025-06-15T14:30:00Z",179      "is_private": true,180      "organization_id": "org_abc123",181      "organization_uuid": "abc12345-6789-0abc-def0-123456789abc",182      "user": {183        "id": "user_xyz456",184        "email_address": "user@example.com"185      }186    }187  ],188  "has_more": true,189  "next_page": "page_eyJjcmVhdGVkX2F0IjoiMjAyNS0wNi0wMVQxMDowMDowMFoiLCJ1dWlkIjoiYWJjMTIzIn0="190}191```192193## Get project details194195**GET** `/v1/compliance/apps/projects/{project_id}`196197Get detailed information for a specific project.198199### Path parameters200201- `project_id: string`202203  The project ID (tagged ID, e.g., claude_proj_abc123)204205### Headers206207- `"x-api-key": optional string`208209### Returns210211- `id: string`212213  Project identifier (tagged ID)214215- `attachments_count: number`216217  Number of attachments contained within this project218219- `chats_count: number`220221  Number of chats contained within this project222223- `created_at: string`224225  Project creation timestamp226227  format: date-time228229- `deleted_at: string or null`230231  Timestamp when the project was deleted by an end user, or null otherwise232233  format: date-time234235- `description: string`236237  Project description238239- `instructions: string`240241  Project's custom instructions / prompt242243- `is_private: boolean`244245  If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators246247- `name: string`248249  Project name250251- `organization_uuid: string`252253  Organization UUID this project belongs to254255- `updated_at: string`256257  Project last update timestamp258259  format: date-time260261- `user: object or null`262263  The user who created a project or project document.264265  Fields that reference this type are null when the creator's account has266  been deleted or the creator is no longer a member of an organization the267  key may read.268269  - `id: string`270271    User identifier (tagged ID)272273  - `email_address: string`274275    User's email address276277- `organization_id: string`278279  **Deprecated**280281  Organization identifier (tagged ID)282283### Example284285```bash286curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID \287    -H 'anthropic-version: 2023-06-01' \288    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"289```290291#### Response (200)292293```json294{295  "id": "claude_proj_01Nm7PqRsTuVwXyZaBcDeFgH",296  "attachments_count": 3,297  "chats_count": 14,298  "created_at": "2025-03-12T18:22:41.123456Z",299  "deleted_at": "2019-12-27T18:11:19.117Z",300  "description": "Planning and research for the Q3 launch",301  "instructions": "Focus on concise, actionable answers.",302  "is_private": true,303  "name": "Q3 Product Launch",304  "organization_id": "org_015eofRkKpogX7uDKUyvBTph",305  "organization_uuid": "a1b2c3d4-e5f6-4789-a012-3456789abcde",306  "updated_at": "2025-03-14T09:05:17.456789Z",307  "user": {308    "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",309    "email_address": "jane.doe@example.com"310  }311}312```313314## Delete project315316**DELETE** `/v1/compliance/apps/projects/{project_id}`317318Delete a project for compliance purposes.319320Hard-deletes the project and all its associated data including:321322- All project documents and files323- All role assignments324- Knowledge base (if RAG is enabled)325- Sync sources326327Project must have no attached chats - returns 409 if chats exist.328329### Path parameters330331- `project_id: string`332333  The project ID (tagged ID, e.g., claude_proj_abc123)334335### Headers336337- `"x-api-key": optional string`338339### Returns340341- `type: optional "claude_project_deleted"`342343  Constant string confirming deletion.344345  default: claude_project_deleted346347- `id: string`348349  The ID of the Claude project that was deleted350351### Example352353```bash354curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID \355    -X DELETE \356    -H 'anthropic-version: 2023-06-01' \357    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"358```359360#### Response (200)361362```json363{364  "id": "id",365  "type": "claude_project_deleted"366}367```368369## Domain types370371### Project Retrieve Response372373- `ProjectRetrieveResponse object`374375  Detailed project information for compliance responses.376377  - `id: string`378379    Project identifier (tagged ID)380381  - `attachments_count: number`382383    Number of attachments contained within this project384385  - `chats_count: number`386387    Number of chats contained within this project388389  - `created_at: string`390391    Project creation timestamp392393    format: date-time394395  - `deleted_at: string or null`396397    Timestamp when the project was deleted by an end user, or null otherwise398399    format: date-time400401  - `description: string`402403    Project description404405  - `instructions: string`406407    Project's custom instructions / prompt408409  - `is_private: boolean`410411    If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators412413  - `name: string`414415    Project name416417  - `organization_uuid: string`418419    Organization UUID this project belongs to420421  - `updated_at: string`422423    Project last update timestamp424425    format: date-time426427  - `user: object or null`428429    The user who created a project or project document.430431    Fields that reference this type are null when the creator's account has432    been deleted or the creator is no longer a member of an organization the433    key may read.434435    - `id: string`436437      User identifier (tagged ID)438439    - `email_address: string`440441      User's email address442443  - `organization_id: string`444445    **Deprecated**446447    Organization identifier (tagged ID)448449### Project List Response450451- `ProjectListResponse object`452453  Project information for compliance responses.454455  - `id: string`456457    Project identifier (tagged ID)458459  - `created_at: string`460461    Project creation timestamp462463    format: date-time464465  - `deleted_at: string or null`466467    Timestamp when the project was deleted by an end user, or null otherwise468469    format: date-time470471  - `is_private: boolean`472473    If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators474475  - `name: string`476477    Project name478479  - `organization_uuid: string`480481    Organization UUID this project belongs to482483  - `updated_at: string`484485    Project last update timestamp486487    format: date-time488489  - `user: object or null`490491    The user who created a project or project document.492493    Fields that reference this type are null when the creator's account has494    been deleted or the creator is no longer a member of an organization the495    key may read.496497    - `id: string`498499      User identifier (tagged ID)500501    - `email_address: string`502503      User's email address504505  - `organization_id: string`506507    **Deprecated**508509    Organization identifier (tagged ID)510511### Project Delete Response512513- `ProjectDeleteResponse object`514515  Response for deleting a Claude project.516517  - `type: optional "claude_project_deleted"`518519    Constant string confirming deletion.520521    default: claude_project_deleted522523  - `id: string`524525    The ID of the Claude project that was deleted526527## Projects › Attachments528529### List project attachments530531**GET** `/v1/compliance/apps/projects/{project_id}/attachments`532533List files and documents attached to a project.534535List files and project documents attached to the project referenced by project_id.536This includes the IDs of attached files, and attached project documents.537538The raw binary content of attached files can be downloaded using the539GET /v1/compliance/apps/chats/files/{claude_file_id}/content endpoint.540541The text content of attached project documents can be fetched using the542GET /v1/compliance/apps/projects/documents/{claude_proj_doc_id} endpoint.543544#### Path parameters545546- `project_id: string`547548  The project ID (tagged ID, e.g., claude_proj_abc123)549550#### Query parameters551552- `limit: optional number`553554  Maximum results (default: 20, max: 100)555556  default: 20, maximum: 100, minimum: 1557558- `page: optional string`559560  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.561562#### Headers563564- `"x-api-key": optional string`565566#### Returns567568- `data: array of ComplianceProjectFileReference or ComplianceProjectDocReference`569570  List of attachments sorted chronologically by created_at, tie break by id571572  - `ComplianceProjectFileReference object`573574    File attachment reference for compliance responses.575576    - `type: "project_file"`577578      Discriminator marking this as a binary file579580      default: project_file581582    - `id: string`583584      File identifier (e.g., 'claude_file_abcd')585586    - `created_at: string`587588      Creation timestamp (RFC 3339 format)589590      format: date-time591592    - `filename: string`593594      Display name of the file (e.g., 'document.pdf')595596    - `md5: string or null`597598      Lowercase hex MD5 of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file `/metadata` endpoint for the authoritative value.599600    - `mime_type: string`601602      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.603604    - `size_bytes: number or null`605606      Size in bytes of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file `/metadata` endpoint for the authoritative value.607608  - `ComplianceProjectDocReference object`609610    Project document attachment reference for compliance responses.611612    - `type: "project_doc"`613614      Discriminator marking this as a plain text document615616      default: project_doc617618    - `id: string`619620      Project document identifier (e.g., 'claude_proj_doc_abcd')621622    - `created_at: string`623624      Creation timestamp (RFC 3339 format)625626      format: date-time627628    - `filename: string`629630      Display name of the document (e.g., 'document.txt')631632    - `mime_type: "text/plain"`633634      MIME type of the project document, always set to plain text635636      default: text/plain637638    - `updated_at: string or null`639640      Last-modified timestamp of the document. Reserved for future use — currently always null.641642      format: date-time643644- `has_more: boolean`645646  Whether more records exist beyond the current result set647648- `next_page: string or null`649650  To get the next page, use the 'next_page' from the current response as the 'page' in your next request651652#### Example653654```bash655curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/attachments \656    -H 'anthropic-version: 2023-06-01' \657    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"658```659660##### Response (200)661662```json663{664  "data": [665    {666      "id": "id",667      "created_at": "2019-12-27T18:11:19.117Z",668      "filename": "filename",669      "md5": "md5",670      "mime_type": "mime_type",671      "size_bytes": 0,672      "type": "project_file"673    }674  ],675  "has_more": true,676  "next_page": "next_page"677}678```679680## Projects › Collaborators681682### List project collaborators683684**GET** `/v1/compliance/apps/projects/{project_id}/collaborators`685686List the users, groups, and organization-wide grants on a project.687688Each entry represents one active role assignment on the project. Principals689are returned as a discriminated union on `type` — an individual user, an690RBAC group, the whole organization, or all holders of an organization-level691role.692693#### Path parameters694695- `project_id: string`696697  The project ID (tagged ID, e.g., claude_proj_abc123)698699#### Query parameters700701- `limit: optional number`702703  Maximum results (default: 20, max: 100)704705  default: 20, maximum: 100, minimum: 1706707- `page: optional string`708709  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.710711#### Headers712713- `"x-api-key": optional string`714715#### Returns716717- `data: array of ComplianceProjectUserCollaborator or ComplianceProjectGroupCollaborator or ComplianceProjectOrganizationCollaborator or ComplianceProjectOrganizationRoleCollaborator`718719  List of collaborators sorted chronologically by granted_at, tie break by the underlying role-assignment UUID720721  - `ComplianceProjectUserCollaborator object`722723    An individual user granted a role on a project.724725    - `type: "user"`726727      Discriminator marking this as an individual user collaborator728729      default: user730731    - `granted_at: string`732733      When this collaborator was granted access (RFC 3339 format)734735      format: date-time736737    - `role: "admin" or "editor" or "owner" or "viewer"`738739      Role granted on the project740741      - `"admin"`742743      - `"editor"`744745      - `"owner"`746747      - `"viewer"`748749    - `user_id: string or null`750751      Identifier of the user granted access (tagged ID), or null if their account has since been deleted752753  - `ComplianceProjectGroupCollaborator object`754755    An RBAC group granted a role on a project.756757    - `type: "group"`758759      Discriminator marking this as a group collaborator760761      default: group762763    - `granted_at: string`764765      When this collaborator was granted access (RFC 3339 format)766767      format: date-time768769    - `group_id: string`770771      Identifier of the group granted access (tagged ID)772773    - `role: "admin" or "editor" or "owner" or "viewer"`774775      Role granted on the project776777      - `"admin"`778779      - `"editor"`780781      - `"owner"`782783      - `"viewer"`784785  - `ComplianceProjectOrganizationCollaborator object`786787    An entire organization granted a role on a project.788789    - `type: "organization"`790791      Discriminator marking this as an organization-wide grant792793      default: organization794795    - `granted_at: string`796797      When this collaborator was granted access (RFC 3339 format)798799      format: date-time800801    - `organization_uuid: string`802803      UUID of the organization granted access804805    - `role: "admin" or "editor" or "owner" or "viewer"`806807      Role granted on the project808809      - `"admin"`810811      - `"editor"`812813      - `"owner"`814815      - `"viewer"`816817  - `ComplianceProjectOrganizationRoleCollaborator object`818819    All holders of an organization-level role granted a role on a project.820821    - `type: "organization_role"`822823      Discriminator marking this as a grant to all organization members holding a specific org-level role824825      default: organization_role826827    - `granted_at: string`828829      When this collaborator was granted access (RFC 3339 format)830831      format: date-time832833    - `organization_role: string`834835      The organization-level role whose holders are granted access836837    - `role: "admin" or "editor" or "owner" or "viewer"`838839      Role granted on the project840841      - `"admin"`842843      - `"editor"`844845      - `"owner"`846847      - `"viewer"`848849- `has_more: boolean`850851  Whether more records exist beyond the current result set852853- `next_page: string or null`854855  To get the next page, use the 'next_page' from the current response as the 'page' in your next request856857#### Example858859```bash860curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/collaborators \861    -H 'anthropic-version: 2023-06-01' \862    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"863```864865##### Response (200)866867```json868{869  "data": [870    {871      "granted_at": "2019-12-27T18:11:19.117Z",872      "role": "admin",873      "type": "user",874      "user_id": "user_id"875    }876  ],877  "has_more": true,878  "next_page": "next_page"879}880```881882## Projects › Documents883884### Get project document content885886**GET** `/v1/compliance/apps/projects/documents/{document_id}`887888Get detailed information for a specific project document.889890#### Path parameters891892- `document_id: string`893894  The document ID (tagged ID, e.g., claude_proj_doc_abc123)895896#### Headers897898- `"x-api-key": optional string`899900#### Returns901902- `id: string`903904  Project document identifier (tagged ID)905906- `content: string`907908  Document text content909910- `created_at: string`911912  Document creation timestamp913914  format: date-time915916- `filename: string`917918  Document filename919920- `user: object or null`921922  The user who created a project or project document.923924  Fields that reference this type are null when the creator's account has925  been deleted or the creator is no longer a member of an organization the926  key may read.927928  - `id: string`929930    User identifier (tagged ID)931932  - `email_address: string`933934    User's email address935936#### Example937938```bash939curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \940    -H 'anthropic-version: 2023-06-01' \941    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"942```943944##### Response (200)945946```json947{948  "id": "claude_proj_doc_01Qr8StUvWxYzAbCdEfGhJjK",949  "content": "# Design notes\n\n- Item one\n- Item two\n",950  "created_at": "2025-03-12T18:22:41.123456Z",951  "filename": "design-notes.txt",952  "user": {953    "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",954    "email_address": "jane.doe@example.com"955  }956}957```958959### Get project document metadata960961**GET** `/v1/compliance/apps/projects/documents/{document_id}/metadata`962963Returns metadata for a project document, without the content body.964965Use the sibling `GET /v1/compliance/apps/projects/documents/{document_id}`966endpoint to fetch the document text. The `md5` and `size_bytes`967fields here are computed over the UTF-8 encoding of that text, so a DLP968consumer can dedupe or match hashes without downloading every document.969970#### Path parameters971972- `document_id: string`973974  The document ID (tagged ID, e.g., claude_proj_doc_abc123)975976#### Headers977978- `"x-api-key": optional string`979980#### Returns981982- `id: string`983984  Project document identifier (tagged ID)985986- `claude_project_id: string`987988  The project this document belongs to989990- `created_at: string`991992  Document creation timestamp993994  format: date-time995996- `filename: string`997998  Document filename9991000- `md5: string`10011002  Lowercase hex MD5 of the document content (UTF-8 encoded). Matches the `content` field returned by the sibling content endpoint.10031004- `mime_type: "text/plain"`10051006  MIME type of the document content, always plain text10071008  default: text/plain10091010- `size_bytes: number`10111012  Size in bytes of the document content (UTF-8 encoded)10131014- `user: object or null`10151016  The user who created a project or project document.10171018  Fields that reference this type are null when the creator's account has1019  been deleted or the creator is no longer a member of an organization the1020  key may read.10211022  - `id: string`10231024    User identifier (tagged ID)10251026  - `email_address: string`10271028    User's email address10291030#### Example10311032```bash1033curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID/metadata \1034    -H 'anthropic-version: 2023-06-01' \1035    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"1036```10371038##### Response (200)10391040```json1041{1042  "id": "id",1043  "claude_project_id": "claude_project_id",1044  "created_at": "2019-12-27T18:11:19.117Z",1045  "filename": "filename",1046  "md5": "md5",1047  "mime_type": "text/plain",1048  "size_bytes": 0,1049  "user": {1050    "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",1051    "email_address": "jane.doe@example.com"1052  }1053}1054```10551056### Delete project document10571058**DELETE** `/v1/compliance/apps/projects/documents/{document_id}`10591060Delete a project document for compliance purposes.10611062Hard-deletes the project document permanently.10631064#### Path parameters10651066- `document_id: string`10671068  The document ID (tagged ID, e.g., claude_proj_doc_abc123)10691070#### Headers10711072- `"x-api-key": optional string`10731074#### Returns10751076- `type: "claude_project_document_deleted"`10771078  Constant string confirming deletion.10791080  default: claude_project_document_deleted10811082- `id: string`10831084  The ID of the project document that was deleted10851086#### Example10871088```bash1089curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \1090    -X DELETE \1091    -H 'anthropic-version: 2023-06-01' \1092    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"1093```10941095##### Response (200)10961097```json1098{1099  "id": "id",1100  "type": "claude_project_document_deleted"1101}1102```1103
Files main
Menu

Theme