v56

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

Set a collaborator role for a Copilot Space for a user

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.

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

Path parameters

usernamestring required

The handle for the GitHub user account.

space_numberinteger required

The unique identifier of the Copilot Space.

actor_type'User' | 'Team' required

The type of actor (must be User for user-owned spaces; Team will be rejected).

actor_identifierstring required

The username of the collaborator. The numeric user ID 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"
}