Create a GitHub repository.
Always an explicit action, never part of another: creates owner/name on GitHub, private unless private: false, with a README so it has a default branch: with the legacy personal token while it serves, or through the Koidog GitHub App (D89) in an organization whose installation grants administration:write, with a token asking for that permission alone, minted for this one call.
POST/api/v1/github/repos
Scopeconfig
Through the App a personal account, or an organization that has not accepted administration:write, answers 403 missing_permission and nothing is created. The workspace's owner only, signed in (never an API key or a limited CLI sign-in: 403 not_allowed). Recorded on the timeline with who did it. 409 repo_exists when the name is taken; 409 conflict when the workspace's GitHub access changed during the request (the token replaced or removed, or the access that serves changed): nothing is created, try again; 403 missing_permission when the access lacks a permission (the message names it) or, through the App, the account is a personal one; 409 github_access_required, 503 github_unavailable, 429 rate_limited (at most 10 creations an hour per workspace). Answers the new repository. The timeline records the key ID, action and outcome.
Headers.
Idempotency-Keystring
Retry the same request with the same key. Retry rules.
Body.
ownerstringrequired
The account or organization to create it in: one of GET /github/accounts whose canCreate is not no. Matches ^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$.
namestringrequired
The new repository's name, as GitHub allows it: letters, digits, ., - and _. A name already taken in that account is 409 repo_exists. Matches ^[A-Za-z0-9._-]{1,100}$.
privateboolean
Left out or true, only people you give access can see it. false makes it public. Default true.
descriptionstring
GitHub's one-line description of the repository, shown on GitHub. At most 350 characters.
Response.
201 Created · JSON object
- 422 validation_failed
- Each schema error appears in
details.