List all Copilot seat assignments for an organization
[!NOTE] This endpoint is in public preview and is subject to change.
Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed. Only organization owners can view assigned seats.
Each 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.
For more information about activity data, see Metrics data properties for GitHub Copilot.
OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read: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.
Query Parameters
Section titled “ Query Parameters ”The page number of the results to fetch. For more information, see “Using pagination in the REST API.”
The number of results per page (max 100). For more information, see “Using pagination in the REST API.”
Responses
Section titled “ Responses ”Response
object
Total number of Copilot seats for the organization currently being billed.
Information about a Copilot Business seat assignment for a user, team, or organization.
object
A GitHub user.
object
A GitHub organization.
object
Groups of organization members that gives permissions on specified repositories.
object
object
The ownership type of the team
How the team’s access to the repository was granted. This property is only
present when the team is returned in a repository context, such as
GET /repos/{owner}/{repo}/teams.
Unique identifier of the organization to which this team belongs
Unique identifier of the enterprise to which this team belongs
Groups of organization members that gives permissions on specified repositories.
object
Unique identifier of the team
URL for the team
Name of the team
Description of the team
Permission that the team will have for its repositories
The level of privacy this team should have
The notification setting the team has set
Distinguished Name (DN) that team maps to within LDAP environment
The ownership type of the team
Unique identifier of the organization to which this team belongs
Unique identifier of the enterprise to which this team belongs
Group of enterprise owners and/or members
object
Retired: this field will not be returned with GHEC enterprise teams.
Retired: this field will not be returned with GHEC enterprise teams.
Whether team members will receive notifications when the team is mentioned.
The pending cancellation date for the seat, in YYYY-MM-DD format. This will be null unless the assignee’s Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization’s next billing cycle.
Timestamp of user’s last GitHub Copilot activity, in ISO 8601 format.
Last editor that was used by the user for a GitHub Copilot completion.
Timestamp of the last time the user authenticated with GitHub Copilot, in ISO 8601 format.
Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format.
Closing down notice: This field is no longer relevant and is closing down. Use the created_at field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee’s GitHub Copilot access was last updated, in ISO 8601 format.
The Copilot plan of the organization, or the parent enterprise, when applicable.
Examples
{ "total_seats": 2, "seats": [ { "created_at": "2021-08-03T18:00:00-06:00", "updated_at": "2021-09-23T15:00:00-06:00", "pending_cancellation_date": null, "last_activity_at": "2021-10-14T00:53:32-06:00", "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", "last_authenticated_at": "2021-10-14T00:53:32-06:00", "plan_type": "business", "assignee": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "assigning_team": { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://api.github.com/teams/1", "html_url": "https://github.com/orgs/github/teams/justice-league", "name": "Justice League", "slug": "justice-league", "description": "A great team.", "privacy": "closed", "notification_setting": "notifications_enabled", "permission": "admin", "members_url": "https://api.github.com/teams/1/members{/member}", "repositories_url": "https://api.github.com/teams/1/repos", "parent": null } }, { "created_at": "2021-09-23T18:00:00-06:00", "updated_at": "2021-09-23T15:00:00-06:00", "pending_cancellation_date": "2021-11-01", "last_activity_at": "2021-10-13T00:53:32-06:00", "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", "last_authenticated_at": "2021-10-14T00:53:32-06:00", "assignee": { "login": "octokitten", "id": 1, "node_id": "MDQ76VNlcjE=", "avatar_url": "https://github.com/images/error/octokitten_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octokitten", "html_url": "https://github.com/octokitten", "followers_url": "https://api.github.com/users/octokitten/followers", "following_url": "https://api.github.com/users/octokitten/following{/other_user}", "gists_url": "https://api.github.com/users/octokitten/gists{/gist_id}", "starred_url": "https://api.github.com/users/octokitten/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octokitten/subscriptions", "organizations_url": "https://api.github.com/users/octokitten/orgs", "repos_url": "https://api.github.com/users/octokitten/repos", "events_url": "https://api.github.com/users/octokitten/events{/privacy}", "received_events_url": "https://api.github.com/users/octokitten/received_events", "type": "User", "site_admin": false } } ]}Headers
Section titled “ Headers ”Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"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"}Internal Error
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}