/user/codespacesCreate a codespace for the authenticated user
Creates a codespace owned by the authenticated user for a repository or pull request. Provide either repository_id or pull_request, but not both, and use geo to select a region when needed. A 202 response indicates that creation partially failed and is being retried in the background.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Codespace creation details. Provide either repository_id or pull_request, but not both.
A 401 is returned when the request lacks valid authentication. A 403 is returned when the authenticated user lacks permission, including when an OAuth app token or classic personal access token lacks the codespace scope. A 404 is returned when the specified repository cannot be found, and a 503 indicates that the service is unavailable. Provide either repository_id or pull_request, but not both; pull_request must include pull_request_number and repository_id. geo must be one of EuropeWest, SoutheastAsia, UsEast, or UsWest, and retention_period_minutes must be between 0 and 43200 when provided.