Add a collaborator to a Copilot Space for a user
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
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The handle for the GitHub user account.
The unique identifier of the Copilot Space.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The type of actor (must be User for user-owned spaces; Team will be rejected).
The username of the collaborator. The numeric user ID is also accepted.
The role to grant to the collaborator.
Examples
{ "actor_type": "User", "actor_identifier": "octocat", "role": "writer"}Responses
Section titled “Responses”Response
A collaborator (user or team) of a Copilot Space
object
The collaborator actor type.
The role granted to the collaborator
A collaborator (user or team) of a Copilot Space
object
The collaborator actor type.
The role granted to the collaborator
Examples
{ "actor_type": "User", "role": "writer", "login": "octocat", "id": 12345, "node_id": "MDQ6VXNlcjEyMzQ1", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "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", "user_view_type": "public", "site_admin": false, "name": "The Octocat", "company": "GitHub", "blog": "https://github.com/blog", "location": "San Francisco", "email": "octocat@github.com", "hireable": false, "bio": "There once was...", "twitter_username": "octocat", "public_repos": 2, "public_gists": 1, "followers": 20, "following": 0, "created_at": "2008-01-14T04:33:35Z", "updated_at": "2008-01-14T04:33:35Z"}Forbidden
Basic Error
object
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Examplegenerated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}