Claude Platform Docs

To enable the Compliance API, see the setup guide.

Set up the Compliance API

列出项目协作者

GET/v1/compliance/apps/projects/{project_id}/collaborators

列出项目上的用户、群组和组织范围的授权。

每个条目代表项目上的一个活跃角色分配。主体以基于 type 的可辨识联合类型返回——可以是单个用户、RBAC 群组、整个组织,或某个组织级角色的所有持有者。

Path parameters
project_id: string

The project ID (tagged ID, e.g., claude_proj_abc123)

Query parameters
limit: optional number

Maximum results (default: 20, max: 100)

default20
minimum1
maximum100
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.

Headers
"anthropic-version": string

The version of the Claude API to use. Send an available version on every request. A request that sends any other value, including an empty one, returns a 400 error. This endpoint treats a request that omits this header as version 2023-06-01; some other Compliance API endpoints return a 400 error instead.

See API versions for the available versions.

"x-api-key": optional string
Returns
data: array of User or Group or Organization or OrganizationRole

List of collaborators sorted chronologically by granted_at, tie break by the underlying role-assignment UUID

One of the following:
User object{ type: "user", granted_at, role, user_id }

An individual user granted a role on a project.

type: "user"

Discriminator marking this as an individual user collaborator

defaultuser
granted_at: string

When this collaborator was granted access (RFC 3339 format)

formatdate-time
role: "admin" or "editor" or "owner" or "viewer"

Role granted on the project

One of the following:
"admin"
"editor"
"owner"
"viewer"
user_id: string or null

Identifier of the user granted access (tagged ID), or null if their account has since been deleted

Group object{ type: "group", granted_at, group_id, role }

An RBAC group granted a role on a project.

type: "group"

Discriminator marking this as a group collaborator

defaultgroup
granted_at: string

When this collaborator was granted access (RFC 3339 format)

formatdate-time
group_id: string

Identifier of the group granted access (tagged ID)

role: "admin" or "editor" or "owner" or "viewer"

Role granted on the project

One of the following:
"admin"
"editor"
"owner"
"viewer"
Organization object{ type: "organization", granted_at, organization_uuid, role }

An entire organization granted a role on a project.

type: "organization"

Discriminator marking this as an organization-wide grant

defaultorganization
granted_at: string

When this collaborator was granted access (RFC 3339 format)

formatdate-time
organization_uuid: string

UUID of the organization granted access

role: "admin" or "editor" or "owner" or "viewer"

Role granted on the project

One of the following:
"admin"
"editor"
"owner"
"viewer"
OrganizationRole object{ type: "organization_role", granted_at, organization_role, role }

All holders of an organization-level role granted a role on a project.

type: "organization_role"

Discriminator marking this as a grant to all organization members holding a specific org-level role

defaultorganization_role
granted_at: string

When this collaborator was granted access (RFC 3339 format)

formatdate-time
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

One of the following:
"admin"
"editor"
"owner"
"viewer"
has_more: boolean

Whether more records exist beyond the current result set

next_page: string or null

To get the next page, use the 'next_page' from the current response as the 'page' in your next request

列出项目协作者
cURL
curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/collaborators \
    -H 'anthropic-version: 2026-10-21' \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
Returns Examples
Response 200
{
  "data": [
    {
      "granted_at": "2019-12-27T18:11:19.117Z",
      "role": "admin",
      "type": "user",
      "user_id": "user_id"
    }
  ],
  "has_more": true,
  "next_page": "next_page"
}