This guide documents the complete API lifecycle: health checks, OAuth, JWT generation, build start, publish, status polling, and artifact retrieval. It is intended for API clients and CI integrations.
BASE_URL (or http://localhost:4000 locally)application/jsonGET /status
GET /version
Minimal request example:
{
"projectName": "my-project",
"target": "www",
"recipe": {
"unit": "layout1",
"description": "My project",
"inventory": {},
"environment": {}
}
}
Rules:
projectName must be slug format (^[a-z0-9-]+$).target must be www, ios, or android.recipe is required and must be an object.license is always set by the agent to FREE.branch is set by the agent from build-info.json (or GITHUB_APP_BRANCH, or local).gqlSchemaMinVersion can be provided; otherwise defaults to 1.platforms (optional) is an array of targets; the agent always ensures target is included.GET /auth/github/start
The response includes a redirectUrl to GitHub.
GitHub redirects the user to:
GET /auth/github/callback?code=...&state=...
After processing, the agent redirects to:
/auth/success.html?session=<SESSION_ID>
GET /auth/session/<SESSION_ID>
POST /auth/create-repo
Content-Type: application/json
{
"sessionId": "SESSION_ID",
"owner": "org-or-user",
"name": "new-repo",
"private": false
}
POST /auth/generate-jwt
Content-Type: application/json
{
"sessionId": "SESSION_ID",
"repo": "owner/repo",
"branch": "main",
"path": "dist"
}
The response includes jwt. Pass it to /process as githubJwt.
Endpoint:
POST /process
Content-Type: application/json
Example (no GitHub):
{
"projectName": "my-project",
"target": "www",
"gqlSchemaMinVersion": 1,
"recipe": {
"unit": "layout1",
"inventory": {},
"environment": {}
}
}
Example (GitHub + Auto-CI):
{
"projectName": "my-project",
"target": "android",
"gqlSchemaMinVersion": 1,
"githubJwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"autoCi": {
"enabled": true,
"workflows": {
"androidApk": true
}
},
"recipe": {
"unit": "layout1",
"inventory": {},
"environment": {}
}
}
Response example:
{
"dataHash": "abc123...",
"downloadUrl": "/dist/abc123/my-project-1.tar",
"status": "in_progress",
"publish": {
"archive": { "status": "pending" },
"github": { "status": "pending" }
}
}
dataHash is a deterministic hash of the normalized request and is used for status polling.
GET /build-status/<DATA_HASH>
Common status values:
queuedin_progressbuild_donepublish_doneerrorcanceledResponses may include logs, errors, queue position, and publish details.
POST /build-status/<DATA_HASH>/cancel
Cancels queued or running builds.
The download URL is returned as downloadUrl or publish.archive.url.
Example:
GET /dist/<DATA_HASH>/my-project-1.tar
For ios/android, the URL includes the target:
GET /dist/<DATA_HASH>/<target>/my-project-1.tar
githubJwt provided)Once publish completes, publish.github contains:
{
"status": "done",
"repo": "owner/repo",
"branch": "main",
"path": "dist",
"commit": "abc123..."
}
GET /ci/workflows?target=android&publish=github
List all Auto-CI workflows
GET /ci/workflows to get supportedTargets.GET /ci/workflows?target=<target>&publish=github.Example:
GET /ci/workflows
GET /ci/workflows?target=android&publish=github
GET /ci/workflows?target=ios&publish=github
GET /ci/workflows?target=www&publish=github
GET /ci/docs/androidApk
GET /ci/docs/androidApk?format=markdown
GET /statusGET /auth/github/startGET /auth/github/callbackGET /auth/session/:idPOST /auth/create-repo (if needed)POST /auth/generate-jwtPOST /processGET /build-status/:dataHash (poll until done)GET /dist/... (download)publish.github if GitHub is enabledHTML:
GET /docs/API_FULL_CYCLE
Markdown:
GET /docs/API_FULL_CYCLE?format=markdown