Builds
A build turns a commit of your repository into an image Cubecen can run. Start one with "deploy": true to deploy a new version of a cube: when the build succeeds, Cubecen deploys it, and a deployment that fails or is cancelled leaves the version before it serving. Deploying from CI usually takes two calls: start a build, then check it until it's done.
Endpoints
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ buildsPOSTStart a build/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ buildsGETGet a build/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ builds/ {build-id}POSTCancel a build/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ builds/ {build-id}/ cancelWithout deploy, the build only builds, and you can deploy it later. revision takes a branch, a tag or a commit SHA, and without it the build uses the branch the cube deploys from. Starting a build needs an Idempotency-Key, so a retry never starts a second build.
With "reuse": true on a deploy, a commit that's already built, with unchanged build settings and build-time variables, is deployed again without building. The answer is that earlier build, with reused set to true. Follow the new deployment, which deployment_id and the Location header name, not the build.
curl -sS -X POST "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/builds" \
-H "Authorization: Bearer $CUBECEN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"deploy": true}'The answer is 202 with the build and its id. Ask for the build every 3 to 5 seconds until terminal is true. "release_status": "DEPLOYED" means the cube is live at public_url. If the build or the deployment failed, error says why.
List the builds of a cube
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ buildsReturns the builds of a cube, newest first. The list is not paged.
Each build is shown as getBuild shows it, with its release_status and terminal: they say where its release is, counting the deployment that follows the build. A build that only built, without deploying, is BUILT: it can be deployed later with createDeployment. A cube that is still being set up has no builds.
To see builds and deployments together, as the cube's history, use listReleases.
Path parameters
| Name | Type | Description |
|---|---|---|
orgrequired | string | The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with |
projectrequired | string | The ID or slug of the project. A slug is unique within the organization. |
cuberequired | string | The ID or slug of the cube. A slug is unique within the project. |
Responses
| Status | Description |
|---|---|
| 200 | The builds of the cube, newest first. BuildList object1 fielddataarray of objectrequiredThe builds, newest first. data items26 fieldsidstringrequiredThe build's ID: an opaque string that starts with revisionstringrequiredWhat the build was asked to build, as a label: a branch, a tag or a commit SHA. A build started for an exact commit shows the branch or tag that commit was last built from, when there is one. commit_shastringrequiredThe exact commit that was built, as 40 hexadecimal characters. builderstring | nullrequiredHow the build was made: portinteger | nullrequiredThe port the cube listens on and gets traffic on, which it receives as frameworkstring | nullrequiredWhat the builder detected, such as staticboolean | nullrequired
statusstringrequiredThe build step's own status: release_statusstringrequiredWhere the release is, counting the build and the deployment that follows it. One of: terminalbooleanrequired
errorobjectWhy the build or the deployment failed. Present when error object2 fieldscodestringrequiredA short code for the failure, such as messagestringrequiredWhat went wrong, in words you can show. image_digeststringThe digest of the image the build made, as auto_deploystringWhat became of the deployment that follows the build: reusedbooleanrequired
created_bystring | nullThe ID of the user who started the build. For a build started with an API key, the key's owner. triggerstring | nullWhat started the build: pushed_bystring | nullThe GitHub login that pushed, when api_keyobject | nullThe API key that started the build, when mcp_clientstring | nullThe AI client that started the build for the person, when env_versionstring | nullrequiredThe version of the environment variables the build ran with: 7 lowercase hexadecimal characters. deployment_idstringThe ID of the deployment that follows the build, once there is one. Absent for a build that does not deploy. deploymentobjectThe deployment that follows the build, once there is one. deployment object15 fieldsidstringrequiredThe deployment's ID: an opaque string that starts with build_idstringrequiredThe ID of the build the deployment runs. image_digeststringThe digest of the image the deployment runs, as statusstringrequiredThe deployment's own status: public_urlstringThe address the cube is served at. Present once the deployment has succeeded. errorobjectWhy the deployment failed. Present when it failed. error object2 fieldscodestringrequiredA short code for the failure, such as messagestringrequiredWhat went wrong, in words you can show. created_bystring | nullThe ID of the user who started the deployment. For a deployment that follows a build, the build's. triggerstring | nullWhat started the deployment: pushed_bystring | nullThe GitHub login that pushed, when api_keyobject | nullThe API key that started the deployment, when mcp_clientstring | nullThe AI client that started the deployment for the person, when env_versionstring | nullrequiredThe version of the environment variables the deployment runs with: 7 lowercase hexadecimal characters. created_atstringrequiredWhen the deployment was created. started_atstringWhen the deployment started. Absent while it waits in the queue. finished_atstringWhen the deployment finished. Absent until then. public_urlstringThe address the cube is served at. Present once created_atstringrequiredWhen the build was created. started_atstringWhen the build started running. Absent while it waits in the queue. finished_atstringWhen the build finished. Absent until then. |
| 401 | The API key is missing, unknown, expired or revoked. |
| 403 | The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's. |
| 404 | Nothing was found at this address. An organization ID that matches no organization is |
| 429 | The key made too many requests. Wait for the number of seconds in |
| 500 | Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the |
| 503 | The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown. |
Example
curl -sS "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/builds" \
-H "Authorization: Bearer $CUBECEN_API_KEY"{
"data": [
{
"id": "bld_00000003a0fdd794980f85f9c353bf",
"revision": "feature/checkout",
"commit_sha": "b73a5f7f0d6cadd7602fbb6440a9434b4e1c8a90",
"builder": "railpack",
"port": null,
"framework": "next",
"static": false,
"status": "FAILED",
"release_status": "BUILD_FAILED",
"terminal": true,
"error": {
"code": "WORKFLOW_EXECUTION_FAILED",
"message": "The build step failed: the build command exited with status 1"
},
"auto_deploy": "SKIPPED",
"reused": false,
"created_by": null,
"trigger": "push",
"pushed_by": "octocat",
"api_key": null,
"mcp_client": null,
"env_version": "e3a91c2",
"created_at": "2026-10-25T10:31:08Z",
"started_at": "2026-10-25T10:31:12Z",
"finished_at": "2026-10-25T10:32:47Z"
},
{
"id": "bld_00000001a0fdd794980f85f9c353bf",
"revision": "main",
"commit_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
"builder": "railpack",
"port": null,
"framework": "next",
"static": false,
"status": "SUCCEEDED",
"release_status": "DEPLOYED",
"terminal": true,
"image_digest": "sha256:0b7eb1bc3e6480072dddfd667fe6003a3e729aba3f65cdc8ea01be89b01f8e3c",
"auto_deploy": "TRIGGERED",
"reused": false,
"created_by": "c41e7a02-93bd-4d58-b0f6-6a1d2e8f4c73",
"trigger": "api",
"pushed_by": null,
"api_key": {
"id": "7e3b9d14-6a52-4f08-b1c7-2d9a5e8f0b36",
"name": "CI"
},
"mcp_client": null,
"env_version": "e3a91c2",
"deployment_id": "dpl_00000002a0fdd794980f85f9c353bf",
"deployment": {
"id": "dpl_00000002a0fdd794980f85f9c353bf",
"build_id": "bld_00000001a0fdd794980f85f9c353bf",
"image_digest": "sha256:0b7eb1bc3e6480072dddfd667fe6003a3e729aba3f65cdc8ea01be89b01f8e3c",
"status": "SUCCEEDED",
"public_url": "https://web-acme-3f9a2c.cubecen.app",
"created_by": "c41e7a02-93bd-4d58-b0f6-6a1d2e8f4c73",
"trigger": "api",
"pushed_by": null,
"api_key": {
"id": "7e3b9d14-6a52-4f08-b1c7-2d9a5e8f0b36",
"name": "CI"
},
"mcp_client": null,
"env_version": "e3a91c2",
"created_at": "2026-10-25T09:14:03Z",
"started_at": "2026-10-25T09:14:04Z",
"finished_at": "2026-10-25T09:14:31Z"
},
"public_url": "https://web-acme-3f9a2c.cubecen.app",
"created_at": "2026-10-25T09:12:40Z",
"started_at": "2026-10-25T09:12:44Z",
"finished_at": "2026-10-25T09:14:02Z"
}
]
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication required",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests with this API key; try again shortly",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "DATABASE_UNAVAILABLE",
"message": "Database unavailable",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}Start a build
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ buildsBuilds a branch, tag or commit of the cube's repository and, if you ask for it, deploys the result. This is how a CI job deploys a cube. It needs a key with full access.
Send {"deploy": true} to build and deploy. Send {"deploy": false} to build only and deploy the build later. deploy is false when you leave it out, so send true to deploy. revision is a branch, tag or commit SHA. Without it, the build uses the branch the cube deploys from, or the repository's default branch.
The answer is 202 Accepted with the build, usually QUEUED. The Location header gives its path. Follow the build with getBuild until terminal is true.
Send an Idempotency-Key header with a new value for each action. If a request fails on the way, send it again with the same key. You get the first answer, and no second build starts.
Add "reuse": true to a deploy to skip a build that is not needed. Cubecen looks at the three newest successful builds of the same commit that were made since the cube's build settings last changed. It deploys the newest of them that was built with the same values for every variable the build reads. If there is none, it builds as usual.
When a build is reused, the answer is that earlier build, with reused set to true. deployment_id and the Location header name the new deployment. Follow that deployment, not the build. A reused build costs no build minutes. Leave reuse out to build again anyway.
These refusals are worth handling:
409BUILD_IN_PROGRESS: a build of this commit is already queued or running.409DEPLOYMENT_IN_PROGRESS: the request deploys, and a build of this commit is still being deployed.409APPLICATION_NOT_READY: the cube is not active. A cube is active once its creation has finished, so this answer means itsstateiscreatingorfailed.402PLAN_LIMIT_REACHED: the plan has no build minutes left for the period. This happens on a plan that does not bill for more, such as Free. A reused build still works.
BUILD_IN_PROGRESS, DEPLOYMENT_IN_PROGRESS and PLAN_LIMIT_REACHED stick to the Idempotency-Key of the request they refused: to try again, send a new key. After a 409 for a release in progress, wait for that release to finish, or cancel it, first. After a 402, try again when the plan has build minutes again, or change the plan.
Path parameters
| Name | Type | Description |
|---|---|---|
orgrequired | string | The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with |
projectrequired | string | The ID or slug of the project. A slug is unique within the organization. |
cuberequired | string | The ID or slug of the cube. A slug is unique within the project. |
Body
| Name | Type | Description |
|---|---|---|
revision | string | The branch, tag or commit SHA to build. Without it, the build uses the branch the cube deploys from, or the repository's default branch. At most 255 characters. |
deploy | boolean |
|
reuse | boolean | Only with |
Responses
| Status | Description |
|---|---|
| 202 | The build was accepted. It is usually Build object26 fieldsidstringrequiredThe build's ID: an opaque string that starts with revisionstringrequiredWhat the build was asked to build, as a label: a branch, a tag or a commit SHA. A build started for an exact commit shows the branch or tag that commit was last built from, when there is one. commit_shastringrequiredThe exact commit that was built, as 40 hexadecimal characters. builderstring | nullrequiredHow the build was made: portinteger | nullrequiredThe port the cube listens on and gets traffic on, which it receives as frameworkstring | nullrequiredWhat the builder detected, such as staticboolean | nullrequired
statusstringrequiredThe build step's own status: release_statusstringrequiredWhere the release is, counting the build and the deployment that follows it. One of: terminalbooleanrequired
errorobjectWhy the build or the deployment failed. Present when error object2 fieldscodestringrequiredA short code for the failure, such as messagestringrequiredWhat went wrong, in words you can show. image_digeststringThe digest of the image the build made, as auto_deploystringWhat became of the deployment that follows the build: reusedbooleanrequired
created_bystring | nullThe ID of the user who started the build. For a build started with an API key, the key's owner. triggerstring | nullWhat started the build: pushed_bystring | nullThe GitHub login that pushed, when api_keyobject | nullThe API key that started the build, when mcp_clientstring | nullThe AI client that started the build for the person, when env_versionstring | nullrequiredThe version of the environment variables the build ran with: 7 lowercase hexadecimal characters. deployment_idstringThe ID of the deployment that follows the build, once there is one. Absent for a build that does not deploy. deploymentobjectThe deployment that follows the build, once there is one. deployment object15 fieldsidstringrequiredThe deployment's ID: an opaque string that starts with build_idstringrequiredThe ID of the build the deployment runs. image_digeststringThe digest of the image the deployment runs, as statusstringrequiredThe deployment's own status: public_urlstringThe address the cube is served at. Present once the deployment has succeeded. errorobjectWhy the deployment failed. Present when it failed. error object2 fieldscodestringrequiredA short code for the failure, such as messagestringrequiredWhat went wrong, in words you can show. created_bystring | nullThe ID of the user who started the deployment. For a deployment that follows a build, the build's. triggerstring | nullWhat started the deployment: pushed_bystring | nullThe GitHub login that pushed, when api_keyobject | nullThe API key that started the deployment, when mcp_clientstring | nullThe AI client that started the deployment for the person, when env_versionstring | nullrequiredThe version of the environment variables the deployment runs with: 7 lowercase hexadecimal characters. created_atstringrequiredWhen the deployment was created. started_atstringWhen the deployment started. Absent while it waits in the queue. finished_atstringWhen the deployment finished. Absent until then. public_urlstringThe address the cube is served at. Present once created_atstringrequiredWhen the build was created. started_atstringWhen the build started running. Absent while it waits in the queue. finished_atstringWhen the build finished. Absent until then. |
| 400 | The request is not valid. |
| 401 | The API key is missing, unknown, expired or revoked. |
| 402 | The organization's plan does not allow this. |
| 403 | The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's. |
| 404 | Nothing was found at this address. An organization ID that matches no organization is |
| 409 | The request conflicts with the current state of the resource. |
| 413 | The request body is larger than 1 MiB. |
| 415 | The request body must be JSON. Send |
| 422 | The request is well formed but cannot be carried out. |
| 429 | The key made too many requests. Wait for the number of seconds in |
| 500 | Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the |
| 502 | A service Cubecen relies on, such as GitHub, did not answer. Retry the same request with backoff. |
| 503 | The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown. |
Example
curl -sS -X POST "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/builds" \
-H "Authorization: Bearer $CUBECEN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"revision": "main", "deploy": true}'{
"id": "bld_00000001a0fdd794980f85f9c353bf",
"revision": "main",
"commit_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
"builder": null,
"port": null,
"framework": null,
"static": null,
"status": "QUEUED",
"release_status": "QUEUED",
"terminal": false,
"auto_deploy": "PENDING",
"reused": false,
"created_by": "c41e7a02-93bd-4d58-b0f6-6a1d2e8f4c73",
"trigger": "api",
"pushed_by": null,
"api_key": {
"id": "7e3b9d14-6a52-4f08-b1c7-2d9a5e8f0b36",
"name": "CI"
},
"mcp_client": null,
"env_version": "e3a91c2",
"created_at": "2026-10-25T09:12:40Z"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "revision must be a branch, tag or commit SHA",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736",
"field": "revision"
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication required",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "PLAN_LIMIT_REACHED",
"message": "The Free plan's 300 build minutes for this month are used up; builds resume on November 1, or change plans",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736",
"limit": "build_minutes",
"max": 300,
"used": 300,
"plan": "free"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "APPLICATION_NOT_READY",
"message": "The cube is not ready for this operation",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request body is too large",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Content-Type must be application/json",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "REPOSITORY_NOT_ACCESSIBLE",
"message": "The GitHub installation cannot access this repository",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736",
"field": "repository"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests with this API key; try again shortly",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "GITHUB_UNAVAILABLE",
"message": "GitHub is temporarily unavailable; retry the same request",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "GITHUB_RATE_LIMITED",
"message": "GitHub's rate limit was reached. Try again in about a minute",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}Get a build
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ builds/ {build-id}Returns one build of a cube, with the state of its release.
Use it to follow a build that you started with createBuild. Poll it every 3 to 5 seconds until terminal is true.
release_status says where the release is. QUEUED, BUILDING, DEPLOYING and UNKNOWN mean keep polling. DEPLOYED, BUILT, BUILD_FAILED, DEPLOY_FAILED, CANCELLED and SUPERSEDED are final.
Once release_status is DEPLOYED, public_url holds the address of the cube. When the build or the deployment fails, error says why, in words you can show.
If the request that started the build reused an earlier build, its answer named a new deployment. Follow that deployment instead: this endpoint shows the earlier build as it was.
A build of another cube is not found.
Path parameters
| Name | Type | Description |
|---|---|---|
orgrequired | string | The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with |
projectrequired | string | The ID or slug of the project. A slug is unique within the organization. |
cuberequired | string | The ID or slug of the cube. A slug is unique within the project. |
build-idrequired | string | The ID of the build: the |
Responses
| Status | Description |
|---|---|
| 200 | The build and the state of its release. Build object26 fieldsidstringrequiredThe build's ID: an opaque string that starts with revisionstringrequiredWhat the build was asked to build, as a label: a branch, a tag or a commit SHA. A build started for an exact commit shows the branch or tag that commit was last built from, when there is one. commit_shastringrequiredThe exact commit that was built, as 40 hexadecimal characters. builderstring | nullrequiredHow the build was made: portinteger | nullrequiredThe port the cube listens on and gets traffic on, which it receives as frameworkstring | nullrequiredWhat the builder detected, such as staticboolean | nullrequired
statusstringrequiredThe build step's own status: release_statusstringrequiredWhere the release is, counting the build and the deployment that follows it. One of: terminalbooleanrequired
errorobjectWhy the build or the deployment failed. Present when error object2 fieldscodestringrequiredA short code for the failure, such as messagestringrequiredWhat went wrong, in words you can show. image_digeststringThe digest of the image the build made, as auto_deploystringWhat became of the deployment that follows the build: reusedbooleanrequired
created_bystring | nullThe ID of the user who started the build. For a build started with an API key, the key's owner. triggerstring | nullWhat started the build: pushed_bystring | nullThe GitHub login that pushed, when api_keyobject | nullThe API key that started the build, when mcp_clientstring | nullThe AI client that started the build for the person, when env_versionstring | nullrequiredThe version of the environment variables the build ran with: 7 lowercase hexadecimal characters. deployment_idstringThe ID of the deployment that follows the build, once there is one. Absent for a build that does not deploy. deploymentobjectThe deployment that follows the build, once there is one. deployment object15 fieldsidstringrequiredThe deployment's ID: an opaque string that starts with build_idstringrequiredThe ID of the build the deployment runs. image_digeststringThe digest of the image the deployment runs, as statusstringrequiredThe deployment's own status: public_urlstringThe address the cube is served at. Present once the deployment has succeeded. errorobjectWhy the deployment failed. Present when it failed. error object2 fieldscodestringrequiredA short code for the failure, such as messagestringrequiredWhat went wrong, in words you can show. created_bystring | nullThe ID of the user who started the deployment. For a deployment that follows a build, the build's. triggerstring | nullWhat started the deployment: pushed_bystring | nullThe GitHub login that pushed, when api_keyobject | nullThe API key that started the deployment, when mcp_clientstring | nullThe AI client that started the deployment for the person, when env_versionstring | nullrequiredThe version of the environment variables the deployment runs with: 7 lowercase hexadecimal characters. created_atstringrequiredWhen the deployment was created. started_atstringWhen the deployment started. Absent while it waits in the queue. finished_atstringWhen the deployment finished. Absent until then. public_urlstringThe address the cube is served at. Present once created_atstringrequiredWhen the build was created. started_atstringWhen the build started running. Absent while it waits in the queue. finished_atstringWhen the build finished. Absent until then. |
| 401 | The API key is missing, unknown, expired or revoked. |
| 403 | The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's. |
| 404 | Nothing was found at this address. An organization ID that matches no organization is |
| 429 | The key made too many requests. Wait for the number of seconds in |
| 500 | Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the |
| 503 | The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown. |
Example
curl -sS "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/builds/<build-id>" \
-H "Authorization: Bearer $CUBECEN_API_KEY"{
"id": "bld_00000001a0fdd794980f85f9c353bf",
"revision": "main",
"commit_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
"builder": "railpack",
"port": null,
"framework": "next",
"static": false,
"status": "SUCCEEDED",
"release_status": "DEPLOYED",
"terminal": true,
"image_digest": "sha256:0b7eb1bc3e6480072dddfd667fe6003a3e729aba3f65cdc8ea01be89b01f8e3c",
"auto_deploy": "TRIGGERED",
"reused": false,
"created_by": "c41e7a02-93bd-4d58-b0f6-6a1d2e8f4c73",
"trigger": "api",
"pushed_by": null,
"api_key": {
"id": "7e3b9d14-6a52-4f08-b1c7-2d9a5e8f0b36",
"name": "CI"
},
"mcp_client": null,
"env_version": "e3a91c2",
"deployment_id": "dpl_00000002a0fdd794980f85f9c353bf",
"deployment": {
"id": "dpl_00000002a0fdd794980f85f9c353bf",
"build_id": "bld_00000001a0fdd794980f85f9c353bf",
"image_digest": "sha256:0b7eb1bc3e6480072dddfd667fe6003a3e729aba3f65cdc8ea01be89b01f8e3c",
"status": "SUCCEEDED",
"public_url": "https://web-acme-3f9a2c.cubecen.app",
"created_by": "c41e7a02-93bd-4d58-b0f6-6a1d2e8f4c73",
"trigger": "api",
"pushed_by": null,
"api_key": {
"id": "7e3b9d14-6a52-4f08-b1c7-2d9a5e8f0b36",
"name": "CI"
},
"mcp_client": null,
"env_version": "e3a91c2",
"created_at": "2026-10-25T09:14:03Z",
"started_at": "2026-10-25T09:14:04Z",
"finished_at": "2026-10-25T09:14:31Z"
},
"public_url": "https://web-acme-3f9a2c.cubecen.app",
"created_at": "2026-10-25T09:12:40Z",
"started_at": "2026-10-25T09:12:44Z",
"finished_at": "2026-10-25T09:14:02Z"
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication required",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests with this API key; try again shortly",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "DATABASE_UNAVAILABLE",
"message": "Database unavailable",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}Cancel a build
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ builds/ {build-id}/ cancelAsks for a build to be cancelled. It needs a key with full access.
Cancelling is not instant. The answer is the build as it is at that moment, often still QUEUED or BUILDING. Read the build with getBuild until release_status is CANCELLED, or another final status if the build finished first.
Cancelling a build that has finished changes nothing, and the answer is the build as it was. That holds for a build whose deployment is still going on too: this request cancels the build only. To stop a deployment, use cancelDeployment.
In this answer created_by, trigger, pushed_by, api_key and mcp_client are null. getBuild shows who started the build.
Path parameters
| Name | Type | Description |
|---|---|---|
orgrequired | string | The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with |
projectrequired | string | The ID or slug of the project. A slug is unique within the organization. |
cuberequired | string | The ID or slug of the cube. A slug is unique within the project. |
build-idrequired | string | The ID of the build: the |
Responses
| Status | Description |
|---|---|
| 200 | The build as it is now. It can still be running: cancelling is not instant. Build object26 fieldsidstringrequiredThe build's ID: an opaque string that starts with revisionstringrequiredWhat the build was asked to build, as a label: a branch, a tag or a commit SHA. A build started for an exact commit shows the branch or tag that commit was last built from, when there is one. commit_shastringrequiredThe exact commit that was built, as 40 hexadecimal characters. builderstring | nullrequiredHow the build was made: portinteger | nullrequiredThe port the cube listens on and gets traffic on, which it receives as frameworkstring | nullrequiredWhat the builder detected, such as staticboolean | nullrequired
statusstringrequiredThe build step's own status: release_statusstringrequiredWhere the release is, counting the build and the deployment that follows it. One of: terminalbooleanrequired
errorobjectWhy the build or the deployment failed. Present when error object2 fieldscodestringrequiredA short code for the failure, such as messagestringrequiredWhat went wrong, in words you can show. image_digeststringThe digest of the image the build made, as auto_deploystringWhat became of the deployment that follows the build: reusedbooleanrequired
created_bystring | nullThe ID of the user who started the build. For a build started with an API key, the key's owner. triggerstring | nullWhat started the build: pushed_bystring | nullThe GitHub login that pushed, when api_keyobject | nullThe API key that started the build, when mcp_clientstring | nullThe AI client that started the build for the person, when env_versionstring | nullrequiredThe version of the environment variables the build ran with: 7 lowercase hexadecimal characters. deployment_idstringThe ID of the deployment that follows the build, once there is one. Absent for a build that does not deploy. deploymentobjectThe deployment that follows the build, once there is one. deployment object15 fieldsidstringrequiredThe deployment's ID: an opaque string that starts with build_idstringrequiredThe ID of the build the deployment runs. image_digeststringThe digest of the image the deployment runs, as statusstringrequiredThe deployment's own status: public_urlstringThe address the cube is served at. Present once the deployment has succeeded. errorobjectWhy the deployment failed. Present when it failed. error object2 fieldscodestringrequiredA short code for the failure, such as messagestringrequiredWhat went wrong, in words you can show. created_bystring | nullThe ID of the user who started the deployment. For a deployment that follows a build, the build's. triggerstring | nullWhat started the deployment: pushed_bystring | nullThe GitHub login that pushed, when api_keyobject | nullThe API key that started the deployment, when mcp_clientstring | nullThe AI client that started the deployment for the person, when env_versionstring | nullrequiredThe version of the environment variables the deployment runs with: 7 lowercase hexadecimal characters. created_atstringrequiredWhen the deployment was created. started_atstringWhen the deployment started. Absent while it waits in the queue. finished_atstringWhen the deployment finished. Absent until then. public_urlstringThe address the cube is served at. Present once created_atstringrequiredWhen the build was created. started_atstringWhen the build started running. Absent while it waits in the queue. finished_atstringWhen the build finished. Absent until then. |
| 401 | The API key is missing, unknown, expired or revoked. |
| 403 | The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's. |
| 404 | Nothing was found at this address. An organization ID that matches no organization is |
| 429 | The key made too many requests. Wait for the number of seconds in |
| 500 | Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the |
| 503 | The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown. |
Example
curl -sS -X POST "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/builds/<build-id>/cancel" \
-H "Authorization: Bearer $CUBECEN_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"id": "bld_00000004a0fdd794980f85f9c353bf",
"revision": "main",
"commit_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
"builder": "railpack",
"port": null,
"framework": "next",
"static": false,
"status": "BUILDING",
"release_status": "BUILDING",
"terminal": false,
"auto_deploy": "PENDING",
"reused": false,
"created_by": null,
"trigger": null,
"pushed_by": null,
"api_key": null,
"mcp_client": null,
"env_version": "e3a91c2",
"created_at": "2026-10-25T11:20:05Z",
"started_at": "2026-10-25T11:20:09Z"
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication required",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests with this API key; try again shortly",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"error": {
"code": "DATABASE_UNAVAILABLE",
"message": "Database unavailable",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}