{"meta":{"title":"Copilotユーザー管理のためのREST APIエンドポイント","intro":"REST API を使用して、組織の GitHub Copilot ビジネス または GitHub Copilot Enterprise サブスクリプションを管理します。","product":"REST API","breadcrumbs":[{"href":"/ja/enterprise-cloud@latest/rest","title":"REST API"},{"href":"/ja/enterprise-cloud@latest/rest/copilot","title":"Copilot"},{"href":"/ja/enterprise-cloud@latest/rest/copilot/copilot-user-management","title":"Copilotのユーザー管理"}],"documentType":"article"},"body":"# Copilotユーザー管理のためのREST APIエンドポイント\n\nREST API を使用して、組織の GitHub Copilot ビジネス サブスクリプションを管理します。\n\n> [!NOTE] このエンドポイントは パブリック プレビュー にあり、変更される可能性があります。\n\n> [!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## List all Copilot seat assignments for an enterprise\n\n```\nGET /enterprises/{enterprise}/copilot/billing/seats\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nLists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.\nUsers with access through multiple organizations or enterprise teams will only be counted toward total_seats once.\nFor each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the seats array.\nEach seat object contains information about the assigned user's most recent Copilot activity. Users must have\ntelemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at. For more information about activity data,\nsee Metrics data properties for GitHub Copilot.\nOnly enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.\nPersonal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n- **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `50`\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/enterprises/ENTERPRISE/copilot/billing/seats\n```\n\n**Response schema (Status: 200):**\n\n* `total_seats`: integer\n* `seats`: array of `Copilot Business Seat Detail`:\n  * `assignee`: any of:\n    * **null**\n    * **Simple User**\n      * `name`: string or null\n      * `email`: string or null\n      * `login`: required, string\n      * `id`: required, integer, format: int64\n      * `node_id`: required, string\n      * `avatar_url`: required, string, format: uri\n      * `gravatar_id`: required, string or null\n      * `url`: required, string, format: uri\n      * `html_url`: required, string, format: uri\n      * `followers_url`: required, string, format: uri\n      * `following_url`: required, string\n      * `gists_url`: required, string\n      * `starred_url`: required, string\n      * `subscriptions_url`: required, string, format: uri\n      * `organizations_url`: required, string, format: uri\n      * `repos_url`: required, string, format: uri\n      * `events_url`: required, string\n      * `received_events_url`: required, string, format: uri\n      * `type`: required, string\n      * `site_admin`: required, boolean\n      * `starred_at`: string\n      * `user_view_type`: string\n  * `organization`: any of:\n    * **null**\n    * **Organization Simple**\n      * `login`: required, string\n      * `id`: required, integer\n      * `node_id`: required, string\n      * `url`: required, string, format: uri\n      * `repos_url`: required, string, format: uri\n      * `events_url`: required, string, format: uri\n      * `hooks_url`: required, string\n      * `issues_url`: required, string\n      * `members_url`: required, string\n      * `public_members_url`: required, string\n      * `avatar_url`: required, string\n      * `description`: required, string or null\n  * `assigning_team`: one of:\n    * **Team**\n      * `id`: required, integer\n      * `node_id`: required, string\n      * `name`: required, string\n      * `slug`: required, string\n      * `description`: required, string or null\n      * `privacy`: string\n      * `notification_setting`: string\n      * `permission`: required, string\n      * `permissions`: object:\n        * `pull`: required, boolean\n        * `triage`: required, boolean\n        * `push`: required, boolean\n        * `maintain`: required, boolean\n        * `admin`: required, boolean\n      * `url`: required, string, format: uri\n      * `html_url`: required, string, format: uri\n      * `members_url`: required, string\n      * `repositories_url`: required, string, format: uri\n      * `type`: required, string, enum: `enterprise`, `organization`\n      * `access_source`: string, enum: `direct`, `organization`, `enterprise`\n      * `organization_id`: integer\n      * `enterprise_id`: integer\n      * `parent`: required, any of:\n        * **null**\n        * **Team Simple**\n          * `id`: required, integer\n          * `node_id`: required, string\n          * `url`: required, string, format: uri\n          * `members_url`: required, string\n          * `name`: required, string\n          * `description`: required, string or null\n          * `permission`: required, string\n          * `privacy`: string\n          * `notification_setting`: string\n          * `html_url`: required, string, format: uri\n          * `repositories_url`: required, string, format: uri\n          * `slug`: required, string\n          * `ldap_dn`: string\n          * `type`: required, string, enum: `enterprise`, `organization`\n          * `organization_id`: integer\n          * `enterprise_id`: integer\n    * **Enterprise Team**\n      * `id`: required, integer, format: int64\n      * `name`: required, string\n      * `description`: string\n      * `slug`: required, string\n      * `url`: required, string, format: uri\n      * `sync_to_organizations`: string\n      * `organization_selection_type`: string\n      * `group_id`: required, string or null\n      * `group_name`: string or null\n      * `html_url`: required, string, format: uri\n      * `members_url`: required, string\n      * `created_at`: required, string, format: date-time\n      * `updated_at`: required, string, format: date-time\n      * `notification_setting`: string, enum: `notifications_enabled`, `notifications_disabled`\n  * `pending_cancellation_date`: string or null, format: date\n  * `last_activity_at`: string or null, format: date-time\n  * `last_activity_editor`: string or null\n  * `last_authenticated_at`: string or null, format: date-time\n  * `created_at`: required, string, format: date-time\n  * `updated_at`: string, format: date-time, deprecated\n  * `plan_type`: string, enum: `business`, `enterprise`, `unknown`\n\n## Add enterprise teams to the Copilot subscription for an enterprise\n\n```\nPOST /enterprises/{enterprise}/copilot/billing/selected_enterprise_teams\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nPurchases a GitHub Copilot seat for all users within each specified enterprise team. The enterprise will be billed accordingly.\nOnly enterprise owners can purchase Copilot seats for their enterprise members.\nThe response contains the total number of new seats that were created and existing seats that were refreshed.\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n#### Body parameters\n\n- **`selected_enterprise_teams`** (array of strings) (required)\n  List of enterprise team names within the enterprise to which to grant access to GitHub Copilot.\n\n### HTTP response status codes\n\n- **201** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - Copilot Business is not enabled for this enterprise, billing has not been set up for this enterprise or a public code suggestions policy has not been set for this enterprise.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/enterprises/ENTERPRISE/copilot/billing/selected_enterprise_teams \\\n  -d '{\n  \"selected_enterprise_teams\": [\n    \"engteam1\",\n    \"engteam2\",\n    \"engteam3\"\n  ]\n}'\n```\n\n**Response schema (Status: 201):**\n\n* `seats_created`: required, integer\n\n## Remove enterprise teams from the Copilot subscription for an enterprise\n\n```\nDELETE /enterprises/{enterprise}/copilot/billing/selected_enterprise_teams\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nSets seats for all members of each enterprise team specified to \"pending cancellation\".\nThis will cause the members of the specified enterprise team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another enterprise team.\nOnly enterprise owners can cancel Copilot seats for their enterprise members.\nThe response contains the total number of seats set to \"pending cancellation\".\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n#### Body parameters\n\n- **`selected_enterprise_teams`** (array of strings) (required)\n  List of enterprise team names within the enterprise to which to grant access to GitHub Copilot.\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **202** - Accepted\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - Copilot Business is not enabled for this enterprise, billing has not been set up for this enterprise or a public code suggestions policy has not been set for this enterprise.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example 1: Status Code 200\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/enterprises/ENTERPRISE/copilot/billing/selected_enterprise_teams \\\n  -d '{\n  \"selected_enterprise_teams\": [\n    \"engteam1\",\n    \"engteam2\",\n    \"engteam3\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\n* `seats_cancelled`: required, integer\n\n#### Example 2: Status Code 202\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/enterprises/ENTERPRISE/copilot/billing/selected_enterprise_teams \\\n  -d '{\n  \"selected_enterprise_teams\": [\n    \"engteam1\",\n    \"engteam2\",\n    \"engteam3\"\n  ]\n}'\n```\n\n**Response schema (Status: 202):**\n\n* `message`: string\n\n## Add users to the Copilot subscription for an enterprise\n\n```\nPOST /enterprises/{enterprise}/copilot/billing/selected_users\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nPurchases a GitHub Copilot seat for each user specified.\nThe enterprise will be billed accordingly.\nOnly enterprise owners can purchase Copilot seats for their enterprise members.\nThe response contains the total number of new seats that were created and existing seats that were refreshed.\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n#### Body parameters\n\n- **`selected_usernames`** (array of strings) (required)\n  The usernames of the enterprise members to be granted access to GitHub Copilot.\n\n### HTTP response status codes\n\n- **201** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - Copilot is not enabled for this enterprise, billing has not been set up for this enterprise, a public code suggestions policy has not been set for this enterprise, or the enterprise's Copilot access setting is set to enable Copilot for all users or is unconfigured.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/enterprises/ENTERPRISE/copilot/billing/selected_users \\\n  -d '{\n  \"selected_usernames\": [\n    \"cooluser1\",\n    \"hacker2\",\n    \"octocat\"\n  ]\n}'\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Add enterprise teams to the Copilot subscription for an enterprise](#add-enterprise-teams-to-the-copilot-subscription-for-an-enterprise).\n\n## Remove users from the Copilot subscription for an enterprise\n\n```\nDELETE /enterprises/{enterprise}/copilot/billing/selected_users\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nSets seats for all users specified to \"pending cancellation\".\nThis 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 or organization membership.\nOnly enterprise owners can cancel Copilot seats for their enterprise members.\nThe response contains the total number of seats set to \"pending cancellation\".\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n#### Body parameters\n\n- **`selected_usernames`** (array of strings) (required)\n  The usernames of the enterprise members for which to revoke access to GitHub Copilot.\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - Copilot is not enabled for this enterprise, billing has not been set up for this enterprise, a public code suggestions policy has not been set for this enterprise, or the enterprise's Copilot access setting is set to enable Copilot for all users or is unconfigured.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/enterprises/ENTERPRISE/copilot/billing/selected_users \\\n  -d '{\n  \"selected_usernames\": [\n    \"cooluser1\",\n    \"hacker2\",\n    \"octocat\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Remove enterprise teams from the Copilot subscription for an enterprise](#remove-enterprise-teams-from-the-copilot-subscription-for-an-enterprise).\n\n## Get Copilot seat assignment details for an enterprise user\n\n```\nGET /enterprises/{enterprise}/members/{username}/copilot\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nGets the GitHub Copilot seat details for a member of an enterprise who currently has access to GitHub Copilot.\nThe seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at.\nOnly enterprise owners can view Copilot seat assignment details for members of their enterprise.\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n- **`username`** (string) (required)\n  The handle for the GitHub user account.\n\n### HTTP response status codes\n\n- **200** - The user's GitHub Copilot seat details, including usage.\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - Copilot Business or Enterprise is not enabled for this enterprise.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/enterprises/ENTERPRISE/members/USERNAME/copilot\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List all Copilot seat assignments for an enterprise](#list-all-copilot-seat-assignments-for-an-enterprise).\n\n## Get Copilot seat information and settings for an organization\n\n```\nGET /orgs/{org}/copilot/billing\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nGets information about an organization's Copilot subscription, including seat breakdown\nand feature policies. To configure these settings, go to your organization's settings on GitHub.com.\nFor more information, see \"Managing policies for Copilot in your organization.\"\nOnly organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - There is a problem with your account's associated payment method.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/copilot/billing\n```\n\n**Response schema (Status: 200):**\n\n* `seat_breakdown`: required, `Copilot Seat Breakdown`:\n  * `total`: integer\n  * `added_this_cycle`: integer\n  * `pending_cancellation`: integer\n  * `pending_invitation`: integer\n  * `active_this_cycle`: integer\n  * `inactive_this_cycle`: integer\n* `public_code_suggestions`: required, string, enum: `allow`, `block`, `unconfigured`\n* `ide_chat`: string, enum: `enabled`, `disabled`, `unconfigured`\n* `platform_chat`: string, enum: `enabled`, `disabled`, `unconfigured`\n* `cli`: string, enum: `enabled`, `disabled`, `unconfigured`\n* `seat_management_setting`: required, string, enum: `assign_all`, `assign_selected`, `disabled`, `unconfigured`\n* `plan_type`: string, enum: `business`, `enterprise`\n\n## List all Copilot seat assignments for an organization\n\n```\nGET /orgs/{org}/copilot/billing/seats\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nLists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.\nOnly organization owners can view assigned seats.\nEach seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at.\nFor more information about activity data, see Metrics data properties for GitHub Copilot.\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `50`\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/copilot/billing/seats\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List all Copilot seat assignments for an enterprise](#list-all-copilot-seat-assignments-for-an-enterprise).\n\n## Add teams to the Copilot subscription for an organization\n\n```\nPOST /orgs/{org}/copilot/billing/selected_teams\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nPurchases a GitHub Copilot seat for all users within each specified team.\nThe 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.\"\nOnly 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.\nFor more information about setting up a Copilot subscription, see \"Subscribing to Copilot for your organization.\"\nFor more information about setting a suggestion matching policy, see \"Managing policies for Copilot in your organization.\"\nThe response contains the total number of new seats that were created and existing seats that were refreshed.\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n- **`selected_teams`** (array of strings) (required)\n  List of team names within the organization to which to grant access to GitHub Copilot.\n\n### HTTP response status codes\n\n- **201** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - 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.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/copilot/billing/selected_teams \\\n  -d '{\n  \"selected_teams\": [\n    \"engteam1\",\n    \"engteam2\",\n    \"engteam3\"\n  ]\n}'\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Add enterprise teams to the Copilot subscription for an enterprise](#add-enterprise-teams-to-the-copilot-subscription-for-an-enterprise).\n\n## Remove teams from the Copilot subscription for an organization\n\n```\nDELETE /orgs/{org}/copilot/billing/selected_teams\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nSets seats for all members of each team specified to \"pending cancellation\".\nThis will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.\nFor more information about disabling access to Copilot, see \"Revoking access to Copilot for members of your organization.\"\nOnly organization owners can cancel Copilot seats for their organization members.\nThe response contains the total number of seats set to \"pending cancellation\".\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n- **`selected_teams`** (array of strings) (required)\n  The names of teams from which to revoke access to GitHub Copilot.\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - 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.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/copilot/billing/selected_teams \\\n  -d '{\n  \"selected_teams\": [\n    \"engteam1\",\n    \"engteam2\",\n    \"engteam3\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Remove enterprise teams from the Copilot subscription for an enterprise](#remove-enterprise-teams-from-the-copilot-subscription-for-an-enterprise).\n\n## Add users to the Copilot subscription for an organization\n\n```\nPOST /orgs/{org}/copilot/billing/selected_users\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nPurchases a GitHub Copilot seat for each user specified.\nThe 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.\"\nOnly 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.\nFor more information about setting up a Copilot subscription, see \"Subscribing to Copilot for your organization.\"\nFor more information about setting a suggestion matching policy, see \"Managing policies for Copilot in your organization.\"\nThe response contains the total number of new seats that were created and existing seats that were refreshed.\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n- **`selected_usernames`** (array of strings) (required)\n  The usernames of the organization members to be granted access to GitHub Copilot.\n\n### HTTP response status codes\n\n- **201** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - 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.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/copilot/billing/selected_users \\\n  -d '{\n  \"selected_usernames\": [\n    \"cooluser1\",\n    \"hacker2\",\n    \"octocat\"\n  ]\n}'\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Add enterprise teams to the Copilot subscription for an enterprise](#add-enterprise-teams-to-the-copilot-subscription-for-an-enterprise).\n\n## Remove users from the Copilot subscription for an organization\n\n```\nDELETE /orgs/{org}/copilot/billing/selected_users\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nSets seats for all users specified to \"pending cancellation\".\nThis 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.\nFor more information about disabling access to Copilot, see \"Revoking access to Copilot for members of your organization.\"\nOnly organization owners can cancel Copilot seats for their organization members.\nThe response contains the total number of seats set to \"pending cancellation\".\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n- **`selected_usernames`** (array of strings) (required)\n  The usernames of the organization members for which to revoke access to GitHub Copilot.\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - 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.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/copilot/billing/selected_users \\\n  -d '{\n  \"selected_usernames\": [\n    \"cooluser1\",\n    \"hacker2\",\n    \"octocat\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Remove enterprise teams from the Copilot subscription for an enterprise](#remove-enterprise-teams-from-the-copilot-subscription-for-an-enterprise).\n\n## Get Copilot seat assignment details for a user\n\n```\nGET /orgs/{org}/members/{username}/copilot\n```\n\nNote\n\nThis endpoint is in public preview and is subject to change.\n\nGets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.\nThe seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at.\nFor more information about activity data, see Metrics data properties for GitHub Copilot.\nOnly organization owners can view Copilot seat assignment details for members of their organization.\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`username`** (string) (required)\n  The handle for the GitHub user account.\n\n### HTTP response status codes\n\n- **200** - The user's GitHub Copilot seat details, including usage.\n\n- **401** - Requires authentication\n\n- **403** - Forbidden\n\n- **404** - Resource not found\n\n- **422** - Copilot Business or Enterprise is not enabled for this organization or the user has a pending organization invitation.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/members/USERNAME/copilot\n```\n\n**Response schema (Status: 200):**\n\n* `assignee`: any of:\n  * **null**\n  * **Simple User**\n    * `name`: string or null\n    * `email`: string or null\n    * `login`: required, string\n    * `id`: required, integer, format: int64\n    * `node_id`: required, string\n    * `avatar_url`: required, string, format: uri\n    * `gravatar_id`: required, string or null\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `followers_url`: required, string, format: uri\n    * `following_url`: required, string\n    * `gists_url`: required, string\n    * `starred_url`: required, string\n    * `subscriptions_url`: required, string, format: uri\n    * `organizations_url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string\n    * `received_events_url`: required, string, format: uri\n    * `type`: required, string\n    * `site_admin`: required, boolean\n    * `starred_at`: string\n    * `user_view_type`: string\n* `organization`: any of:\n  * **null**\n  * **Organization Simple**\n    * `login`: required, string\n    * `id`: required, integer\n    * `node_id`: required, string\n    * `url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string, format: uri\n    * `hooks_url`: required, string\n    * `issues_url`: required, string\n    * `members_url`: required, string\n    * `public_members_url`: required, string\n    * `avatar_url`: required, string\n    * `description`: required, string or null\n* `assigning_team`: one of:\n  * **Team**\n    * `id`: required, integer\n    * `node_id`: required, string\n    * `name`: required, string\n    * `slug`: required, string\n    * `description`: required, string or null\n    * `privacy`: string\n    * `notification_setting`: string\n    * `permission`: required, string\n    * `permissions`: object:\n      * `pull`: required, boolean\n      * `triage`: required, boolean\n      * `push`: required, boolean\n      * `maintain`: required, boolean\n      * `admin`: required, boolean\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `members_url`: required, string\n    * `repositories_url`: required, string, format: uri\n    * `type`: required, string, enum: `enterprise`, `organization`\n    * `access_source`: string, enum: `direct`, `organization`, `enterprise`\n    * `organization_id`: integer\n    * `enterprise_id`: integer\n    * `parent`: required, any of:\n      * **null**\n      * **Team Simple**\n        * `id`: required, integer\n        * `node_id`: required, string\n        * `url`: required, string, format: uri\n        * `members_url`: required, string\n        * `name`: required, string\n        * `description`: required, string or null\n        * `permission`: required, string\n        * `privacy`: string\n        * `notification_setting`: string\n        * `html_url`: required, string, format: uri\n        * `repositories_url`: required, string, format: uri\n        * `slug`: required, string\n        * `ldap_dn`: string\n        * `type`: required, string, enum: `enterprise`, `organization`\n        * `organization_id`: integer\n        * `enterprise_id`: integer\n  * **Enterprise Team**\n    * `id`: required, integer, format: int64\n    * `name`: required, string\n    * `description`: string\n    * `slug`: required, string\n    * `url`: required, string, format: uri\n    * `sync_to_organizations`: string\n    * `organization_selection_type`: string\n    * `group_id`: required, string or null\n    * `group_name`: string or null\n    * `html_url`: required, string, format: uri\n    * `members_url`: required, string\n    * `created_at`: required, string, format: date-time\n    * `updated_at`: required, string, format: date-time\n    * `notification_setting`: string, enum: `notifications_enabled`, `notifications_disabled`\n* `pending_cancellation_date`: string or null, format: date\n* `last_activity_at`: string or null, format: date-time\n* `last_activity_editor`: string or null\n* `last_authenticated_at`: string or null, format: date-time\n* `created_at`: required, string, format: date-time\n* `updated_at`: string, format: date-time, deprecated\n* `plan_type`: string, enum: `business`, `enterprise`, `unknown`"}