openapi: 3.1.0 info: title: GitHub Copilot REST API description: >- REST API for managing GitHub Copilot seat assignments, billing, usage metrics, content exclusion rules, and organizational settings. Covers user management, aggregated metrics, usage reports, and content governance across organizations and enterprises. version: 1.0.0 contact: name: GitHub Support url: https://support.github.com email: support@github.com license: name: MIT url: https://opensource.org/licenses/MIT x-logo: url: https://github.githubassets.com/images/modules/site/copilot/copilot-logo.png externalDocs: description: GitHub Copilot REST API Documentation url: https://docs.github.com/en/rest/copilot servers: - url: https://api.github.com description: GitHub REST API security: - BearerToken: [] - OAuthToken: [] tags: - name: Copilot Billing description: Organization-level Copilot billing and subscription information - name: Copilot Content Exclusion description: Manage content exclusion path rules for organizations - name: Copilot Metrics description: Aggregated Copilot usage metrics by organization and team - name: Copilot Seats description: Seat assignment management for organizations - name: Copilot Usage Reports description: Downloadable usage metrics reports for enterprises and organizations - name: Copilot User Management description: Add and remove individual users and teams from Copilot subscriptions paths: # ── Billing ──────────────────────────────────────────────────────────── /orgs/{org}/copilot/billing: get: operationId: getCopilotBillingForOrganization summary: Github Copilot Get Copilot Billing Information for an Organization description: >- Retrieves subscription details including seat breakdown and feature policies for an organization's Copilot subscription. Only organization owners can access this endpoint. tags: - Copilot Billing parameters: - $ref: '#/components/parameters/Org' responses: '200': description: Copilot billing information content: application/json: schema: $ref: '#/components/schemas/CopilotBillingInfo' examples: Getcopilotbillingfororganization200Example: summary: Default getCopilotBillingForOrganization 200 response x-microcks-default: true value: seat_breakdown: total: 10 added_this_cycle: 10 pending_invitation: 10 pending_cancellation: 10 active_this_cycle: 10 inactive_this_cycle: 10 seat_management_setting: assign_all ide_chat: enabled platform_chat: enabled cli: enabled public_code_suggestions: allow plan_type: business '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' # ── Seat Listing ─────────────────────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/billing/seats: get: operationId: listCopilotSeats summary: Github Copilot List All Copilot Seat Assignments for an Organization description: >- Enumerates all active Copilot seats for which an organization is currently billed, including user activity metrics such as last activity date, editor, and authentication timestamp. tags: - Copilot Seats parameters: - $ref: '#/components/parameters/Org' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' responses: '200': description: List of Copilot seat assignments content: application/json: schema: $ref: '#/components/schemas/CopilotSeatsResponse' examples: Listcopilotseats200Example: summary: Default listCopilotSeats 200 response x-microcks-default: true value: total_seats: 10 seats: - created_at: '2026-01-15T10:30:00Z' updated_at: '2026-01-15T10:30:00Z' pending_cancellation_date: '2026-01-15' last_activity_at: '2026-01-15T10:30:00Z' last_activity_editor: example_value last_authenticated_at: '2026-01-15T10:30:00Z' plan_type: business assignee: example_value assigning_team: example_value headers: Link: $ref: '#/components/headers/LinkPagination' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' # ── Team Subscription Management ─────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/billing/selected_teams: post: operationId: addTeamsToCopilotSubscription summary: Github Copilot Add Teams to Copilot Subscription description: >- Purchases Copilot seats for all members within designated teams. Billing is based on the organization's Copilot plan. Only organization owners can call this endpoint. tags: - Copilot User Management parameters: - $ref: '#/components/parameters/Org' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SelectedTeamsRequest' examples: AddteamstocopilotsubscriptionRequestExample: summary: Default addTeamsToCopilotSubscription request x-microcks-default: true value: selected_teams: - example_value responses: '201': description: Teams added to Copilot subscription content: application/json: schema: $ref: '#/components/schemas/SeatsCreatedResponse' examples: Addteamstocopilotsubscription201Example: summary: Default addTeamsToCopilotSubscription 201 response x-microcks-default: true value: seats_created: 10 '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationFailed' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: operationId: removeTeamsFromCopilotSubscription summary: Github Copilot Remove Teams From Copilot Subscription description: >- Marks seats for all members of specified teams as pending cancellation. Access ends at the conclusion of the current billing cycle. tags: - Copilot User Management parameters: - $ref: '#/components/parameters/Org' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SelectedTeamsRequest' examples: RemoveteamsfromcopilotsubscriptionRequestExample: summary: Default removeTeamsFromCopilotSubscription request x-microcks-default: true value: selected_teams: - example_value responses: '200': description: Teams removed from Copilot subscription content: application/json: schema: $ref: '#/components/schemas/SeatsCancelledResponse' examples: Removeteamsfromcopilotsubscription200Example: summary: Default removeTeamsFromCopilotSubscription 200 response x-microcks-default: true value: seats_cancelled: 10 '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationFailed' '500': $ref: '#/components/responses/InternalError' # ── User Subscription Management ─────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/billing/selected_users: post: operationId: addUsersToCopilotSubscription summary: Github Copilot Add Users to Copilot Subscription description: >- Provisions Copilot seats for specified individual organization members. Charges are applied per the organization's plan structure. tags: - Copilot User Management parameters: - $ref: '#/components/parameters/Org' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SelectedUsersRequest' examples: AdduserstocopilotsubscriptionRequestExample: summary: Default addUsersToCopilotSubscription request x-microcks-default: true value: selected_usernames: - example_value responses: '201': description: Users added to Copilot subscription content: application/json: schema: $ref: '#/components/schemas/SeatsCreatedResponse' examples: Adduserstocopilotsubscription201Example: summary: Default addUsersToCopilotSubscription 201 response x-microcks-default: true value: seats_created: 10 '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationFailed' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: operationId: removeUsersFromCopilotSubscription summary: Github Copilot Remove Users From Copilot Subscription description: >- Sets user seats to pending cancellation, revoking access at the end of the billing cycle unless the user is retained through a team assignment. tags: - Copilot User Management parameters: - $ref: '#/components/parameters/Org' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SelectedUsersRequest' examples: RemoveusersfromcopilotsubscriptionRequestExample: summary: Default removeUsersFromCopilotSubscription request x-microcks-default: true value: selected_usernames: - example_value responses: '200': description: Users removed from Copilot subscription content: application/json: schema: $ref: '#/components/schemas/SeatsCancelledResponse' examples: Removeusersfromcopilotsubscription200Example: summary: Default removeUsersFromCopilotSubscription 200 response x-microcks-default: true value: seats_cancelled: 10 '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationFailed' '500': $ref: '#/components/responses/InternalError' # ── Individual User Seat Details ─────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/members/{username}/copilot: get: operationId: getCopilotSeatForUser summary: Github Copilot Get Copilot Seat Assignment Details for a User description: >- Retrieves comprehensive seat assignment information for a specific organization member, including usage patterns, last activity, and assignment origin. tags: - Copilot Seats parameters: - $ref: '#/components/parameters/Org' - $ref: '#/components/parameters/Username' responses: '200': description: Copilot seat details for the user content: application/json: schema: $ref: '#/components/schemas/CopilotSeatDetail' examples: Getcopilotseatforuser200Example: summary: Default getCopilotSeatForUser 200 response x-microcks-default: true value: created_at: '2026-01-15T10:30:00Z' updated_at: '2026-01-15T10:30:00Z' pending_cancellation_date: '2026-01-15' last_activity_at: '2026-01-15T10:30:00Z' last_activity_editor: example_value last_authenticated_at: '2026-01-15T10:30:00Z' plan_type: business assignee: example_value assigning_team: example_value '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationFailed' '500': $ref: '#/components/responses/InternalError' # ── Organization Metrics ─────────────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/metrics: get: operationId: getCopilotMetricsForOrganization summary: Github Copilot Get Copilot Metrics for an Organization description: >- Retrieves aggregated metrics for various GitHub Copilot features broken down by language and IDE editor. Requires at least five organization members with active Copilot licenses. Data reflects previous day metrics only. tags: - Copilot Metrics parameters: - $ref: '#/components/parameters/Org' - $ref: '#/components/parameters/Since' - $ref: '#/components/parameters/Until' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPageMetrics' responses: '200': description: Aggregated Copilot metrics content: application/json: schema: type: array items: $ref: '#/components/schemas/CopilotMetricsDay' examples: Getcopilotmetricsfororganization200Example: summary: Default getCopilotMetricsForOrganization 200 response x-microcks-default: true value: - date: '2026-01-15' total_active_users: 10 total_engaged_users: 10 copilot_ide_code_completions: example_value copilot_ide_chat: example_value copilot_dotcom_chat: example_value copilot_dotcom_pull_requests: example_value '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationFailed' '500': $ref: '#/components/responses/InternalError' # ── Team Metrics ─────────────────────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/team/{team_slug}/copilot/metrics: get: operationId: getCopilotMetricsForTeam summary: Github Copilot Get Copilot Metrics for a Team description: >- Retrieves aggregated Copilot metrics for a specific team within an organization, broken down by language and IDE editor. Requires at least five team members with active Copilot licenses. tags: - Copilot Metrics parameters: - $ref: '#/components/parameters/Org' - $ref: '#/components/parameters/TeamSlug' - $ref: '#/components/parameters/Since' - $ref: '#/components/parameters/Until' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPageMetrics' responses: '200': description: Aggregated Copilot metrics for the team content: application/json: schema: type: array items: $ref: '#/components/schemas/CopilotMetricsDay' examples: Getcopilotmetricsforteam200Example: summary: Default getCopilotMetricsForTeam 200 response x-microcks-default: true value: - date: '2026-01-15' total_active_users: 10 total_engaged_users: 10 copilot_ide_code_completions: example_value copilot_ide_chat: example_value copilot_dotcom_chat: example_value copilot_dotcom_pull_requests: example_value '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationFailed' '500': $ref: '#/components/responses/InternalError' # ── Enterprise Usage Reports ─────────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /enterprises/{enterprise}/copilot/metrics/reports/enterprise-1-day: get: operationId: getEnterpriseCopilotUsageDaily summary: Github Copilot Get Enterprise Copilot Usage Metrics for a Specific Day description: >- Retrieves download links for daily enterprise-level Copilot usage metrics reports. Reports are generated daily and data is available from October 10, 2025, extending back up to one year historically. tags: - Copilot Usage Reports parameters: - $ref: '#/components/parameters/Enterprise' - $ref: '#/components/parameters/Day' responses: '200': description: Daily enterprise usage report download links content: application/json: schema: $ref: '#/components/schemas/UsageReportDaily' examples: Getenterprisecopilotusagedaily200Example: summary: Default getEnterpriseCopilotUsageDaily 200 response x-microcks-default: true value: download_links: - https://www.example.com report_day: '2026-01-15' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK /enterprises/{enterprise}/copilot/metrics/reports/enterprise-28-day/latest: get: operationId: getEnterpriseCopilotUsage28Day summary: Github Copilot Get Latest 28-day Enterprise Copilot Usage Metrics description: >- Retrieves download links for the latest 28-day enterprise-level Copilot usage metrics report. tags: - Copilot Usage Reports parameters: - $ref: '#/components/parameters/Enterprise' responses: '200': description: 28-day enterprise usage report download links content: application/json: schema: $ref: '#/components/schemas/UsageReport28Day' examples: Getenterprisecopilotusage28day200Example: summary: Default getEnterpriseCopilotUsage28Day 200 response x-microcks-default: true value: download_links: - https://www.example.com report_start_day: '2026-01-15' report_end_day: '2026-01-15' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK /enterprises/{enterprise}/copilot/metrics/reports/users-1-day: get: operationId: getEnterpriseUsersCopilotUsageDaily summary: Github Copilot Get Enterprise User-level Copilot Usage Metrics for a Specific Day description: >- Retrieves download links for daily user-level Copilot usage metrics reports at the enterprise level, providing individual user engagement statistics, feature usage patterns, and adoption metrics. tags: - Copilot Usage Reports parameters: - $ref: '#/components/parameters/Enterprise' - $ref: '#/components/parameters/Day' responses: '200': description: Daily user-level usage report download links content: application/json: schema: $ref: '#/components/schemas/UsageReportDaily' examples: Getenterpriseuserscopilotusagedaily200Example: summary: Default getEnterpriseUsersCopilotUsageDaily 200 response x-microcks-default: true value: download_links: - https://www.example.com report_day: '2026-01-15' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK /enterprises/{enterprise}/copilot/metrics/reports/users-28-day/latest: get: operationId: getEnterpriseUsersCopilotUsage28Day summary: Github Copilot Get Latest 28-day Enterprise User-level Copilot Usage Metrics description: >- Retrieves download links for the latest 28-day user-level Copilot usage metrics report at the enterprise level. tags: - Copilot Usage Reports parameters: - $ref: '#/components/parameters/Enterprise' responses: '200': description: 28-day user-level usage report download links content: application/json: schema: $ref: '#/components/schemas/UsageReport28Day' examples: Getenterpriseuserscopilotusage28day200Example: summary: Default getEnterpriseUsersCopilotUsage28Day 200 response x-microcks-default: true value: download_links: - https://www.example.com report_start_day: '2026-01-15' report_end_day: '2026-01-15' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' # ── Organization Usage Reports ───────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/metrics/reports/organization-1-day: get: operationId: getOrganizationCopilotUsageDaily summary: Github Copilot Get Organization Copilot Usage Metrics for a Specific Day description: >- Retrieves download links for daily organization-level Copilot usage metrics reports. tags: - Copilot Usage Reports parameters: - $ref: '#/components/parameters/Org' - $ref: '#/components/parameters/Day' responses: '200': description: Daily organization usage report download links content: application/json: schema: $ref: '#/components/schemas/UsageReportDaily' examples: Getorganizationcopilotusagedaily200Example: summary: Default getOrganizationCopilotUsageDaily 200 response x-microcks-default: true value: download_links: - https://www.example.com report_day: '2026-01-15' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/metrics/reports/organization-28-day/latest: get: operationId: getOrganizationCopilotUsage28Day summary: Github Copilot Get Latest 28-day Organization Copilot Usage Metrics description: >- Retrieves download links for the latest 28-day organization-level Copilot usage metrics report. tags: - Copilot Usage Reports parameters: - $ref: '#/components/parameters/Org' responses: '200': description: 28-day organization usage report download links content: application/json: schema: $ref: '#/components/schemas/UsageReport28Day' examples: Getorganizationcopilotusage28day200Example: summary: Default getOrganizationCopilotUsage28Day 200 response x-microcks-default: true value: download_links: - https://www.example.com report_start_day: '2026-01-15' report_end_day: '2026-01-15' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/metrics/reports/users-1-day: get: operationId: getOrganizationUsersCopilotUsageDaily summary: Github Copilot Get Organization User-level Copilot Usage Metrics for a Specific Day description: >- Retrieves download links for daily user-level Copilot usage metrics reports at the organization level. tags: - Copilot Usage Reports parameters: - $ref: '#/components/parameters/Org' - $ref: '#/components/parameters/Day' responses: '200': description: Daily user-level usage report download links content: application/json: schema: $ref: '#/components/schemas/UsageReportDaily' examples: Getorganizationuserscopilotusagedaily200Example: summary: Default getOrganizationUsersCopilotUsageDaily 200 response x-microcks-default: true value: download_links: - https://www.example.com report_day: '2026-01-15' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/metrics/reports/users-28-day/latest: get: operationId: getOrganizationUsersCopilotUsage28Day summary: Github Copilot Get Latest 28-day Organization User-level Copilot Usage Metrics description: >- Retrieves download links for the latest 28-day user-level Copilot usage metrics report at the organization level. tags: - Copilot Usage Reports parameters: - $ref: '#/components/parameters/Org' responses: '200': description: 28-day user-level usage report download links content: application/json: schema: $ref: '#/components/schemas/UsageReport28Day' examples: Getorganizationuserscopilotusage28day200Example: summary: Default getOrganizationUsersCopilotUsage28Day 200 response x-microcks-default: true value: download_links: - https://www.example.com report_start_day: '2026-01-15' report_end_day: '2026-01-15' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' # ── Content Exclusion ────────────────────────────────────────────────── x-microcks-operation: delay: 0 dispatcher: FALLBACK /orgs/{org}/copilot/content_exclusion: get: operationId: getCopilotContentExclusionRules summary: Github Copilot Get Copilot Content Exclusion Rules for an Organization description: >- Gets information about an organization's Copilot content exclusion path rules. These rules define which files and directories Copilot is prevented from accessing. tags: - Copilot Content Exclusion parameters: - $ref: '#/components/parameters/Org' responses: '200': description: Content exclusion rules content: application/json: schema: $ref: '#/components/schemas/ContentExclusionRules' examples: Getcopilotcontentexclusionrules200Example: summary: Default getCopilotContentExclusionRules 200 response x-microcks-default: true value: {} '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK put: operationId: setCopilotContentExclusionRules summary: Github Copilot Set Copilot Content Exclusion Rules for an Organization description: >- Sets Copilot content exclusion path rules for an organization. Replaces existing rules with the provided set. tags: - Copilot Content Exclusion parameters: - $ref: '#/components/parameters/Org' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ContentExclusionRules' examples: SetcopilotcontentexclusionrulesRequestExample: summary: Default setCopilotContentExclusionRules request x-microcks-default: true value: {} responses: '200': description: Content exclusion rules updated content: application/json: schema: type: object properties: message: type: string example: Content exclusion rules updated successfully. examples: Setcopilotcontentexclusionrules200Example: summary: Default setCopilotContentExclusionRules 200 response x-microcks-default: true value: message: example_value '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '413': description: Payload too large content: application/json: schema: $ref: '#/components/schemas/Error' examples: Setcopilotcontentexclusionrules413Example: summary: Default setCopilotContentExclusionRules 413 response x-microcks-default: true value: message: example_value documentation_url: https://www.example.com '422': $ref: '#/components/responses/ValidationFailed' '500': $ref: '#/components/responses/InternalError' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: # ── Security Schemes ─────────────────────────────────────────────────── securitySchemes: BearerToken: type: http scheme: bearer description: >- Personal access token (classic) with manage_billing:copilot, read:org, or read:enterprise scopes; or fine-grained token with GitHub Copilot Business (read) or Administration (read) permissions. OAuthToken: type: oauth2 flows: authorizationCode: authorizationUrl: https://github.com/login/oauth/authorize tokenUrl: https://github.com/login/oauth/access_token scopes: manage_billing:copilot: Manage Copilot billing settings read:org: Read organization membership and settings read:enterprise: Read enterprise data copilot: Manage Copilot content exclusion settings # ── Parameters ───────────────────────────────────────────────────────── parameters: Org: name: org in: path required: true description: The organization name. Case-insensitive. schema: type: string example: octo-org Username: name: username in: path required: true description: The handle for the GitHub user account. schema: type: string example: octocat Enterprise: name: enterprise in: path required: true description: The slug version of the enterprise name. schema: type: string example: octo-enterprise TeamSlug: name: team_slug in: path required: true description: The slug of the team name. schema: type: string example: engineering Page: name: page in: query required: false description: The page number of results to fetch. schema: type: integer minimum: 1 default: 1 PerPage: name: per_page in: query required: false description: The number of results per page (max 100). schema: type: integer minimum: 1 maximum: 100 default: 50 PerPageMetrics: name: per_page in: query required: false description: Number of days of metrics per page (max 100). schema: type: integer minimum: 1 maximum: 100 default: 100 Since: name: since in: query required: false description: >- Show usage metrics since this date (ISO 8601 format YYYY-MM-DD). Maximum 100 days in the past. schema: type: string format: date Until: name: until in: query required: false description: >- Show usage metrics until this date (ISO 8601 format YYYY-MM-DD). schema: type: string format: date Day: name: day in: query required: true description: The date for the report in YYYY-MM-DD format. schema: type: string format: date # ── Headers ──────────────────────────────────────────────────────────── headers: LinkPagination: description: Pagination links in RFC 5988 format. schema: type: string example: '; rel="next"' # ── Responses ────────────────────────────────────────────────────────── responses: Unauthorized: description: Requires authentication content: application/json: schema: $ref: '#/components/schemas/Error' Forbidden: description: Forbidden - insufficient permissions content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' ValidationFailed: description: Validation failed or endpoint has been spammed content: application/json: schema: $ref: '#/components/schemas/Error' InternalError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' # ── Schemas ──────────────────────────────────────────────────────────── schemas: Error: type: object properties: message: type: string description: Human-readable error message example: example_value documentation_url: type: string format: uri description: Link to relevant API documentation example: https://www.example.com required: - message # ── Billing ────────────────────────────────────────────────────────── CopilotBillingInfo: type: object description: >- Copilot billing and subscription information for an organization, including seat breakdown and feature policy settings. properties: seat_breakdown: $ref: '#/components/schemas/SeatBreakdown' seat_management_setting: type: string description: How Copilot seats are managed for the organization. enum: - assign_all - assign_selected - disabled - unconfigured example: assign_all ide_chat: type: string description: Policy for Copilot Chat in IDEs. enum: - enabled - disabled - unconfigured example: enabled platform_chat: type: string description: Policy for Copilot Chat on github.com. enum: - enabled - disabled - unconfigured example: enabled cli: type: string description: Policy for Copilot in the CLI. enum: - enabled - disabled - unconfigured example: enabled public_code_suggestions: type: string description: Policy for suggestions matching public code. enum: - allow - block - unconfigured example: allow plan_type: type: string description: The Copilot plan type for the organization. enum: - business - enterprise example: business required: - seat_breakdown - seat_management_setting - plan_type SeatBreakdown: type: object description: Breakdown of Copilot seat counts by status. properties: total: type: integer description: Total number of Copilot seats. example: 10 added_this_cycle: type: integer description: Seats added in the current billing cycle. example: 10 pending_invitation: type: integer description: Seats with pending invitations. example: 10 pending_cancellation: type: integer description: Seats pending cancellation at end of cycle. example: 10 active_this_cycle: type: integer description: Seats active in the current billing cycle. example: 10 inactive_this_cycle: type: integer description: Seats inactive in the current billing cycle. # ── Seats ──────────────────────────────────────────────────────────── example: 10 CopilotSeatsResponse: type: object description: Paginated list of Copilot seat assignments. properties: total_seats: type: integer description: Total number of Copilot seats for the organization. example: 10 seats: type: array items: $ref: '#/components/schemas/CopilotSeatDetail' example: [] required: - total_seats - seats CopilotSeatDetail: type: object description: >- Details of a Copilot seat assignment for a user, including activity information and plan type. properties: created_at: type: string format: date-time description: Timestamp when the seat was created. example: '2026-01-15T10:30:00Z' updated_at: type: string format: date-time description: Timestamp when the seat was last updated. deprecated: true example: '2026-01-15T10:30:00Z' pending_cancellation_date: type: - string - 'null' format: date description: >- Date when seat cancellation takes effect. Null if not pending cancellation. example: '2026-01-15' last_activity_at: type: - string - 'null' format: date-time description: >- Timestamp of the user's last Copilot activity. Null if no activity recorded. example: '2026-01-15T10:30:00Z' last_activity_editor: type: - string - 'null' description: >- The IDE or editor used during the user's last Copilot activity. Null if no activity recorded. example: example_value last_authenticated_at: type: - string - 'null' format: date-time description: >- Timestamp of the user's last authentication with Copilot. Null if never authenticated. example: '2026-01-15T10:30:00Z' plan_type: type: string description: The Copilot plan type for this seat. enum: - business - enterprise - unknown example: business assignee: oneOf: - $ref: '#/components/schemas/SimpleUser' - type: 'null' description: The GitHub user assigned to this seat. example: example_value assigning_team: oneOf: - $ref: '#/components/schemas/Team' - type: 'null' description: >- The team through which this seat was assigned, if applicable. example: example_value required: - created_at - plan_type SimpleUser: type: object description: A GitHub user account. properties: login: type: string description: The username of the user. example: example_value id: type: integer description: The unique identifier of the user. example: abc123 node_id: type: string description: The GraphQL node ID of the user. example: '500123' avatar_url: type: string format: uri description: URL to the user's avatar image. example: https://www.example.com gravatar_id: type: - string - 'null' example: '500123' url: type: string format: uri description: API URL for this user. example: https://www.example.com html_url: type: string format: uri description: URL to the user's GitHub profile. example: https://www.example.com followers_url: type: string format: uri example: https://www.example.com following_url: type: string example: https://www.example.com gists_url: type: string example: https://www.example.com starred_url: type: string example: https://www.example.com subscriptions_url: type: string format: uri example: https://www.example.com organizations_url: type: string format: uri example: https://www.example.com repos_url: type: string format: uri example: https://www.example.com events_url: type: string example: https://www.example.com received_events_url: type: string format: uri example: https://www.example.com type: type: string description: The type of account (User, Organization, Bot, etc.). example: example_value site_admin: type: boolean description: Whether the user is a GitHub site administrator. example: true required: - login - id - node_id - avatar_url - url - html_url - type - site_admin Team: type: object description: A GitHub team. properties: id: type: integer description: Unique identifier of the team. example: abc123 node_id: type: string example: '500123' name: type: string description: Name of the team. example: Example Title slug: type: string description: URL-friendly slug of the team name. example: example_value description: type: - string - 'null' description: Description of the team. example: A sample description. privacy: type: string enum: - closed - secret example: closed notification_setting: type: string enum: - notifications_enabled - notifications_disabled example: notifications_enabled permission: type: string description: The default permission level for the team. example: example_value url: type: string format: uri example: https://www.example.com html_url: type: string format: uri example: https://www.example.com members_url: type: string example: https://www.example.com repositories_url: type: string format: uri example: https://www.example.com required: - id - name - slug # ── Request Bodies ─────────────────────────────────────────────────── SelectedTeamsRequest: type: object description: A list of team slugs to add or remove from the Copilot subscription. properties: selected_teams: type: array items: type: string description: List of team slugs within the organization. minItems: 1 example: [] required: - selected_teams SelectedUsersRequest: type: object description: A list of usernames to add or remove from the Copilot subscription. properties: selected_usernames: type: array items: type: string description: List of GitHub usernames who are organization members. minItems: 1 example: [] required: - selected_usernames SeatsCreatedResponse: type: object description: Response after adding users or teams to the Copilot subscription. properties: seats_created: type: integer description: The number of new Copilot seats created. example: 10 required: - seats_created SeatsCancelledResponse: type: object description: Response after removing users or teams from the Copilot subscription. properties: seats_cancelled: type: integer description: The number of Copilot seats set to pending cancellation. example: 10 required: - seats_cancelled # ── Metrics ────────────────────────────────────────────────────────── CopilotMetricsDay: type: object description: >- Aggregated Copilot usage metrics for a single day, broken down by feature, editor, language, and model. properties: date: type: string format: date description: The date these metrics apply to (YYYY-MM-DD). example: '2026-01-15' total_active_users: type: integer description: Total users with any Copilot activity on this date. example: 10 total_engaged_users: type: integer description: >- Total users who actively engaged with Copilot features on this date. example: 10 copilot_ide_code_completions: oneOf: - $ref: '#/components/schemas/CopilotIdeCodeCompletions' - type: 'null' example: example_value copilot_ide_chat: oneOf: - $ref: '#/components/schemas/CopilotIdeChat' - type: 'null' example: example_value copilot_dotcom_chat: oneOf: - $ref: '#/components/schemas/CopilotDotcomChat' - type: 'null' example: example_value copilot_dotcom_pull_requests: oneOf: - $ref: '#/components/schemas/CopilotDotcomPullRequests' - type: 'null' example: example_value required: - date CopilotIdeCodeCompletions: type: object description: Metrics for Copilot code completions in IDEs. properties: total_engaged_users: type: integer description: Users who accepted at least one code suggestion. example: 10 languages: type: array items: $ref: '#/components/schemas/MetricsLanguageSummary' example: [] editors: type: array items: $ref: '#/components/schemas/CodeCompletionsEditor' example: [] CodeCompletionsEditor: type: object description: Code completion metrics for a specific editor. properties: name: type: string description: Name of the editor (e.g., vscode, jetbrains, neovim). example: Example Title total_engaged_users: type: integer example: 10 models: type: array items: $ref: '#/components/schemas/CodeCompletionsModel' example: [] CodeCompletionsModel: type: object description: Code completion metrics for a specific AI model. properties: name: type: string description: Name of the model or "default". example: Example Title is_custom_model: type: boolean description: Whether this is a custom fine-tuned model. example: true custom_model_training_date: type: - string - 'null' description: Training date of the custom model, if applicable. example: example_value total_engaged_users: type: integer example: 10 languages: type: array items: $ref: '#/components/schemas/CodeCompletionsLanguageMetrics' example: [] CodeCompletionsLanguageMetrics: type: object description: Detailed code completion metrics for a specific language. properties: name: type: string description: Programming language name. example: Example Title total_engaged_users: type: integer example: 10 total_code_suggestions: type: integer description: Total number of code suggestions shown. example: 10 total_code_acceptances: type: integer description: Total number of code suggestions accepted. example: 10 total_code_lines_suggested: type: integer description: Total lines of code suggested. example: 10 total_code_lines_accepted: type: integer description: Total lines of code accepted. example: 10 CopilotIdeChat: type: object description: Metrics for Copilot Chat in IDEs. properties: total_engaged_users: type: integer description: Users who prompted Copilot Chat in an IDE. example: 10 editors: type: array items: $ref: '#/components/schemas/IdeChatEditor' example: [] IdeChatEditor: type: object description: IDE Chat metrics for a specific editor. properties: name: type: string description: Name of the editor. example: Example Title total_engaged_users: type: integer example: 10 models: type: array items: $ref: '#/components/schemas/IdeChatModel' example: [] IdeChatModel: type: object description: IDE Chat metrics for a specific AI model. properties: name: type: string example: Example Title is_custom_model: type: boolean example: true custom_model_training_date: type: - string - 'null' example: example_value total_engaged_users: type: integer example: 10 total_chats: type: integer description: Total number of chat conversations. example: 10 total_chat_insertion_events: type: integer description: Number of times chat suggestions were inserted into code. example: 10 total_chat_copy_events: type: integer description: Number of times chat responses were copied. example: 10 CopilotDotcomChat: type: object description: Metrics for Copilot Chat on github.com. properties: total_engaged_users: type: integer example: 10 models: type: array items: $ref: '#/components/schemas/DotcomChatModel' example: [] DotcomChatModel: type: object description: Dotcom Chat metrics for a specific AI model. properties: name: type: string example: Example Title is_custom_model: type: boolean example: true custom_model_training_date: type: - string - 'null' example: example_value total_engaged_users: type: integer example: 10 total_chats: type: integer example: 10 CopilotDotcomPullRequests: type: object description: Metrics for Copilot pull request summaries on github.com. properties: total_engaged_users: type: integer description: Users who generated pull request summaries. example: 10 repositories: type: array items: $ref: '#/components/schemas/PullRequestRepository' example: [] PullRequestRepository: type: object description: Pull request summary metrics for a specific repository. properties: name: type: string description: Repository name. example: Example Title total_engaged_users: type: integer example: 10 models: type: array items: $ref: '#/components/schemas/PullRequestModel' example: [] PullRequestModel: type: object description: Pull request summary metrics for a specific AI model. properties: name: type: string example: Example Title is_custom_model: type: boolean example: true custom_model_training_date: type: - string - 'null' example: example_value total_pr_summaries_created: type: integer description: Total number of pull request summaries generated. example: 10 total_engaged_users: type: integer example: 10 MetricsLanguageSummary: type: object description: Summary of engagement for a programming language. properties: name: type: string description: Programming language name. example: Example Title total_engaged_users: type: integer # ── Usage Reports ──────────────────────────────────────────────────── example: 10 UsageReportDaily: type: object description: Download links for a daily Copilot usage metrics report. properties: download_links: type: array items: type: string format: uri description: Signed URLs to download the report files. example: [] report_day: type: string format: date description: The date the report covers. example: '2026-01-15' required: - download_links - report_day UsageReport28Day: type: object description: Download links for a 28-day Copilot usage metrics report. properties: download_links: type: array items: type: string format: uri description: Signed URLs to download the report files. example: [] report_start_day: type: string format: date description: Start date of the 28-day reporting period. example: '2026-01-15' report_end_day: type: string format: date description: End date of the 28-day reporting period. example: '2026-01-15' required: - download_links - report_start_day - report_end_day # ── Content Exclusion ──────────────────────────────────────────────── ContentExclusionRules: type: object description: >- Content exclusion rules mapping repository names to arrays of file path patterns that Copilot is prevented from accessing. additionalProperties: type: array items: type: string description: List of file path patterns to exclude for this repository. example: octo-repo: - /src/some-dir/kernel.rs - /secrets/**