GitHub Builds
Use these endpoints to trigger GitHub builds manually, list history, inspect a specific build, and read incremental pipeline logs.
These logs are different from
GET /project/:id/logs.GET /project/:id/logsreturns logs from the running application; the endpoints below return logs from the GitHub build pipeline.
Trigger a manual build
POST /project/:id/github/deployBody
| Field | Type | Required | Description |
|---|---|---|---|
branch | string | No | Branch used for the build. When omitted, the API uses the branch configured on the project |
commit_sha | string | No | Specific commit used to trigger the build |
Response
{
"status": "success",
"message": "Build triggered successfully",
"data": {
"build_id": "665f1f77bcf86cd799439011"
}
}List project builds
GET /project/:id/github/buildsQuery
| Field | Type | Required | Description |
|---|---|---|---|
page | number | No | Current page. Default 1 |
limit | number | No | Page size. Default 10, maximum 50 |
branch | string | No | Filters by branch |
status | string | No | Filters by pending, building, success, or failed |
Response
{
"status": "success",
"message": "builds listed successfully",
"data": [
{
"id": "665f1f77bcf86cd799439011",
"commit_sha": "abc123def456789012345678901234567890abcd",
"branch": "main",
"status": "success",
"started_at": "2026-06-03T14:10:00.000Z",
"finished_at": "2026-06-03T14:11:09.000Z",
"triggered_by": "manual",
"created_at": "2026-06-03T14:10:00.000Z",
"updated_at": "2026-06-03T14:11:09.000Z"
}
],
"pagination": {
"total": 12,
"page": 1,
"limit": 10
}
}Get a specific build
GET /project/:id/github/builds/:buildIdResponse
{
"status": "success",
"message": "build retrieved successfully",
"data": {
"id": "665f1f77bcf86cd799439011",
"commit_sha": "abc123def456789012345678901234567890abcd",
"branch": "main",
"status": "pending",
"triggered_by": "manual",
"created_at": "2026-06-03T14:10:00.000Z",
"updated_at": "2026-06-03T14:10:00.000Z"
}
}Get incremental build logs
GET /project/:id/github/builds/:buildId/logsQuery
| Field | Type | Required | Description |
|---|---|---|---|
cursor | number | No | Last consumed sequence. Default 0 |
limit | number | No | Maximum number of chunks. Default 200, maximum 500 |
Response
{
"status": "success",
"message": "build logs retrieved successfully",
"data": {
"logs": [
{
"sequence": 1,
"timestamp": "2026-06-03T14:10:01.000Z",
"level": "info",
"step": "build",
"message": "npm ci",
"final": false
}
],
"next_cursor": 1,
"status": "building",
"finished": false,
"truncated": false
}
}Use next_cursor in the next request to fetch only new lines.
How to interpret it
| Field | Description |
|---|---|
logs | Incremental list of public build lines |
next_cursor | Last returned sequence |
status | Current build state |
finished | true when the build ended with success or failed |
truncated | true when the public log was truncated to protect platform stability |
Retention
GitHub build history is retained for up to:
- 30 builds per project
- 30 days of age
Whichever limit comes first removes the oldest records, together with their log chunks.
Polling example
curl -X GET "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/github/builds/665f1f77bcf86cd799439011/logs?cursor=0&limit=200" \
-H "x-api-key: your-api-key" \
-H "x-organization-id: your-organization-id"