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.
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). |
before | query | no | A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. |
after | query | no | A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | The Copilot Space has been successfully deleted. | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
actor_type | path | yes | The type of actor (user or team). |
actor_identifier | path | yes | The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 204 | Response when role is no_access and the collaborator was removed. | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
actor_type | path | yes | The type of actor (user or team). |
actor_identifier | path | yes | The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/copilot-spaces/{space_number}/resources
Lists all resources attached to a specific Copilot Space owned by an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/copilot-spaces/{space_number}/resources
Creates a new resource in a specific Copilot Space owned by an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Resource created | yes |
| 200 | Duplicate github_file resource already exists | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/copilot-spaces/{space_number}/resources/{space_resource_id}
Gets a specific resource attached to a Copilot Space owned by an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
space_resource_id | path | yes | The unique identifier of the resource. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
space_resource_id | path | yes | The unique identifier of the resource. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/copilot-spaces/{space_number}/resources/{space_resource_id}
Deletes a resource from a specific Copilot Space owned by an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
space_number | path | yes | The unique identifier of the Copilot Space. |
space_resource_id | path | yes | The unique identifier of the resource. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
per_page | query | no | The number of results per page (max 100). |
before | query | no | A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. |
after | query | no | A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | The Copilot Space has been successfully deleted. | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
actor_type | path | yes | The type of actor (must be User for user-owned spaces; Team will be rejected). |
actor_identifier | path | yes | The username of the collaborator. The numeric user ID is also accepted. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 204 | Response when role is no_access and the collaborator was removed. | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
actor_type | path | yes | The type of actor (must be User for user-owned spaces; Team will be rejected). |
actor_identifier | path | yes | The username of the collaborator. The numeric user ID is also accepted. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /users/{username}/copilot-spaces/{space_number}/resources
Lists all resources attached to a specific Copilot Space owned by a user.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /users/{username}/copilot-spaces/{space_number}/resources
Creates a new resource in a specific Copilot Space owned by a user.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Resource created | yes |
| 200 | Duplicate github_file resource already exists | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /users/{username}/copilot-spaces/{space_number}/resources/{space_resource_id}
Gets a specific resource attached to a Copilot Space owned by a user.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
space_resource_id | path | yes | The unique identifier of the resource. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
space_resource_id | path | yes | The unique identifier of the resource. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /users/{username}/copilot-spaces/{space_number}/resources/{space_resource_id}
Deletes a resource from a specific Copilot Space owned by a user.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
space_number | path | yes | The unique identifier of the Copilot Space. |
space_resource_id | path | yes | The unique identifier of the resource. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |