Repos

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.

basehttps://app.nz
GET/api/reposList your reposAPI keyPOST/api/reposCreate a repo (name, description, visibility, org)API keyGET/api/repos/explorePublic repos for the showcase grid (?kind=code|dataset|model&sort=stars|recent)publicGET/api/repos/searchSearch public repos by name/description (?q=)publicGET/api/repos/lookup/{owner}/{name}Resolve owner/name to a repo (for pretty URLs)publicGET/api/repos/{id}Repo detail — issues, pulls, branches, recent commitspublicPATCH/api/repos/{id}Edit name, description, visibility, defaultBranch, imageUrlAPI keyDELETE/api/repos/{id}Archive (soft-delete) a repoAPI keyPOST/api/repos/{id}/forkFork into your namespace (real bare-git clone, full history)API keyGET/api/repos/{id}/starViewer’s star state and total countpublicPUT/api/repos/{id}/starStar the repoAPI keyDELETE/api/repos/{id}/starUnstar the repoAPI keyGET/api/repos/{id}/git/branchesList branchespublicGET/api/repos/{id}/git/treeDirectory listing (?ref=&path=&withCommits=1)publicGET/api/repos/{id}/git/pathsFlat file-path list for a fuzzy finder (?ref=)publicGET/api/repos/{id}/git/blobFile content, size, language, latest commit (?ref=&path=)publicGET/api/repos/{id}/git/rawRaw file bytes with a sniffed content-type (?ref=&path=)publicGET/api/repos/{id}/git/logCommit history (?ref=&path=&limit=)publicGET/api/repos/{id}/git/commit/{sha}Commit metadata plus its file diffpublicGET/api/repos/{id}/git/diffDiff and commit range between two refs (?base=&head=)publicGET/api/repos/{id}/git/readmeRendered README lookup for a ref/pathpublicGET/api/repos/{id}/git/searchCode search — semantic by default, ?mode=keyword for git grep (?q=&limit=)publicPOST/api/repos/{id}/branchesCreate a branch (name, from)API keyPOST/api/repos/{id}/commitsRecord a commit entry (branch, message) — bookkeeping only, not a real git commitAPI keyGET/api/repos/{id}/issuesList issues (?state=open|closed|all)publicGET/api/repos/{id}/issues/{number}Issue detail with its comment threadpublicPOST/api/repos/{id}/issuesOpen an issue (title, body)API keyPATCH/api/repos/{id}/issues/{number}Set state (state: open|closed)API keyPOST/api/repos/{id}/issues/{number}/commentsComment on an issue (body)API keyGET/api/repos/{id}/pullsList pull requests (?state=open|closed|all)publicGET/api/repos/{id}/pulls/{number}Pull request detail with its comment threadpublicPOST/api/repos/{id}/pullsOpen a PR (title, body, sourceBranch, targetBranch)API keyPATCH/api/repos/{id}/pulls/{number}Set state (state: open|closed|merged — merged performs a real git fast-forward or merge commit)API keyGET/api/repos/{id}/pulls/{number}/commentsList PR comments, including line-anchored review commentspublicPOST/api/repos/{id}/pulls/{number}/commentsPost a PR comment, optionally anchored to a diff line (body, filePath, lineStart, lineEnd, side)API keyGET/api/repos/{id}/wikiList wiki pagespublicGET/api/repos/{id}/wiki/pages/{slug}Get a wiki pagepublicGET/api/repos/{id}/wiki/pages/{slug}/historyPage history from the wiki git repopublicGET/api/repos/{id}/wiki/searchSearch wiki pages (?q=)publicPUT/api/repos/{id}/wiki/pages/{slug}Create or update a page (title, body, message)API keyDELETE/api/repos/{id}/wiki/pages/{slug}Delete a pageAPI keyGET/api/repos/{id}/releasesList releasespublicGET/api/repos/{id}/releases/{tag}Get one releasepublicPOST/api/repos/{id}/releasesCreate a release (tag, name, body, target, prerelease, draft)API keyPATCH/api/repos/{id}/releases/{tag}Update a releaseAPI keyDELETE/api/repos/{id}/releases/{tag}Delete a releaseAPI keyGET/api/repos/{id}/labelsList labelspublicPOST/api/repos/{id}/labelsCreate a label (name, color, description)API keyDELETE/api/repos/{id}/labels/{name}Delete a labelAPI keyGET/api/repos/{id}/secretsList secret names — values are write-only and never returnedAPI keyPOST/api/repos/{id}/secretsSet a secret (name, value)API keyDELETE/api/repos/{id}/secrets/{name}Delete a secretAPI keyGET/api/repos/{id}/variablesList variables (values are readable)API keyPOST/api/repos/{id}/variablesSet a variable (name, value)API keyDELETE/api/repos/{id}/variables/{name}Delete a variableAPI keyGET/api/repos/{id}/rulesetsList branch-protection rulesetspublicPOST/api/repos/{id}/rulesetsCreate a ruleset (name, targetBranch, requirePr, requireChecks, blockForcePush)API keyDELETE/api/repos/{id}/rulesets/{name}Delete a rulesetAPI key
GEThttps://app.nz/{owner}/{name}.git/info/refsgit clone/pull ref advertisement (git clone https://app.nz/{owner}/{name}.git)public
POSThttps://app.nz/{owner}/{name}.git/git-receive-packgit push — HTTP Basic auth, an API key as the passwordAPI key
Access levels
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 a repo, push real git, open a PR, ask an agent to fix something
# 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"}'