GitHub · Schema
Codespace
A codespace.
CodeDeveloper ToolsPipelinesPlatformSoftware DevelopmentVersion ControlT1GitHub
Properties
| Name | Type | Description |
|---|---|---|
| id | integer | |
| name | string | Automatically generated name of this codespace. |
| display_name | stringnull | Display name for this codespace. |
| environment_id | stringnull | UUID identifying this codespace's environment. |
| owner | object | |
| billable_owner | object | |
| repository | object | |
| machine | object | |
| devcontainer_path | stringnull | Path to devcontainer.json from repo root used to create Codespace. |
| prebuild | booleannull | Whether the codespace was created from a prebuild. |
| created_at | string | |
| updated_at | string | |
| last_used_at | string | Last known time this codespace was started. |
| state | string | State of this codespace. |
| url | string | API URL for this codespace. |
| git_status | object | Details about the codespace's git repository. |
| location | string | The initally assigned location of a new codespace. |
| idle_timeout_minutes | integernull | The number of minutes of inactivity after which this codespace will be automatically stopped. |
| web_url | string | URL to access this codespace on the web. |
| machines_url | string | API URL to access available alternate machine types for this codespace. |
| start_url | string | API URL to start this codespace. |
| stop_url | string | API URL to stop this codespace. |
| publish_url | stringnull | API URL to publish this codespace to a new repository. |
| pulls_url | stringnull | API URL for the Pull Request associated with this codespace, if any. |
| recent_folders | array | |
| runtime_constraints | object | |
| pending_operation | booleannull | Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. |
| pending_operation_disabled_reason | stringnull | Text to show user when codespace is disabled by a pending operation |
| idle_timeout_notice | stringnull | Text to show user when codespace idle timeout minutes has been overriden by an organization policy |
| retention_period_minutes | integernull | Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). |
| retention_expires_at | stringnull | When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" |
| last_known_stop_notice | stringnull | The text to display to a user when a codespace has been stopped for a potentially actionable reason. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/github/json-schema/github-codespace-schema.json",
"title": "Codespace",
"description": "A codespace.",
"x-generated": "2026-11-12",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/github-codespaces-api-openapi.yml#/components/schemas/codespace",
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"description": "Automatically generated name of this codespace.",
"type": "string"
},
"display_name": {
"description": "Display name for this codespace.",
"type": [
"string",
"null"
]
},
"environment_id": {
"description": "UUID identifying this codespace's environment.",
"type": [
"string",
"null"
]
},
"owner": {
"$ref": "#/$defs/simple-user"
},
"billable_owner": {
"$ref": "#/$defs/simple-user"
},
"repository": {
"$ref": "#/$defs/minimal-repository"
},
"machine": {
"$ref": "#/$defs/nullable-codespace-machine"
},
"devcontainer_path": {
"description": "Path to devcontainer.json from repo root used to create Codespace.",
"type": [
"string",
"null"
]
},
"prebuild": {
"description": "Whether the codespace was created from a prebuild.",
"type": [
"boolean",
"null"
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"last_used_at": {
"description": "Last known time this codespace was started.",
"type": "string",
"format": "date-time"
},
"state": {
"description": "State of this codespace.",
"enum": [
"Unknown",
"Created",
"Queued",
"Provisioning",
"Available",
"Awaiting",
"Unavailable",
"Deleted",
"Moved",
"Shutdown",
"Archived",
"Starting",
"ShuttingDown",
"Failed",
"Exporting",
"Updating",
"Rebuilding"
],
"type": "string"
},
"url": {
"description": "API URL for this codespace.",
"type": "string",
"format": "uri"
},
"git_status": {
"description": "Details about the codespace's git repository.",
"type": "object",
"properties": {
"ahead": {
"description": "The number of commits the local repository is ahead of the remote.",
"type": "integer"
},
"behind": {
"description": "The number of commits the local repository is behind the remote.",
"type": "integer"
},
"has_unpushed_changes": {
"description": "Whether the local repository has unpushed changes.",
"type": "boolean"
},
"has_uncommitted_changes": {
"description": "Whether the local repository has uncommitted changes.",
"type": "boolean"
},
"ref": {
"description": "The current branch (or SHA if in detached HEAD state) of the local repository.",
"type": "string"
}
}
},
"location": {
"description": "The initally assigned location of a new codespace.",
"enum": [
"EastUs",
"SouthEastAsia",
"WestEurope",
"WestUs2"
],
"type": "string"
},
"idle_timeout_minutes": {
"description": "The number of minutes of inactivity after which this codespace will be automatically stopped.",
"type": [
"integer",
"null"
]
},
"web_url": {
"description": "URL to access this codespace on the web.",
"type": "string",
"format": "uri"
},
"machines_url": {
"description": "API URL to access available alternate machine types for this codespace.",
"type": "string",
"format": "uri"
},
"start_url": {
"description": "API URL to start this codespace.",
"type": "string",
"format": "uri"
},
"stop_url": {
"description": "API URL to stop this codespace.",
"type": "string",
"format": "uri"
},
"publish_url": {
"description": "API URL to publish this codespace to a new repository.",
"type": [
"string",
"null"
],
"format": "uri"
},
"pulls_url": {
"description": "API URL for the Pull Request associated with this codespace, if any.",
"type": [
"string",
"null"
],
"format": "uri"
},
"recent_folders": {
"type": "array",
"items": {
"type": "string"
}
},
"runtime_constraints": {
"type": "object",
"properties": {
"allowed_port_privacy_settings": {
"description": "The privacy settings a user can select from when forwarding a port.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
}
},
"pending_operation": {
"description": "Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it.",
"type": [
"boolean",
"null"
]
},
"pending_operation_disabled_reason": {
"description": "Text to show user when codespace is disabled by a pending operation",
"type": [
"string",
"null"
]
},
"idle_timeout_notice": {
"description": "Text to show user when codespace idle timeout minutes has been overriden by an organization policy",
"type": [
"string",
"null"
]
},
"retention_period_minutes": {
"description": "Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).",
"type": [
"integer",
"null"
]
},
"retention_expires_at": {
"description": "When a codespace will be auto-deleted based on the \"retention_period_minutes\" and \"last_used_at\"",
"type": [
"string",
"null"
],
"format": "date-time"
},
"last_known_stop_notice": {
"description": "The text to display to a user when a codespace has been stopped for a potentially actionable reason.",
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"environment_id",
"owner",
"billable_owner",
"repository",
"machine",
"prebuild",
"created_at",
"updated_at",
"last_used_at",
"state",
"url",
"git_status",
"location",
"idle_timeout_minutes",
"web_url",
"machines_url",
"start_url",
"stop_url",
"pulls_url",
"recent_folders"
],
"$defs": {
"code-of-conduct": {
"title": "Code Of Conduct",
"description": "Code Of Conduct",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"body": {
"type": "string"
},
"html_url": {
"type": [
"string",
"null"
],
"format": "uri"
}
},
"required": [
"url",
"html_url",
"key",
"name"
]
},
"minimal-repository": {
"title": "Minimal Repository",
"description": "Minimal Repository",
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"node_id": {
"type": "string"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"owner": {
"$ref": "#/$defs/simple-user"
},
"private": {
"type": "boolean"
},
"html_url": {
"type": "string",
"format": "uri"
},
"description": {
"type": [
"string",
"null"
]
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string",
"format": "uri"
},
"archive_url": {
"type": "string"
},
"assignees_url": {
"type": "string"
},
"blobs_url": {
"type": "string"
},
"branches_url": {
"type": "string"
},
"collaborators_url": {
"type": "string"
},
"comments_url": {
"type": "string"
},
"commits_url": {
"type": "string"
},
"compare_url": {
"type": "string"
},
"contents_url": {
"type": "string"
},
"contributors_url": {
"type": "string",
"format": "uri"
},
"deployments_url": {
"type": "string",
"format": "uri"
},
"downloads_url": {
"type": "string",
"format": "uri"
},
"events_url": {
"type": "string",
"format": "uri"
},
"forks_url": {
"type": "string",
"format": "uri"
},
"git_commits_url": {
"type": "string"
},
"git_refs_url": {
"type": "string"
},
"git_tags_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"issue_comment_url": {
"type": "string"
},
"issue_events_url": {
"type": "string"
},
"issues_url": {
"type": "string"
},
"keys_url": {
"type": "string"
},
"labels_url": {
"type": "string"
},
"languages_url": {
"type": "string",
"format": "uri"
},
"merges_url": {
"type": "string",
"format": "uri"
},
"milestones_url": {
"type": "string"
},
"notifications_url": {
"type": "string"
},
"pulls_url": {
"type": "string"
},
"releases_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"stargazers_url": {
"type": "string",
"format": "uri"
},
"statuses_url": {
"type": "string"
},
"subscribers_url": {
"type": "string",
"format": "uri"
},
"subscription_url": {
"type": "string",
"format": "uri"
},
"tags_url": {
"type": "string",
"format": "uri"
},
"teams_url": {
"type": "string",
"format": "uri"
},
"trees_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"mirror_url": {
"type": [
"string",
"null"
]
},
"hooks_url": {
"type": "string",
"format": "uri"
},
"svn_url": {
"type": "string"
},
"homepage": {
"type": [
"string",
"null"
]
},
"language": {
"type": [
"string",
"null"
]
},
"forks_count": {
"type": "integer"
},
"stargazers_count": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"description": "The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.",
"type": "integer"
},
"default_branch": {
"type": "string"
},
"open_issues_count": {
"type": "integer"
},
"is_template": {
"type": "boolean"
},
"topics": {
"type": "array",
"items": {
"type": "string"
}
},
"has_issues": {
"type": "boolean"
},
"has_projects": {
"type": "boolean"
},
"has_wiki": {
"type": "boolean"
},
"has_pages": {
"type": "boolean"
},
"has_downloads": {
"type": "boolean"
},
"has_discussions": {
"type": "boolean"
},
"has_pull_requests": {
"type": "boolean"
},
"pull_request_creation_policy": {
"description": "The policy controlling who can create pull requests: all or collaborators_only.",
"type": "string",
"enum": [
"all",
"collaborators_only"
]
},
"archived": {
"type": "boolean"
},
"disabled": {
"type": "boolean"
},
"visibility": {
"type": "string"
},
"pushed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"permissions": {
"type": "object",
"properties": {
"admin": {
"type": "boolean"
},
"maintain": {
"type": "boolean"
},
"push": {
"type": "boolean"
},
"triage": {
"type": "boolean"
},
"pull": {
"type": "boolean"
}
}
},
"role_name": {
"type": "string"
},
"temp_clone_token": {
"description": "When present and non-empty, a temporary credential for read-only Git access to this repository.\nIt expires five minutes after generation and cannot be used to push changes.\nTreat this value as sensitive and avoid recording it in logs.",
"type": "string"
},
"delete_branch_on_merge": {
"type": "boolean"
},
"subscribers_count": {
"type": "integer"
},
"network_count": {
"type": "integer"
},
"code_of_conduct": {
"$ref": "#/$defs/code-of-conduct"
},
"license": {
"type": [
"object",
"null"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"spdx_id": {
"type": "string"
},
"url": {
"type": [
"string",
"null"
]
},
"node_id": {
"type": "string"
}
}
},
"forks": {
"type": "integer"
},
"open_issues": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"allow_forking": {
"type": "boolean"
},
"web_commit_signoff_required": {
"type": "boolean"
},
"security_and_analysis": {
"$ref": "#/$defs/security-and-analysis"
},
"custom_properties": {
"type": "object",
"description": "The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.",
"additionalProperties": true
}
},
"required": [
"archive_url",
"assignees_url",
"blobs_url",
"branches_url",
"collaborators_url",
"comments_url",
"commits_url",
"compare_url",
"contents_url",
"contributors_url",
"deployments_url",
"description",
"downloads_url",
"events_url",
"fork",
"forks_url",
"full_name",
"git_commits_url",
"git_refs_url",
"git_tags_url",
"hooks_url",
"html_url",
"id",
"node_id",
"issue_comment_url",
"issue_events_url",
"issues_url",
"keys_url",
"labels_url",
"languages_url",
"merges_url",
"milestones_url",
"name",
"notifications_url",
"owner",
"private",
"pulls_url",
"releases_url",
"stargazers_url",
"statuses_url",
"subscribers_url",
"subscription_url",
"tags_url",
"teams_url",
"trees_url",
"url"
],
"x-github-breaking-changes": [
{
"changeset": "remove_has_downloads",
"patch": {
"properties": {
"has_downloads": null
}
},
"version": "2026-03-10"
}
]
},
"nullable-codespace-machine": {
"type": [
"object",
"null"
],
"title": "Codespace machine",
"description": "A description of the machine powering a codespace.",
"properties": {
"name": {
"type": "string",
"description": "The name of the machine."
},
"display_name": {
"type": "string",
"description": "The display name of the machine includes cores, memory, and storage."
},
"operating_system": {
"type": "string",
"description": "The operating system of the machine."
},
"storage_in_bytes": {
"type": "integer",
"description": "How much storage is available to the codespace."
},
"memory_in_bytes": {
"type": "integer",
"description": "How much memory is available to the codespace."
},
"cpus": {
"type": "integer",
"description": "How many cores are available to the codespace."
},
"prebuild_availability": {
"type": [
"string",
"null"
],
"description": "Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be \"null\" if prebuilds are not supported or prebuild availability could not be determined. Value will be \"none\" if no prebuild is available. Latest values \"ready\" and \"in_progress\" indicate the prebuild availability status.",
"enum": [
"none",
"ready",
"in_progress",
null
]
}
},
"required": [
"name",
"display_name",
"operating_system",
"storage_in_bytes",
"memory_in_bytes",
"cpus",
"prebuild_availability"
]
},
"security-and-analysis": {
"type": [
"object",
"null"
],
"properties": {
"advanced_security": {
"description": "Enable or disable GitHub Advanced Security for the repository.\n\nFor standalone Code Scanning or Secret Protection products, this parameter cannot be used.\n",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"code_security": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"dependabot_security_updates": {
"description": "Enable or disable Dependabot security updates for the repository.",
"type": "object",
"properties": {
"status": {
"description": "The enablement status of Dependabot security updates for the repository.",
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"secret_scanning": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"secret_scanning_push_protection": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"secret_scanning_non_provider_patterns": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"secret_scanning_ai_detection": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"secret_scanning_delegated_alert_dismissal": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"secret_scanning_delegated_bypass": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"enabled",
"disabled"
]
}
}
},
"secret_scanning_delegated_bypass_options": {
"type": "object",
"properties": {
"reviewers": {
"type": "array",
"description": "The bypass reviewers for secret scanning delegated bypass",
"items": {
"type": "object",
"required": [
"reviewer_id",
"reviewer_type"
],
"properties": {
"reviewer_id": {
"type": "integer",
"description": "The ID of the team or role selected as a bypass reviewer"
},
"reviewer_type": {
"type": "string",
"description": "The type of the bypass reviewer",
"enum": [
"TEAM",
"ROLE"
]
},
"mode": {
"type": "string",
"description": "The bypass mode for the reviewer",
"enum": [
"ALWAYS",
"EXEMPT"
],
"default": "ALWAYS"
}
}
}
}
}
}
}
},
"simple-user": {
"title": "Simple User",
"description": "A GitHub user.",
"type": "object",
"properties": {
"name": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"login": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"node_id": {
"type": "string"
},
"avatar_url": {
"type": "string",
"format": "uri"
},
"gravatar_id": {
"type": [
"string",
"null"
]
},
"url": {
"type": "string",
"format": "uri"
},
"html_url": {
"type": "string",
"format": "uri"
},
"followers_url": {
"type": "string",
"format": "uri"
},
"following_url": {
"type": "string"
},
"gists_url": {
"type": "string"
},
"starred_url": {
"type": "string"
},
"subscriptions_url": {
"type": "string",
"format": "uri"
},
"organizations_url": {
"type": "string",
"format": "uri"
},
"repos_url": {
"type": "string",
"format": "uri"
},
"events_url": {
"type": "string"
},
"received_events_url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string"
},
"site_admin": {
"type": "boolean"
},
"starred_at": {
"type": "string"
},
"user_view_type": {
"type": "string"
}
},
"required": [
"avatar_url",
"events_url",
"followers_url",
"following_url",
"gists_url",
"gravatar_id",
"html_url",
"id",
"node_id",
"login",
"organizations_url",
"received_events_url",
"repos_url",
"site_admin",
"starred_url",
"subscriptions_url",
"type",
"url"
]
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/github-codespace"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.