Skip to content

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.

API method documentation

username
required
string

The handle for the GitHub user account.

space_number
required
integer

The unique identifier of the Copilot Space.

actor_type
required
string
Allowed values: User Team

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

actor_identifier
required
string

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

Response

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}