apicheats.dev Cheat sheet Raw .md
POST

Try POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces — GitHub API

GitHub playground

Create a codespace from a pull request

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

10 body fields
  • location · optional · string — The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.
  • geo · optional · string — The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down.
  • client_ip · optional · string — IP for location auto-detection when proxying a request
  • machine · optional · string — Machine type to use for this codespace
  • devcontainer_path · optional · string — Path to devcontainer.json config to use for this codespace
  • multi_repo_permissions_opt_out · optional · boolean — Whether to authorize requested permissions from devcontainer.json
  • working_directory · optional · string — Working directory for this codespace
  • idle_timeout_minutes · optional · integer — Time in minutes before codespace stops from inactivity
  • display_name · optional · string — Display name for this codespace
  • retention_period_minutes · optional · integer — Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).