provider copilot-spaces POST /users/{username}/copilot-spaces/{space_number}/collaborators
@utdk/github /users/{username}/copilot-spaces/{space_number}/collaborators
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.
username path required
The handle for the GitHub user account.
string
space_number path required
The unique identifier of the Copilot Space.
integer

Try it

Authentication
Configure credentials for GitHub v3 REST API
copilotSpaces.addCollaboratorForUser
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

required

The handle for the GitHub user account.

required

The unique identifier of the Copilot Space.

Input

required

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

required

The username of the collaborator. The numeric user ID is also accepted.

required

The role to grant to the collaborator.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.copilotSpaces.addCollaboratorForUser()