v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.2 MB
copilot-spaces

Set a collaborator role for an organization Copilot Space

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.

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

Path parameters

orgstring required

The organization name. The name is not case sensitive.

space_numberinteger required

The unique identifier of the Copilot Space.

actor_type'User' | 'Team' required

The type of actor (user or team).

actor_identifierstring required

The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.

Request body

role'reader' | 'writer' | 'admin' | 'no_access' required

The new role to grant to the collaborator. Use no_access to remove the collaborator.

Response

Response

OR

Example response

{
  "login": "octocat",
  "id": 1,
  "node_id": "MDQ6VXNlcjE=",
  "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
  "url": "https://api.github.com/users/octocat",
  "html_url": "https://github.com/octocat",
  "followers_url": "https://api.github.com/users/octocat/followers",
  "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  "organizations_url": "https://api.github.com/users/octocat/orgs",
  "repos_url": "https://api.github.com/users/octocat/repos",
  "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  "received_events_url": "https://api.github.com/users/octocat/received_events",
  "type": "User",
  "starred_at": "\"2020-07-09T00:17:55Z\"",
  "user_view_type": "public"
}