Repositories
Download a repository archive (zip)
A link to download a branch, tag or commit as a zip archive (the default branch without ref), good for 10 minutes and needing no token.
/repos/{owner}/{name}/zipball/{ref}Over REST, GET …/zipball/{ref} answers 302 with the link in Location, as GitHub does: curl -L follows it. Over MCP the link is returned as url, with commit and expires_at. The archive holds one folder, <owner>-<repo>-<first 7 of the commit>/. Up to 10,000 files and 24 MB; clone a larger repository. Needs the Read role; a public repository’s are open to anyone.
Over REST the answer is 302 Found with the link in Location, as GitHub’s is, so curl -L -o hello.zip …/zipball/v1.2.0 saves the file, with one folder, flagon-io-hello-7c1e9a4/; the body above is what the MCP repository tool’s zipball returns. The link needs no token and stops working after 10 minutes.
- Authentication: Optional. Public data can be read without a token; send one to see what is private.
- MCP tool:
repositorywithactionzipball, and the same inputs - Scope: An access token needs
code:read.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
owner |
string | Yes | The workspace that owns the repository. |
name |
string | Yes | The repository’s name. |
ref |
string | Yes | A branch, tag or commit; the default branch when left out. A branch with slashes is sent URL-encoded as one path segment. |
Example request
Section titled “Example request”curl https://api.g1t.sh/repos/flagon-io/hello/zipball/v1.2.0 \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
{ "url": "https://g1t.sh/flagon-io/hello/archive/7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7.zip?token=…", "commit": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7", "expires_at": "2026-10-12T15:13:00.000Z"}Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 422 | invalid |
The input is not valid. message says which field and why. |