Sample - GitHub REST API
GET/orgs/{org}/members/{username}/copilot

Get Copilot seat assignment details for a user

[!NOTE] This endpoint is in public preview and is subject to change.

Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.

The 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. For more information about activity data, see Metrics data properties for GitHub Copilot.

Only organization owners can view Copilot seat assignment details for members of their organization.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
orgstringrequired
The organization name. The name is not case sensitive.
usernamestringrequired
The handle for the GitHub user account.

6 status codes
200The user's GitHub Copilot seat details, including usage.
assigneeobjectoptional
A GitHub user.
organizationobjectoptional
A GitHub organization.
assigning_teamobjectoptional
The team through which the assignee is granted access to GitHub Copilot, if applicable.
pending_cancellation_datestringoptional
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.
last_activity_atstringoptional
Timestamp of user's last GitHub Copilot activity, in ISO 8601 format.
last_activity_editorstringoptional
Last editor that was used by the user for a GitHub Copilot completion.
last_authenticated_atstringoptional
Timestamp of the last time the user authenticated with GitHub Copilot, in ISO 8601 format.
created_atstringrequired
Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format.
updated_atstringdeprecatedoptional
**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.
plan_typestringoptional
The Copilot plan of the organization, or the parent enterprise, when applicable.
Allowed:businessenterpriseunknown
401Requires authentication
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Copilot Business or Enterprise is not enabled for this organization or the user has a pending organization invitation.
500Internal Error
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 401 is returned: Requires authentication. A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 422 is returned: Copilot Business or Enterprise is not enabled for this organization or the user has a pending organization invitation. A 500 is returned: Internal Error.