Remove users from the Copilot subscription for an organization
[!NOTE] This endpoint is in public preview and is subject to change.
Sets seats for all users specified to “pending cancellation”. This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. For more information about disabling access to Copilot, see “Revoking access to Copilot for members of your organization.”
Only organization owners can cancel Copilot seats for their organization members.
The response contains the total number of seats set to “pending cancellation”.
OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ”object
The usernames of the organization members for which to revoke access to GitHub Copilot.
Examples
{ "selected_usernames": [ "cooluser1", "hacker2", "octocat" ]}Responses
Section titled “ Responses ”OK
The total number of seats set to “pending cancellation” for the specified users.
object
Examples
{ "seats_cancelled": 5}Requires authentication
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, the seat management setting is set to enable Copilot for all users or is unconfigured, or a user’s seat cannot be cancelled because it was assigned to them via a team.
Internal Error
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}