Copilot Spaces collaborators

Use the REST API to manage collaborators for Copilot Spaces.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List collaborators for an organization Copilot Space

GET /orgs/{org}/copilot-spaces/{space_number}/collaborators

Lists all collaborators for a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to view collaborators.
Each collaborator entry specifies which user or team has access to the space and at what level (reader, writer, or admin). The space owner (organization) is excluded from this list.
Note: Team collaborators listed here are teams that are defined in the organization.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
Fine-grained tokens and GitHub App user access tokens must have been granted access to the organization that owns the space. They must also have been granted access to every repository referenced by resources in the space.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators

Response schema (Status: 200):

Add a collaborator to an organization Copilot Space

POST /orgs/{org}/copilot-spaces/{space_number}/collaborators

Adds a collaborator (user or team) to a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.
Note: When adding users as collaborators, they must already be members of the organization.
When adding teams as collaborators, they must be defined in the organization.
OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Fine-grained tokens and GitHub App user access tokens must have been granted access to the organization that owns the space. They must also have been granted access to every repository referenced by resources in the space.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example 1: Status Code 201

Request:

curl -L \
  -X POST \
  https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators \
  -d '{
  "actor_type": "User",
  "actor_identifier": "octocat",
  "role": "writer"
}'

Response schema (Status: 201):

Example 2: Status Code 201

Request:

curl -L \
  -X POST \
  https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators \
  -d '{
  "actor_type": "Team",
  "actor_identifier": "developers",
  "role": "reader"
}'

Response schema (Status: 201):

Set a collaborator role for an organization Copilot Space

PUT /orgs/{org}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}

Updates the role of a collaborator for a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.
OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Fine-grained tokens and GitHub App user access tokens must have been granted access to the organization that owns the space. They must also have been granted access to every repository referenced by resources in the space.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example 1: Status Code 200

Request:

curl -L \
  -X PUT \
  https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER \
  -d '{
  "role": "admin"
}'

Response schema (Status: 200):

Same response schema as Add a collaborator to an organization Copilot Space.

Example 2: Status Code 200

Request:

curl -L \
  -X PUT \
  https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER \
  -d '{
  "role": "admin"
}'

Response schema (Status: 200):

Same response schema as Add a collaborator to an organization Copilot Space.

Remove a collaborator from an organization Copilot Space

DELETE /orgs/{org}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}

Removes a collaborator from a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.
OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Fine-grained tokens and GitHub App user access tokens must have been granted access to the organization that owns the space. They must also have been granted access to every repository referenced by resources in the space.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER

Response schema (Status: 204):

List collaborators for a Copilot Space for a user

GET /users/{username}/copilot-spaces/{space_number}/collaborators

Lists all collaborators for a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.
Each collaborator entry specifies which user has access to the space and at what level (reader, writer, or admin). The space owner is excluded from this list.
Team collaborators are not supported for user-owned Copilot Spaces.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/users/USERNAME/copilot-spaces/SPACE_NUMBER/collaborators

Response schema (Status: 200):

Same response schema as List collaborators for an organization Copilot Space.

Add a collaborator to a Copilot Space for a user

POST /users/{username}/copilot-spaces/{space_number}/collaborators

Adds a collaborator to a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.
Team collaborators are not supported for user-owned Copilot Spaces.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/users/USERNAME/copilot-spaces/SPACE_NUMBER/collaborators \
  -d '{
  "actor_type": "User",
  "actor_identifier": "octocat",
  "role": "writer"
}'

Response schema (Status: 201):

Same response schema as Add a collaborator to an organization Copilot Space.

Set a collaborator role for a Copilot Space for a user

PUT /users/{username}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}

Updates the role of a collaborator for a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/users/USERNAME/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER \
  -d '{
  "role": "admin"
}'

Response schema (Status: 200):

Same response schema as Add a collaborator to an organization Copilot Space.

Remove a collaborator from a Copilot Space for a user

DELETE /users/{username}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}

Removes a collaborator from a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/users/USERNAME/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER

Response schema (Status: 204):