← All tags

Copilot-Spaces API Reference

Endpoints to manage Copilot Spaces using the REST API.

28 endpoints tagged copilot-spaces, each listing its parameters and possible responses. Search or scroll the index below to jump to a specific endpoint.

No endpoints match your search.

List organization Copilot Spaces

GET /orgs/{org}/copilot-spaces

Lists Copilot Spaces owned by an organization. The authenticated user must have read access to the organization's Copilot Spaces.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100).
beforequerynoA cursor, as given in the Link header. If specified, the query only searches for results before this cursor.
afterquerynoA cursor, as given in the Link header. If specified, the query only searches for results after this cursor.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Create an organization Copilot Space

POST /orgs/{org}/copilot-spaces

Creates a new Copilot Space owned by an organization. The authenticated user must have permissions to create spaces in the organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get an organization Copilot Space

GET /orgs/{org}/copilot-spaces/{space_number}

Gets details about a specific Copilot Space owned by an organization. The authenticated user must have read access to the Space.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set an organization Copilot Space

PUT /orgs/{org}/copilot-spaces/{space_number}

Updates a Copilot Space owned by an organization. The authenticated user must have permissions to update spaces in the organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Delete an organization Copilot Space

DELETE /orgs/{org}/copilot-spaces/{space_number}

Deletes a Copilot Space owned by an organization. The authenticated user must have permissions to delete spaces in the organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
204The Copilot Space has been successfully deleted.no
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

List collaborators for an organization Copilot Space

GET /orgs/{org}/copilot-spaces/{space_number}/collaborators

Lists all collaborators for a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to view collaborators.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Add a collaborator to an organization Copilot Space

POST /orgs/{org}/copilot-spaces/{space_number}/collaborators

Adds a collaborator (user or team) to a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Set a collaborator role for an organization Copilot Space

PUT /orgs/{org}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}

Updates the role of a collaborator for a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.
actor_typepathyesThe type of actor (user or team).
actor_identifierpathyesThe username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.

Responses

StatusDescriptionHas JSON body
200Responseyes
204Response when role is no_access and the collaborator was removed.no
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Remove a collaborator from an organization Copilot Space

DELETE /orgs/{org}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}

Removes a collaborator from a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.
actor_typepathyesThe type of actor (user or team).
actor_identifierpathyesThe username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes
404Resource not foundyes

List resources for an organization Copilot Space

GET /orgs/{org}/copilot-spaces/{space_number}/resources

Lists all resources attached to a specific Copilot Space owned by an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Create a resource for an organization Copilot Space

POST /orgs/{org}/copilot-spaces/{space_number}/resources

Creates a new resource in a specific Copilot Space owned by an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
201Resource createdyes
200Duplicate github_file resource already existsyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get a resource for an organization Copilot Space

GET /orgs/{org}/copilot-spaces/{space_number}/resources/{space_resource_id}

Gets a specific resource attached to a Copilot Space owned by an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.
space_resource_idpathyesThe unique identifier of the resource.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set a resource for an organization Copilot Space

PUT /orgs/{org}/copilot-spaces/{space_number}/resources/{space_resource_id}

Updates the metadata of a resource in a specific Copilot Space owned by an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.
space_resource_idpathyesThe unique identifier of the resource.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Delete a resource from an organization Copilot Space

DELETE /orgs/{org}/copilot-spaces/{space_number}/resources/{space_resource_id}

Deletes a resource from a specific Copilot Space owned by an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
space_numberpathyesThe unique identifier of the Copilot Space.
space_resource_idpathyesThe unique identifier of the resource.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes
404Resource not foundyes

List Copilot Spaces for a user

GET /users/{username}/copilot-spaces

Lists Copilot Spaces owned by a user. The authenticated user must have read access to the user's Copilot Spaces.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
per_pagequerynoThe number of results per page (max 100).
beforequerynoA cursor, as given in the Link header. If specified, the query only searches for results before this cursor.
afterquerynoA cursor, as given in the Link header. If specified, the query only searches for results after this cursor.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Create a Copilot Space for a user

POST /users/{username}/copilot-spaces

Creates a new Copilot Space owned by a user. Only the authenticated user can create spaces for their own account.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get a Copilot Space for a user

GET /users/{username}/copilot-spaces/{space_number}

Gets details about a specific Copilot Space owned by a user. The authenticated user must have read access to the Space.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set a Copilot Space for a user

PUT /users/{username}/copilot-spaces/{space_number}

Updates a Copilot Space owned by a user. Only the authenticated user can update spaces for their own account.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Delete a Copilot Space for a user

DELETE /users/{username}/copilot-spaces/{space_number}

Deletes a Copilot Space owned by a user. The authenticated user must be the owner of the space.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
204The Copilot Space has been successfully deleted.no
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

List collaborators for a Copilot Space for a user

GET /users/{username}/copilot-spaces/{space_number}/collaborators

Lists all collaborators for a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Add a collaborator to a Copilot Space for a user

POST /users/{username}/copilot-spaces/{space_number}/collaborators

Adds a collaborator to a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Set a collaborator role for a Copilot Space for a user

PUT /users/{username}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}

Updates the role of a collaborator for a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.
actor_typepathyesThe type of actor (must be User for user-owned spaces; Team will be rejected).
actor_identifierpathyesThe username of the collaborator. The numeric user ID is also accepted.

Responses

StatusDescriptionHas JSON body
200Responseyes
204Response when role is no_access and the collaborator was removed.no
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Remove a collaborator from a Copilot Space for a user

DELETE /users/{username}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}

Removes a collaborator from a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.
actor_typepathyesThe type of actor (must be User for user-owned spaces; Team will be rejected).
actor_identifierpathyesThe username of the collaborator. The numeric user ID is also accepted.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes
404Resource not foundyes

List resources for a Copilot Space for a user

GET /users/{username}/copilot-spaces/{space_number}/resources

Lists all resources attached to a specific Copilot Space owned by a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Create a resource for a Copilot Space for a user

POST /users/{username}/copilot-spaces/{space_number}/resources

Creates a new resource in a specific Copilot Space owned by a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.

Responses

StatusDescriptionHas JSON body
201Resource createdyes
200Duplicate github_file resource already existsyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get a resource for a Copilot Space for a user

GET /users/{username}/copilot-spaces/{space_number}/resources/{space_resource_id}

Gets a specific resource attached to a Copilot Space owned by a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.
space_resource_idpathyesThe unique identifier of the resource.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set a resource for a Copilot Space for a user

PUT /users/{username}/copilot-spaces/{space_number}/resources/{space_resource_id}

Updates the metadata of a resource in a specific Copilot Space owned by a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.
space_resource_idpathyesThe unique identifier of the resource.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Delete a resource from a Copilot Space for a user

DELETE /users/{username}/copilot-spaces/{space_number}/resources/{space_resource_id}

Deletes a resource from a specific Copilot Space owned by a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
space_numberpathyesThe unique identifier of the Copilot Space.
space_resource_idpathyesThe unique identifier of the resource.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes
404Resource not foundyes