Add teams to the Copilot subscription for an organization
[!NOTE] This endpoint is in public preview and is subject to change.
Purchases a GitHub Copilot seat for all users within each specified team. The organization will be billed for each seat based on the organization’s Copilot plan. For more information about Copilot pricing, see “About billing for GitHub Copilot in your organization.”
Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. For more information about setting up a Copilot subscription, see “Subscribing to Copilot for your organization.” For more information about setting a suggestion matching policy, see “Managing policies for Copilot in your organization.”
The response contains the total number of new seats that were created and existing seats that were refreshed.
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
List of team names within the organization to which to grant access to GitHub Copilot.
Examples
{ "selected_teams": [ "engteam1", "engteam2", "engteam3" ]}Responses
Section titled “ Responses ”OK
The total number of seats created for members of the specified team(s).
object
Examples
{ "seats_created": 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, or the organization’s Copilot access setting is set to enable Copilot for all users or is unconfigured.
Internal Error
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}