/api/repos/{id}
Repo detail — issues, pulls, branches, recent commits
curl -s "https://app.nz/api/repos/{id}"Repos API — git & GitHub parity
GitHub-parity repo hosting on real bare git repositories: clone and push over standard git smart HTTP (git clone https://app.nz/{owner}/{name}.git), plus issues, pull requests with inline line-anchored review comments, a git-backed wiki, releases, labels, Actions-style secrets/variables, and branch-protection rulesets. Read endpoints (repo detail, git browsing, issues/pulls/releases/labels/rulesets, wiki) work with no key at all for public repos — the same code path renders the showcase browser for signed-out visitors — and need a key with read access (owner or a team member) for private ones. Everything that mutates state needs a key with write access, except fork and star, which only need any signed-in reader. Mentioning @agent (or @codex, @claude, @bot, /agent, /fix, /review) in a pull-request comment launches a coding agent on that PR's branch and posts a bot reply linking the task.
readlevelAnyone, for public repos; owner + team viewers for private ones. Covers repo detail, git browsing, issues/pulls/releases/labels/rulesets, and wiki reads.writelevelOwner, global admins, or a team member/admin on the repo’s governing org. Required for branches, commits, issues, pulls, wiki writes, labels, secrets, variables, rulesets, releases.fork / starlevelAny signed-in reader — no write access required.adminlevelOwner or global admin. Required to edit or delete the repo itself.# Create the repo (private by default)
curl -sX POST https://app.nz/api/repos \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"my-app","description":"demo","visibility":"public"}'
# -> {"repo":{"id":"repo_...","fullName":"you/my-app",...}}
# Real git — clone/push over smart HTTP, an API key as the Basic-auth password
git clone https://app.nz/you/my-app.git
cd my-app && git checkout -b feature/x && git commit --allow-empty -m x
git push https://token:[email protected]/you/my-app.git feature/x
# Open a PR against main
curl -sX POST https://app.nz/api/repos/repo_.../pulls \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"title":"Add feature x","sourceBranch":"feature/x","targetBranch":"main"}'
# @mention an agent on the PR thread — it launches on the PR branch and replies
curl -sX POST https://app.nz/api/repos/repo_.../pulls/1/comments \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"body":"@agent add input validation and a test for the empty case"}'/api/reposList your reposPOST/api/reposCreate a repo (name, description, visibility, org)GET/api/repos/explorePublic repos for the showcase grid (?kind=code|dataset|model&sort=stars|recent)GET/api/repos/searchSearch public repos by name/description (?q=)GET/api/repos/lookup/{owner}/{name}Resolve owner/name to a repo (for pretty URLs)PATCH/api/repos/{id}Edit name, description, visibility, defaultBranch, imageUrlDELETE/api/repos/{id}Archive (soft-delete) a repoPOST/api/repos/{id}/forkFork into your namespace (real bare-git clone, full history)GET/api/repos/{id}/starViewer’s star state and total countPUT/api/repos/{id}/starStar the repoDELETE/api/repos/{id}/starUnstar the repoGET/api/repos/{id}/git/branchesList branchesGET/api/repos/{id}/git/treeDirectory listing (?ref=&path=&withCommits=1)GET/api/repos/{id}/git/pathsFlat file-path list for a fuzzy finder (?ref=)GET/api/repos/{id}/git/blobFile content, size, language, latest commit (?ref=&path=)GET/api/repos/{id}/git/rawRaw file bytes with a sniffed content-type (?ref=&path=)GET/api/repos/{id}/git/logCommit history (?ref=&path=&limit=)GET/api/repos/{id}/git/commit/{sha}Commit metadata plus its file diffGET/api/repos/{id}/git/diffDiff and commit range between two refs (?base=&head=)GET/api/repos/{id}/git/readmeRendered README lookup for a ref/pathGET/api/repos/{id}/git/searchCode search — semantic by default, ?mode=keyword for git grep (?q=&limit=)POST/api/repos/{id}/branchesCreate a branch (name, from)POST/api/repos/{id}/commitsRecord a commit entry (branch, message) — bookkeeping only, not a real git commitGET/api/repos/{id}/issuesList issues (?state=open|closed|all)GET/api/repos/{id}/issues/{number}Issue detail with its comment threadPOST/api/repos/{id}/issuesOpen an issue (title, body)PATCH/api/repos/{id}/issues/{number}Set state (state: open|closed)POST/api/repos/{id}/issues/{number}/commentsComment on an issue (body)GET/api/repos/{id}/pullsList pull requests (?state=open|closed|all)GET/api/repos/{id}/pulls/{number}Pull request detail with its comment threadPOST/api/repos/{id}/pullsOpen a PR (title, body, sourceBranch, targetBranch)PATCH/api/repos/{id}/pulls/{number}Set state (state: open|closed|merged — merged performs a real git fast-forward or merge commit)GET/api/repos/{id}/pulls/{number}/commentsList PR comments, including line-anchored review commentsPOST/api/repos/{id}/pulls/{number}/commentsPost a PR comment, optionally anchored to a diff line (body, filePath, lineStart, lineEnd, side)GET/api/repos/{id}/wikiList wiki pagesGET/api/repos/{id}/wiki/pages/{slug}Get a wiki pageGET/api/repos/{id}/wiki/pages/{slug}/historyPage history from the wiki git repoGET/api/repos/{id}/wiki/searchSearch wiki pages (?q=)PUT/api/repos/{id}/wiki/pages/{slug}Create or update a page (title, body, message)DELETE/api/repos/{id}/wiki/pages/{slug}Delete a pageGET/api/repos/{id}/releasesList releasesGET/api/repos/{id}/releases/{tag}Get one releasePOST/api/repos/{id}/releasesCreate a release (tag, name, body, target, prerelease, draft)PATCH/api/repos/{id}/releases/{tag}Update a releaseDELETE/api/repos/{id}/releases/{tag}Delete a releaseGET/api/repos/{id}/labelsList labelsPOST/api/repos/{id}/labelsCreate a label (name, color, description)DELETE/api/repos/{id}/labels/{name}Delete a labelGET/api/repos/{id}/secretsList secret names — values are write-only and never returnedPOST/api/repos/{id}/secretsSet a secret (name, value)DELETE/api/repos/{id}/secrets/{name}Delete a secretGET/api/repos/{id}/variablesList variables (values are readable)POST/api/repos/{id}/variablesSet a variable (name, value)DELETE/api/repos/{id}/variables/{name}Delete a variableGET/api/repos/{id}/rulesetsList branch-protection rulesetsPOST/api/repos/{id}/rulesetsCreate a ruleset (name, targetBranch, requirePr, requireChecks, blockForcePush)DELETE/api/repos/{id}/rulesets/{name}Delete a ruleset