List Copilot Spaces for a user
Lists Copilot Spaces owned by a user. The authenticated user must have read access to the user’s Copilot Spaces.
Only Spaces that are readable by the authenticated user are returned. This includes the user’s own spaces, and public user spaces when accessing another user’s spaces.
OAuth app tokens and personal access tokens (classic) need the read:user scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The handle for the GitHub user account.
Query Parameters
Section titled “ Query Parameters ”The number of results per page (max 100).
A cursor, as given in the Link header. If specified, the query only searches for results before this cursor.
A cursor, as given in the Link header. If specified, the query only searches for results after this cursor.
Responses
Section titled “ Responses ”Response
object
The list of Copilot Spaces on this page of results.
A GitHub Copilot Space represents an interactive AI workspace where users can ask questions and get assistance.
object
The unique identifier of the space.
The number that identifies the space within its owner.
The display name of the space.
A description of the space.
General instructions for the Copilot Space.
The base role that determines default permissions.
no_access: No default accessreader: Default read permissionswriter: Default write permissions (organization spaces only)admin: Default admin permissions (organization spaces only)
A GitHub user.
object
A GitHub organization.
object
A GitHub user.
object
The date and time the space was created.
The date and time the space was last updated.
The HTML URL of the space.
The API URL of the space.
Resources attached to the space.
object
The unique identifier of the resource.
The type of resource.
The unique identifier of the chat attachment for uploaded files or media content.
The date and time the resource was created.
The date and time the resource was last updated.
Metadata specific to the resource type.
object
Repository ID for repository or file resources.
File path for file resources.
Text content for free text resources.
Name for the resource.
Issue or PR number.
Chat attachment ID for uploaded files or media.
Media type for media content resources.
URL for media content resources.
Height for media content resources.
Width for media content resources.
Examples
Example response for listing user copilot spaces
{ "spaces": [ { "id": 42, "number": 1, "name": "Personal Research Space", "description": "My personal space for research and development", "owner": { "login": "octocat", "id": 3, "node_id": "MDQ6VXNlcjM=", "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 }, "creator": { "login": "octocat", "id": 3, "node_id": "MDQ6VXNlcjM=", "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 }, "created_at": "2023-02-16T10:15:00Z", "updated_at": "2023-02-16T16:30:00Z", "html_url": "https://github.com/copilot/spaces/octocat/1", "api_url": "https://api.github.com/user/1/copilot-spaces/1" }, { "id": 43, "number": 2, "name": "Learning Space", "description": "Space for learning new technologies", "owner": { "login": "octocat", "id": 3, "node_id": "MDQ6VXNlcjM=", "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 }, "creator": { "login": "octocat", "id": 3, "node_id": "MDQ6VXNlcjM=", "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 }, "created_at": "2023-02-17T08:20:00Z", "updated_at": "2023-02-17T14:45:00Z", "html_url": "https://github.com/copilot/spaces/octocat/2", "api_url": "https://api.github.com/user/1/copilot-spaces/2" } ]}Headers
Section titled “ Headers ”Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"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"}