Skip to main content
GitHub Docs
Version:
Free, Pro, & Team
Search GitHub Docs
REST API
/
Codespaces
All products
REST API
API Version:
2022-11-28 (latest)
Quickstart
Overview
About GitHub's APIs
Resources in the REST API
API Versions
Media types
Authenticating
Keeping API credentials secure
Troubleshooting
Libraries
OpenAPI description
Issue event types
GitHub event types
Endpoints for GitHub App installation tokens
Endpoints for GitHub App user tokens
Endpoints for fine-grained PATs
Permissions for GitHub Apps
Permissions for fine-grained PATs
Breaking changes
Guides
Using the API
Script with JavaScript
Discover resources for a user
Delivering deployments
Rendering data as graphs
Working with comments
Pagination
Building a CI server
Best practices
Get started - Git database
Get started - Checks
Encrypt secrets
Actions
Artifacts
Cache
OIDC
Permissions
Secrets
Self-hosted runners
Variables
Workflow jobs
Workflow runs
Workflows
Activity
Events
Feeds
Notifications
Starring
Watching
Apps
GitHub Apps
Installations
Marketplace
OAuth Authorizations
Webhooks
Billing
Billing
Branches
Branches
Protected branches
Checks
Check Runs
Check Suites
Classroom
Classroom
Code Scanning
Code Scanning
Codes of conduct
Codes of conduct
Codespaces
Codespaces
Organizations
Organization secrets
Machines
Repository secrets
User secrets
Collaborators
Collaborators
Invitations
Commits
Commits
Commit comments
Commit statuses
Copilot
Copilot for Business
Dependabot
Alerts
Secrets
Dependency Graph
Dependency review
Dependency submission
Software bill of materials (SBOM)
Deploy keys
Deploy keys
Deployments
Deployment branch policies
Deployments
Environments
Protection rules
Deployment statuses
Emojis
Emojis
Gists
Gists
Comments
Git database
Blobs
Commits
References
Tags
Trees
Gitignore
Gitignore
Interactions
Organization
Repository
User
Issues
Issues
Assignees
Comments
Events
Labels
Milestones
Timeline
Licenses
Licenses
Markdown
Markdown
Meta
Meta
Metrics
Community
Statistics
Traffic
Migrations
Organizations
Source imports
Users
Organizations
Blocking users
Members
Organizations
Outside Collaborators
Personal access tokens
Rules
Rule Suites
Security Managers
Webhooks
Packages
Packages
Pages
Pages
Projects (classic)
Boards
Cards
Collaborators
Columns
Pulls
Pulls
Review comments
Review requests
Reviews
Rate limit
Rate limit
Reactions
Reactions
Releases
Releases
Release Assets
Repositories
Autolinks
Contents
Forks
Repositories
Rules
Rule Suites
Tags
Search
Search
Secret scanning
Secret scanning
Security advisories
Global security advisories
Repository security advisories
Teams
Teams
Discussion comments
Discussions
Members
Users
Users
Blocking users
Emails
Followers
GPG Keys
Git SSH Keys
SSH signing keys
Social accounts
Repository webhooks
Repository Webhook Configuration
Repository Webhook Deliveries
Repository Webhooks
The REST API is now versioned.
For more information, see "
About API versioning
."
REST API
/
Codespaces
Codespaces
Use the REST API to manage GitHub Codespaces.
Codespaces
List codespaces in a repository for the authenticated user
Create a codespace in a repository
List devcontainer configurations in a repository for the authenticated user
Get default attributes for a codespace
Check if permissions defined by a devcontainer have been accepted by the authenticated user
Create a codespace from a pull request
List codespaces for the authenticated user
Create a codespace for the authenticated user
Get a codespace for the authenticated user
Update a codespace for the authenticated user
Delete a codespace for the authenticated user
Export a codespace for the authenticated user
Get details about a codespace export
Create a repository from an unpublished codespace
Start a codespace for the authenticated user
Stop a codespace for the authenticated user
Machines
List available machine types for a repository
List machine types for a codespace
Organization secrets
List organization secrets
Get an organization public key
Get an organization secret
Create or update an organization secret
Delete an organization secret
List selected repositories for an organization secret
Set selected repositories for an organization secret
Add selected repository to an organization secret
Remove selected repository from an organization secret
Organizations
List codespaces for the organization
Manage access control for organization codespaces
Add users to Codespaces access for an organization
Remove users from Codespaces access for an organization
List codespaces for a user in organization
Delete a codespace from the organization
Stop a codespace for an organization user
Repository secrets
List repository secrets
Get a repository public key
Get a repository secret
Create or update a repository secret
Delete a repository secret
Secrets
List secrets for the authenticated user
Get public key for the authenticated user
Get a secret for the authenticated user
Create or update a secret for the authenticated user
Delete a secret for the authenticated user
List selected repositories for a user secret
Set selected repositories for a user secret
Add a selected repository to a user secret
Remove a selected repository from a user secret