Endpoints to manage Codespaces using the REST API.
48 endpoints tagged codespaces, 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}/codespaces
Lists the codespaces associated to a specified organization.
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/codespaces/access
Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response when successfully modifying permissions. | no |
| 304 | Not modified | no |
| 400 | Users are neither members nor collaborators of this organization. | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 500 | Internal Error | yes |
POST /orgs/{org}/codespaces/access/selected_users
Codespaces for the specified users will be billed to the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response when successfully modifying permissions. | no |
| 304 | Not modified | no |
| 400 | Users are neither members nor collaborators of this organization. | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 500 | Internal Error | yes |
DELETE /orgs/{org}/codespaces/access/selected_users
Codespaces for the specified users will no longer be billed to the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response when successfully modifying permissions. | no |
| 304 | Not modified | no |
| 400 | Users are neither members nor collaborators of this organization. | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 500 | Internal Error | yes |
GET /orgs/{org}/codespaces/secrets
Lists all Codespaces development environment secrets available at the organization-level without revealing their encrypted
| 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). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/codespaces/secrets/public-key
Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/codespaces/secrets/{secret_name}
Gets an organization development environment secret without revealing its encrypted value.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/codespaces/secrets/{secret_name}
Creates or updates an organization development environment secret with an encrypted value. Encrypt your secret using
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a secret | yes |
| 204 | Response when updating a secret | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/codespaces/secrets/{secret_name}
Deletes an organization development environment secret using the secret name.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories
Lists all repositories that have been selected when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories
Replaces all repositories for an organization development environment secret when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 409 | Conflict when visibility type not set to selected | no |
PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}
Adds a repository to an organization development environment secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content when repository was added to the selected list | no |
| 404 | Resource not found | yes |
| 409 | Conflict when visibility type is not set to selected | no |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}
Removes a repository from an organization development environment secret when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response when repository was removed from the selected list | no |
| 404 | Resource not found | yes |
| 409 | Conflict when visibility type not set to selected | no |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/members/{username}/codespaces
Lists the codespaces that a member of an organization has for repositories in that organization.
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}
Deletes a user's codespace.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | Accepted | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop
Stops a user's codespace.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /repos/{owner}/{repo}/codespaces
Lists the codespaces associated to a specified repository and the authenticated user.
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /repos/{owner}/{repo}/codespaces
Creates a codespace owned by the authenticated user in the specified repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when the codespace was successfully created | yes |
| 202 | Response when the codespace creation partially failed but is being retried in the background | yes |
| 400 | Bad Request | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 503 | Service unavailable | yes |
GET /repos/{owner}/{repo}/codespaces/devcontainers
Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 400 | Bad Request | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /repos/{owner}/{repo}/codespaces/machines
List the machine types available for a given repository based on its configuration.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
location | query | no | The location to check for available machines. Assigned by IP if not provided. |
client_ip | query | no | IP for location auto-detection when proxying a request |
ref | query | no | The branch or commit to check for prebuild availability and devcontainer restrictions. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /repos/{owner}/{repo}/codespaces/new
Gets the default attributes for codespaces created by the user with the repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
ref | query | no | The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. |
client_ip | query | no | An alternative IP for default location auto-detection, such as when proxying a request. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when a user is able to create codespaces from the repository. | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /repos/{owner}/{repo}/codespaces/permissions_check
Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
ref | query | yes | The git reference that points to the location of the devcontainer configuration to use for the permission check. The value of ref will typically be a branch name (heads/BRANCH_NAME). For more information, see "Git References" in the Git documentation. |
devcontainer_path | query | yes | Path to the devcontainer.json configuration to use for the permission check. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when the permission check is successful | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 503 | Service unavailable | yes |
GET /repos/{owner}/{repo}/codespaces/secrets
Lists all development environment secrets available in a repository without revealing their encrypted
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/codespaces/secrets/public-key
Gets your public key, which you need to encrypt secrets. You need to
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}
Gets a single repository development environment secret without revealing its encrypted value.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}
Creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a secret | yes |
| 204 | Response when updating a secret | no |
DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}
Deletes a development environment secret in a repository using the secret name.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces
Creates a codespace owned by the authenticated user for the specified pull request.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
pull_number | path | yes | The number that identifies the pull request. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when the codespace was successfully created | yes |
| 202 | Response when the codespace creation partially failed but is being retried in the background | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 503 | Service unavailable | yes |
GET /user/codespaces
Lists the authenticated user's codespaces.
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
repository_id | query | no | ID of the Repository to filter on |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /user/codespaces
Creates a new codespace, owned by the authenticated user.
No parameters.
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when the codespace was successfully created | yes |
| 202 | Response when the codespace creation partially failed but is being retried in the background | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 503 | Service unavailable | yes |
GET /user/codespaces/secrets
Lists all development environment secrets available for a user's codespaces without revealing their
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /user/codespaces/secrets/public-key
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.
No parameters.
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /user/codespaces/secrets/{secret_name}
Gets a development environment secret available to a user's codespaces without revealing its encrypted value.
| Name | In | Required | Description |
|---|---|---|---|
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /user/codespaces/secrets/{secret_name}
Creates or updates a development environment secret for a user's codespace with an encrypted value. Encrypt your secret using
| Name | In | Required | Description |
|---|---|---|---|
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response after successfully creating a secret | yes |
| 204 | Response after successfully updating a secret | no |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
DELETE /user/codespaces/secrets/{secret_name}
Deletes a development environment secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.
| Name | In | Required | Description |
|---|---|---|---|
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /user/codespaces/secrets/{secret_name}/repositories
List the repositories that have been granted the ability to use a user's development environment secret.
| Name | In | Required | Description |
|---|---|---|---|
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
PUT /user/codespaces/secrets/{secret_name}/repositories
Select the repositories that will use a user's development environment secret.
| Name | In | Required | Description |
|---|---|---|---|
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content when repositories were added to the selected list | no |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}
Adds a repository to the selected repositories for a user's development environment secret.
| Name | In | Required | Description |
|---|---|---|---|
secret_name | path | yes | The name of the secret. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content when repository was added to the selected list | no |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}
Removes a repository from the selected repositories for a user's development environment secret.
| Name | In | Required | Description |
|---|---|---|---|
secret_name | path | yes | The name of the secret. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content when repository was removed from the selected list | no |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
GET /user/codespaces/{codespace_name}
Gets information about a user's codespace.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PATCH /user/codespaces/{codespace_name}
Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
DELETE /user/codespaces/{codespace_name}
Deletes a user's codespace.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | Accepted | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /user/codespaces/{codespace_name}/exports
Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | Response | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /user/codespaces/{codespace_name}/exports/{export_id}
Gets information about an export of a codespace.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
export_id | path | yes | The ID of the export operation, or latest. Currently only latest is currently supported. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
GET /user/codespaces/{codespace_name}/machines
List the machine types a codespace can transition to use.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /user/codespaces/{codespace_name}/publish
Publishes an unpublished codespace, creating a new repository and assigning it to the codespace.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
POST /user/codespaces/{codespace_name}/start
Starts a user's codespace.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 500 | Internal Error | yes |
| 400 | Bad Request | yes |
| 401 | Requires authentication | yes |
| 402 | Payment required | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
POST /user/codespaces/{codespace_name}/stop
Stops a user's codespace.
| Name | In | Required | Description |
|---|---|---|---|
codespace_name | path | yes | The name of the codespace. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |