How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

GitHub Enterprise Codespaces API

Endpoints to manage Codespaces using the REST API.

GitHub Enterprise Codespaces API is one of 58 APIs that GitHub Enterprise publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 8 JSON Schema definitions.

Tagged areas include codespaces. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, rate-limit docs, authentication docs, and 8 JSON Schemas.

This API exposes 48 operations across 33 paths, and defines 25 schemas. It is described by OpenAPI 3.2.0, at version 1.1.4.

Requests are made against a single base URL, https://api.github.com.

48 operations 33 paths 25 schemas 8 DELETE22 GET1 PATCH9 POST8 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.1.4
Base URL
https://api.github.com
Contact
License
Terms of Service
Resource Areas
1

Paths & Operations 48

Across 33 paths, the API surfaces 48 operations — 8 DELETE, 22 GET, 1 PATCH, 9 POST, 8 PUT. Each is listed below with its method, path, parameters, and response codes.

codespaces 48

Endpoints to manage Codespaces using the REST API.

GET
/orgs/{org}/codespaces
List codespaces for the organization
codespaces/list-in-organization 3 params → 200304500401403404
PUT
/orgs/{org}/codespaces/accessdeprecated
Manage access control for organization codespaces
codespaces/set-codespaces-access 1 param body → 204304400404422500
POST
/orgs/{org}/codespaces/access/selected_usersdeprecated
Add users to Codespaces access for an organization
codespaces/set-codespaces-access-users 1 param body → 204304400404422500
DELETE
/orgs/{org}/codespaces/access/selected_usersdeprecated
Remove users from Codespaces access for an organization
codespaces/delete-codespaces-access-users 1 param body → 204304400404422500
GET
/orgs/{org}/codespaces/secrets
List organization secrets
codespaces/list-org-secrets 3 params → 200
GET
/orgs/{org}/codespaces/secrets/public-key
Get an organization public key
codespaces/get-org-public-key 1 param → 200
GET
/orgs/{org}/codespaces/secrets/{secret_name}
Get an organization secret
codespaces/get-org-secret 2 params → 200
PUT
/orgs/{org}/codespaces/secrets/{secret_name}
Create or update an organization secret
codespaces/create-or-update-org-secret 2 params body → 201204404422
DELETE
/orgs/{org}/codespaces/secrets/{secret_name}
Delete an organization secret
codespaces/delete-org-secret 2 params → 204404
GET
/orgs/{org}/codespaces/secrets/{secret_name}/repositories
List selected repositories for an organization secret
codespaces/list-selected-repos-for-org-secret 4 params → 200404
PUT
/orgs/{org}/codespaces/secrets/{secret_name}/repositories
Set selected repositories for an organization secret
codespaces/set-selected-repos-for-org-secret 2 params body → 204404409
PUT
/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}
Add selected repository to an organization secret
codespaces/add-selected-repo-to-org-secret 3 params → 204404409422
DELETE
/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}
Remove selected repository from an organization secret
codespaces/remove-selected-repo-from-org-secret 3 params → 204404409422
GET
/orgs/{org}/members/{username}/codespaces
List codespaces for a user in organization
codespaces/get-codespaces-for-user-in-org 4 params → 200304500401403404
DELETE
/orgs/{org}/members/{username}/codespaces/{codespace_name}
Delete a codespace from the organization
codespaces/delete-from-organization 3 params → 202304500401403404
POST
/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop
Stop a codespace for an organization user
codespaces/stop-in-organization 3 params → 200304500401403404
GET
/repos/{owner}/{repo}/codespaces
List codespaces in a repository for the authenticated user
codespaces/list-in-repository-for-authenticated-user 4 params → 200500401403404
POST
/repos/{owner}/{repo}/codespaces
Create a codespace in a repository
codespaces/create-with-repo-for-authenticated-user 2 params body → 201202400401403404503
GET
/repos/{owner}/{repo}/codespaces/devcontainers
List devcontainer configurations in a repository for the authenticated user
codespaces/list-devcontainers-in-repository-for-authenticated-user 4 params → 200500400401403404
GET
/repos/{owner}/{repo}/codespaces/machines
List available machine types for a repository
codespaces/repo-machines-for-authenticated-user 5 params → 200304500401403404
GET
/repos/{owner}/{repo}/codespaces/new
Get default attributes for a codespace
codespaces/pre-flight-with-repo-for-authenticated-user 4 params → 200401403404
GET
/repos/{owner}/{repo}/codespaces/permissions_check
Check if permissions defined by a devcontainer have been accepted by the…
codespaces/check-permissions-for-devcontainer 4 params → 200401403404422503
GET
/repos/{owner}/{repo}/codespaces/secrets
List repository secrets
codespaces/list-repo-secrets 4 params → 200
GET
/repos/{owner}/{repo}/codespaces/secrets/public-key
Get a repository public key
codespaces/get-repo-public-key 2 params → 200
GET
/repos/{owner}/{repo}/codespaces/secrets/{secret_name}
Get a repository secret
codespaces/get-repo-secret 3 params → 200
PUT
/repos/{owner}/{repo}/codespaces/secrets/{secret_name}
Create or update a repository secret
codespaces/create-or-update-repo-secret 3 params body → 201204
DELETE
/repos/{owner}/{repo}/codespaces/secrets/{secret_name}
Delete a repository secret
codespaces/delete-repo-secret 3 params → 204
POST
/repos/{owner}/{repo}/pulls/{pull_number}/codespaces
Create a codespace from a pull request
codespaces/create-with-pr-for-authenticated-user 3 params body → 201202401403404503
GET
/user/codespaces
List codespaces for the authenticated user
codespaces/list-for-authenticated-user 3 params → 200304500401403404
POST
/user/codespaces
Create a codespace for the authenticated user
codespaces/create-for-authenticated-user body → 201202401403404503
GET
/user/codespaces/secrets
List secrets for the authenticated user
codespaces/list-secrets-for-authenticated-user 2 params → 200
GET
/user/codespaces/secrets/public-key
Get public key for the authenticated user
codespaces/get-public-key-for-authenticated-user → 200
GET
/user/codespaces/secrets/{secret_name}
Get a secret for the authenticated user
codespaces/get-secret-for-authenticated-user 1 param → 200
PUT
/user/codespaces/secrets/{secret_name}
Create or update a secret for the authenticated user
codespaces/create-or-update-secret-for-authenticated-user 1 param body → 201204422404
DELETE
/user/codespaces/secrets/{secret_name}
Delete a secret for the authenticated user
codespaces/delete-secret-for-authenticated-user 1 param → 204
GET
/user/codespaces/secrets/{secret_name}/repositories
List selected repositories for a user secret
codespaces/list-repositories-for-secret-for-authenticated-user 1 param → 200401403404500
PUT
/user/codespaces/secrets/{secret_name}/repositories
Set selected repositories for a user secret
codespaces/set-repositories-for-secret-for-authenticated-user 1 param body → 204401403404500
PUT
/user/codespaces/secrets/{secret_name}/repositories/{repository_id}
Add a selected repository to a user secret
codespaces/add-repository-for-secret-for-authenticated-user 2 params → 204401403404500
DELETE
/user/codespaces/secrets/{secret_name}/repositories/{repository_id}
Remove a selected repository from a user secret
codespaces/remove-repository-for-secret-for-authenticated-user 2 params → 204401403404500
GET
/user/codespaces/{codespace_name}
Get a codespace for the authenticated user
codespaces/get-for-authenticated-user 1 param → 200304500401403404
PATCH
/user/codespaces/{codespace_name}
Update a codespace for the authenticated user
codespaces/update-for-authenticated-user 1 param body → 200401403404
DELETE
/user/codespaces/{codespace_name}
Delete a codespace for the authenticated user
codespaces/delete-for-authenticated-user 1 param → 202304500401403404
POST
/user/codespaces/{codespace_name}/exports
Export a codespace for the authenticated user
codespaces/export-for-authenticated-user 1 param → 202500401403404422
GET
/user/codespaces/{codespace_name}/exports/{export_id}
Get details about a codespace export
codespaces/get-export-details-for-authenticated-user 2 params → 200404
GET
/user/codespaces/{codespace_name}/machines
List machine types for a codespace
codespaces/codespace-machines-for-authenticated-user 1 param → 200304500401403404
POST
/user/codespaces/{codespace_name}/publish
Create a repository from an unpublished codespace
codespaces/publish-for-authenticated-user 1 param body → 201401403404422
POST
/user/codespaces/{codespace_name}/start
Start a codespace for the authenticated user
codespaces/start-for-authenticated-user 1 param → 200304500400401402403404
POST
/user/codespaces/{codespace_name}/stop
Stop a codespace for the authenticated user
codespaces/stop-for-authenticated-user 1 param → 200500401403404

Schemas 25

The contract defines 25 schemas that model the data the API accepts and returns. The most detailed are full-repository (105 properties), repository (98 properties), nullable-repository (98 properties), minimal-repository (90 properties). Each schema is shown below with its type and property counts.

code-of-conduct
object
Code Of Conduct
5 properties 4 required
codespace-machine
object
A description of the machine powering a codespace.
7 properties 7 required
basic-error
object
Basic Error
4 properties
empty-object
object
An object without any properties.
nullable-codespace-machine
objectnull
A description of the machine powering a codespace.
7 properties 7 required
repo-codespaces-secret
object
Set repository secrets for GitHub Codespaces.
3 properties 3 required
nullable-license-simple
objectnull
License Simple
6 properties 5 required
codespaces-permissions-check-for-devcontainer
object
Permission check result for a given devcontainer config.
1 property 1 required
code-of-conduct-simple
object
Code of Conduct Simple
4 properties 4 required
codespace-export-details
object
An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest
7 properties
repository
object
A repository on GitHub.
98 properties 73 required
codespaces-org-secret
object
Secrets for a GitHub Codespace.
5 properties 4 required
validation-error
object
Validation Error
3 properties 2 required
minimal-repository
object
Minimal Repository
90 properties 46 required
codespaces-user-public-key
object
The public key used for setting user Codespaces' Secrets.
2 properties 2 required
nullable-simple-user
objectnull
A GitHub user.
22 properties 18 required
full-repository
object
Full Repository
105 properties 75 required
security-and-analysis
objectnull
11 properties
nullable-repository
objectnull
A repository on GitHub.
98 properties 73 required
codespace
object
A codespace.
32 properties 22 required
codespace-with-full-repository
object
A codespace.
31 properties 22 required
codespaces-secret
object
Secrets for a GitHub Codespace.
5 properties 5 required
codespaces-public-key
object
The public key used for setting Codespaces secrets.
6 properties 2 required
scim-error
object
Scim Error
6 properties
simple-user
object
A GitHub user.
22 properties 18 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

github-enterprise-codespaces-api-openapi.yml Raw ↑

Other APIs GitHub Enterprise publishes across the network.

GitHub Enterprise Cloud GraphQL API
GitHub MCP Server
GitHub Enterprise Actions API
GitHub Enterprise Code Scanning API
GitHub Enterprise Admin API
GitHub Enterprise Issues API
GitHub Enterprise SCIM API
GitHub Enterprise Users API
GitHub Enterprise Activity API
GitHub Enterprise Agent Automations API
GitHub Enterprise Agent Merge API
GitHub Enterprise Agent Tasks API
Where this information came from

This is an independent, third-party profile of GitHub Enterprise Codespaces API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.