Skip to content
API reference38587f4 · docs(api): builds

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

Without 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.

Shell
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

GET/v1/organizations/{org}/projects/{project}/applications/{cube}/builds
Read-only key

Returns 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

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

Responses

StatusDescription
200

The builds of the cube, newest first.

BuildList object1 field
dataarray of objectrequired

The builds, newest first.

data items26 fields
idstringrequired

The build's ID: an opaque string that starts with bld_ (dep_ for the oldest builds). Do not take it apart.

revisionstringrequired

What 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_shastringrequired

The exact commit that was built, as 40 hexadecimal characters.

builderstring | nullrequired

How the build was made: dockerfile (a Dockerfile in the cube's app_root folder) or railpack. null until the build has looked for a Dockerfile, and for builds made before Dockerfile support. New values may appear.

portinteger | nullrequired

The port the cube listens on and gets traffic on, which it receives as PORT. It is the cube's port setting, else the one port the image exposes. null means the default, 8080.

frameworkstring | nullrequired

What the builder detected, such as vite, next or astro. A guess: a cube built with React Router can show as vite. null when nothing specific was detected, for Dockerfile builds and for builds made before detection. New values may appear.

staticboolean | nullrequired

true when the image serves files, as a static site does, and false when it runs a server. null for Dockerfile builds and for builds made before detection.

statusstringrequired

The build step's own status: QUEUED, BUILDING, SUCCEEDED, FAILED or CANCELLED. Follow release_status instead, which also covers the deployment that follows the build. New values may appear.

release_statusstringrequired

Where the release is, counting the build and the deployment that follows it. QUEUED is waiting to build and BUILDING is building. BUILT is built without deploying: it can be deployed later. DEPLOYING is built and going live, and DEPLOYED is live at public_url. BUILD_FAILED and DEPLOY_FAILED have an error; after a failed deployment the previous version keeps serving. CANCELLED was cancelled. SUPERSEDED was built, but a newer build was deployed instead. UNKNOWN is a status this API does not describe yet: keep polling.

One of: QUEUED, BUILDING, BUILD_FAILED, CANCELLED, BUILT, DEPLOYING, SUPERSEDED, DEPLOY_FAILED, DEPLOYED, UNKNOWN

terminalbooleanrequired

false while the release is still moving, so keep polling. true once release_status is final.

errorobject

Why the build or the deployment failed. Present when release_status is BUILD_FAILED or DEPLOY_FAILED.

error object2 fields
codestringrequired

A short code for the failure, such as BUILD_NOT_DETECTED, which means there is no Dockerfile and the builder could not tell how to build the cube. Others include WORKFLOW_EXECUTION_FAILED, a build step that failed, such as a compile error: the message names the step. When a build could not start, it is the code of the error that stopped it, such as REVISION_NOT_FOUND. New codes may appear.

messagestringrequired

What went wrong, in words you can show.

image_digeststring

The digest of the image the build made, as sha256: and 64 hexadecimal characters. Present once the image is built.

auto_deploystring

What became of the deployment that follows the build: PENDING (not decided yet), TRIGGERED (a deployment was started), SKIPPED or FAILED. Absent for a build that does not deploy.

reusedbooleanrequired

true only in the answer to a request that asked for reuse and was served by deploying this earlier build again instead of building. deployment_id and deployment are then the new deployment, and release_status, terminal, error and public_url describe it. Follow that deployment: a later read of this build shows it as it was, with reused set to false. false everywhere else.

created_bystring | null

The ID of the user who started the build. For a build started with an API key, the key's owner. null for a build that a push started, and for a build with no recorded origin.

triggerstring | null

What started the build: dashboard (a person, in the dashboard), push (a push to the branch the cube deploys from), api (an API key) or mcp (an AI agent signed in as a person through Cubecen's MCP server). null for a build with no recorded origin.

pushed_bystring | null

The GitHub login that pushed, when trigger is push. null otherwise.

api_keyobject | null

The API key that started the build, when trigger is api. null otherwise. A revoked key keeps its name here.

mcp_clientstring | null

The AI client that started the build for the person, when trigger is mcp, such as claude.ai. null otherwise.

env_versionstring | nullrequired

The version of the environment variables the build ran with: 7 lowercase hexadecimal characters. null for builds made before environment versions, and for builds with no variables.

deployment_idstring

The ID of the deployment that follows the build, once there is one. Absent for a build that does not deploy.

deploymentobject

The deployment that follows the build, once there is one.

deployment object15 fields
idstringrequired

The deployment's ID: an opaque string that starts with dpl_. Do not take it apart.

build_idstringrequired

The ID of the build the deployment runs.

image_digeststring

The digest of the image the deployment runs, as sha256: and 64 hexadecimal characters.

statusstringrequired

The deployment's own status: QUEUED, DEPLOYING, SUCCEEDED, FAILED or CANCELLED. New values may appear.

public_urlstring

The address the cube is served at. Present once the deployment has succeeded.

errorobject

Why the deployment failed. Present when it failed.

error object2 fields
codestringrequired

A short code for the failure, such as BUILD_NOT_DETECTED, which means there is no Dockerfile and the builder could not tell how to build the cube. Others include WORKFLOW_EXECUTION_FAILED, a build step that failed, such as a compile error: the message names the step. When a build could not start, it is the code of the error that stopped it, such as REVISION_NOT_FOUND. New codes may appear.

messagestringrequired

What went wrong, in words you can show.

created_bystring | null

The ID of the user who started the deployment. For a deployment that follows a build, the build's. null when a push started it, and when its origin is not recorded.

triggerstring | null

What started the deployment: dashboard, push, api or mcp, as on a build. null when its origin is not recorded.

pushed_bystring | null

The GitHub login that pushed, when trigger is push. null otherwise.

api_keyobject | null

The API key that started the deployment, when trigger is api. null otherwise. A revoked key keeps its name here.

mcp_clientstring | null

The AI client that started the deployment for the person, when trigger is mcp, such as claude.ai. null otherwise.

env_versionstring | nullrequired

The version of the environment variables the deployment runs with: 7 lowercase hexadecimal characters. null for deployments made before environment versions, and for deployments with no variables.

created_atstringrequired

When the deployment was created.

started_atstring

When the deployment started. Absent while it waits in the queue.

finished_atstring

When the deployment finished. Absent until then.

public_urlstring

The address the cube is served at. Present once release_status is DEPLOYED.

created_atstringrequired

When the build was created.

started_atstring

When the build started running. Absent while it waits in the queue.

finished_atstring

When 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 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

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

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/builds" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "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"
    }
  ]
}

Start a build

POST/v1/organizations/{org}/projects/{project}/applications/{cube}/builds

Builds 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:

  • 409 BUILD_IN_PROGRESS: a build of this commit is already queued or running.
  • 409 DEPLOYMENT_IN_PROGRESS: the request deploys, and a build of this commit is still being deployed.
  • 409 APPLICATION_NOT_READY: the cube is not active. A cube is active once its creation has finished, so this answer means its state is creating or failed.
  • 402 PLAN_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

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

Body

NameTypeDescription
revisionstring

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.

deployboolean

true builds and deploys. false builds only. false when left out.

reuseboolean

Only with deploy set to true. Lets a deploy use an earlier build of the same commit instead of building again, when nothing the build depends on has changed. With deploy set to false it is refused with 400, and error.field is reuse. false when left out.

Responses

StatusDescription
202

The build was accepted. It is usually QUEUED; follow it until terminal is true. With reuse, the answer can be an earlier build that is deployed again.

Build object26 fields
idstringrequired

The build's ID: an opaque string that starts with bld_ (dep_ for the oldest builds). Do not take it apart.

revisionstringrequired

What 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_shastringrequired

The exact commit that was built, as 40 hexadecimal characters.

builderstring | nullrequired

How the build was made: dockerfile (a Dockerfile in the cube's app_root folder) or railpack. null until the build has looked for a Dockerfile, and for builds made before Dockerfile support. New values may appear.

portinteger | nullrequired

The port the cube listens on and gets traffic on, which it receives as PORT. It is the cube's port setting, else the one port the image exposes. null means the default, 8080.

frameworkstring | nullrequired

What the builder detected, such as vite, next or astro. A guess: a cube built with React Router can show as vite. null when nothing specific was detected, for Dockerfile builds and for builds made before detection. New values may appear.

staticboolean | nullrequired

true when the image serves files, as a static site does, and false when it runs a server. null for Dockerfile builds and for builds made before detection.

statusstringrequired

The build step's own status: QUEUED, BUILDING, SUCCEEDED, FAILED or CANCELLED. Follow release_status instead, which also covers the deployment that follows the build. New values may appear.

release_statusstringrequired

Where the release is, counting the build and the deployment that follows it. QUEUED is waiting to build and BUILDING is building. BUILT is built without deploying: it can be deployed later. DEPLOYING is built and going live, and DEPLOYED is live at public_url. BUILD_FAILED and DEPLOY_FAILED have an error; after a failed deployment the previous version keeps serving. CANCELLED was cancelled. SUPERSEDED was built, but a newer build was deployed instead. UNKNOWN is a status this API does not describe yet: keep polling.

One of: QUEUED, BUILDING, BUILD_FAILED, CANCELLED, BUILT, DEPLOYING, SUPERSEDED, DEPLOY_FAILED, DEPLOYED, UNKNOWN

terminalbooleanrequired

false while the release is still moving, so keep polling. true once release_status is final.

errorobject

Why the build or the deployment failed. Present when release_status is BUILD_FAILED or DEPLOY_FAILED.

error object2 fields
codestringrequired

A short code for the failure, such as BUILD_NOT_DETECTED, which means there is no Dockerfile and the builder could not tell how to build the cube. Others include WORKFLOW_EXECUTION_FAILED, a build step that failed, such as a compile error: the message names the step. When a build could not start, it is the code of the error that stopped it, such as REVISION_NOT_FOUND. New codes may appear.

messagestringrequired

What went wrong, in words you can show.

image_digeststring

The digest of the image the build made, as sha256: and 64 hexadecimal characters. Present once the image is built.

auto_deploystring

What became of the deployment that follows the build: PENDING (not decided yet), TRIGGERED (a deployment was started), SKIPPED or FAILED. Absent for a build that does not deploy.

reusedbooleanrequired

true only in the answer to a request that asked for reuse and was served by deploying this earlier build again instead of building. deployment_id and deployment are then the new deployment, and release_status, terminal, error and public_url describe it. Follow that deployment: a later read of this build shows it as it was, with reused set to false. false everywhere else.

created_bystring | null

The ID of the user who started the build. For a build started with an API key, the key's owner. null for a build that a push started, and for a build with no recorded origin.

triggerstring | null

What started the build: dashboard (a person, in the dashboard), push (a push to the branch the cube deploys from), api (an API key) or mcp (an AI agent signed in as a person through Cubecen's MCP server). null for a build with no recorded origin.

pushed_bystring | null

The GitHub login that pushed, when trigger is push. null otherwise.

api_keyobject | null

The API key that started the build, when trigger is api. null otherwise. A revoked key keeps its name here.

mcp_clientstring | null

The AI client that started the build for the person, when trigger is mcp, such as claude.ai. null otherwise.

env_versionstring | nullrequired

The version of the environment variables the build ran with: 7 lowercase hexadecimal characters. null for builds made before environment versions, and for builds with no variables.

deployment_idstring

The ID of the deployment that follows the build, once there is one. Absent for a build that does not deploy.

deploymentobject

The deployment that follows the build, once there is one.

deployment object15 fields
idstringrequired

The deployment's ID: an opaque string that starts with dpl_. Do not take it apart.

build_idstringrequired

The ID of the build the deployment runs.

image_digeststring

The digest of the image the deployment runs, as sha256: and 64 hexadecimal characters.

statusstringrequired

The deployment's own status: QUEUED, DEPLOYING, SUCCEEDED, FAILED or CANCELLED. New values may appear.

public_urlstring

The address the cube is served at. Present once the deployment has succeeded.

errorobject

Why the deployment failed. Present when it failed.

error object2 fields
codestringrequired

A short code for the failure, such as BUILD_NOT_DETECTED, which means there is no Dockerfile and the builder could not tell how to build the cube. Others include WORKFLOW_EXECUTION_FAILED, a build step that failed, such as a compile error: the message names the step. When a build could not start, it is the code of the error that stopped it, such as REVISION_NOT_FOUND. New codes may appear.

messagestringrequired

What went wrong, in words you can show.

created_bystring | null

The ID of the user who started the deployment. For a deployment that follows a build, the build's. null when a push started it, and when its origin is not recorded.

triggerstring | null

What started the deployment: dashboard, push, api or mcp, as on a build. null when its origin is not recorded.

pushed_bystring | null

The GitHub login that pushed, when trigger is push. null otherwise.

api_keyobject | null

The API key that started the deployment, when trigger is api. null otherwise. A revoked key keeps its name here.

mcp_clientstring | null

The AI client that started the deployment for the person, when trigger is mcp, such as claude.ai. null otherwise.

env_versionstring | nullrequired

The version of the environment variables the deployment runs with: 7 lowercase hexadecimal characters. null for deployments made before environment versions, and for deployments with no variables.

created_atstringrequired

When the deployment was created.

started_atstring

When the deployment started. Absent while it waits in the queue.

finished_atstring

When the deployment finished. Absent until then.

public_urlstring

The address the cube is served at. Present once release_status is DEPLOYED.

created_atstringrequired

When the build was created.

started_atstring

When the build started running. Absent while it waits in the queue.

finished_atstring

When the build finished. Absent until then.

400

The request is not valid. error.field names the field to blame, when there is one.

401

The API key is missing, unknown, expired or revoked.

402

The organization's plan does not allow this. error.limit, error.max, error.used and error.plan say which limit.

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 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

409

The request conflicts with the current state of the resource. error.code says how.

413

The request body is larger than 1 MiB.

415

The request body must be JSON. Send Content-Type: application/json.

422

The request is well formed but cannot be carried out. error.code says why.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

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

Shell
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}'
Response
{
  "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"
}

Get a build

GET/v1/organizations/{org}/projects/{project}/applications/{cube}/builds/{build-id}
Read-only key

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

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

build-idrequiredstring

The ID of the build: the id you got when you started it. An opaque string that starts with bld_ (dep_ for the oldest builds). A build of another cube is not found.

Responses

StatusDescription
200

The build and the state of its release.

Build object26 fields
idstringrequired

The build's ID: an opaque string that starts with bld_ (dep_ for the oldest builds). Do not take it apart.

revisionstringrequired

What 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_shastringrequired

The exact commit that was built, as 40 hexadecimal characters.

builderstring | nullrequired

How the build was made: dockerfile (a Dockerfile in the cube's app_root folder) or railpack. null until the build has looked for a Dockerfile, and for builds made before Dockerfile support. New values may appear.

portinteger | nullrequired

The port the cube listens on and gets traffic on, which it receives as PORT. It is the cube's port setting, else the one port the image exposes. null means the default, 8080.

frameworkstring | nullrequired

What the builder detected, such as vite, next or astro. A guess: a cube built with React Router can show as vite. null when nothing specific was detected, for Dockerfile builds and for builds made before detection. New values may appear.

staticboolean | nullrequired

true when the image serves files, as a static site does, and false when it runs a server. null for Dockerfile builds and for builds made before detection.

statusstringrequired

The build step's own status: QUEUED, BUILDING, SUCCEEDED, FAILED or CANCELLED. Follow release_status instead, which also covers the deployment that follows the build. New values may appear.

release_statusstringrequired

Where the release is, counting the build and the deployment that follows it. QUEUED is waiting to build and BUILDING is building. BUILT is built without deploying: it can be deployed later. DEPLOYING is built and going live, and DEPLOYED is live at public_url. BUILD_FAILED and DEPLOY_FAILED have an error; after a failed deployment the previous version keeps serving. CANCELLED was cancelled. SUPERSEDED was built, but a newer build was deployed instead. UNKNOWN is a status this API does not describe yet: keep polling.

One of: QUEUED, BUILDING, BUILD_FAILED, CANCELLED, BUILT, DEPLOYING, SUPERSEDED, DEPLOY_FAILED, DEPLOYED, UNKNOWN

terminalbooleanrequired

false while the release is still moving, so keep polling. true once release_status is final.

errorobject

Why the build or the deployment failed. Present when release_status is BUILD_FAILED or DEPLOY_FAILED.

error object2 fields
codestringrequired

A short code for the failure, such as BUILD_NOT_DETECTED, which means there is no Dockerfile and the builder could not tell how to build the cube. Others include WORKFLOW_EXECUTION_FAILED, a build step that failed, such as a compile error: the message names the step. When a build could not start, it is the code of the error that stopped it, such as REVISION_NOT_FOUND. New codes may appear.

messagestringrequired

What went wrong, in words you can show.

image_digeststring

The digest of the image the build made, as sha256: and 64 hexadecimal characters. Present once the image is built.

auto_deploystring

What became of the deployment that follows the build: PENDING (not decided yet), TRIGGERED (a deployment was started), SKIPPED or FAILED. Absent for a build that does not deploy.

reusedbooleanrequired

true only in the answer to a request that asked for reuse and was served by deploying this earlier build again instead of building. deployment_id and deployment are then the new deployment, and release_status, terminal, error and public_url describe it. Follow that deployment: a later read of this build shows it as it was, with reused set to false. false everywhere else.

created_bystring | null

The ID of the user who started the build. For a build started with an API key, the key's owner. null for a build that a push started, and for a build with no recorded origin.

triggerstring | null

What started the build: dashboard (a person, in the dashboard), push (a push to the branch the cube deploys from), api (an API key) or mcp (an AI agent signed in as a person through Cubecen's MCP server). null for a build with no recorded origin.

pushed_bystring | null

The GitHub login that pushed, when trigger is push. null otherwise.

api_keyobject | null

The API key that started the build, when trigger is api. null otherwise. A revoked key keeps its name here.

mcp_clientstring | null

The AI client that started the build for the person, when trigger is mcp, such as claude.ai. null otherwise.

env_versionstring | nullrequired

The version of the environment variables the build ran with: 7 lowercase hexadecimal characters. null for builds made before environment versions, and for builds with no variables.

deployment_idstring

The ID of the deployment that follows the build, once there is one. Absent for a build that does not deploy.

deploymentobject

The deployment that follows the build, once there is one.

deployment object15 fields
idstringrequired

The deployment's ID: an opaque string that starts with dpl_. Do not take it apart.

build_idstringrequired

The ID of the build the deployment runs.

image_digeststring

The digest of the image the deployment runs, as sha256: and 64 hexadecimal characters.

statusstringrequired

The deployment's own status: QUEUED, DEPLOYING, SUCCEEDED, FAILED or CANCELLED. New values may appear.

public_urlstring

The address the cube is served at. Present once the deployment has succeeded.

errorobject

Why the deployment failed. Present when it failed.

error object2 fields
codestringrequired

A short code for the failure, such as BUILD_NOT_DETECTED, which means there is no Dockerfile and the builder could not tell how to build the cube. Others include WORKFLOW_EXECUTION_FAILED, a build step that failed, such as a compile error: the message names the step. When a build could not start, it is the code of the error that stopped it, such as REVISION_NOT_FOUND. New codes may appear.

messagestringrequired

What went wrong, in words you can show.

created_bystring | null

The ID of the user who started the deployment. For a deployment that follows a build, the build's. null when a push started it, and when its origin is not recorded.

triggerstring | null

What started the deployment: dashboard, push, api or mcp, as on a build. null when its origin is not recorded.

pushed_bystring | null

The GitHub login that pushed, when trigger is push. null otherwise.

api_keyobject | null

The API key that started the deployment, when trigger is api. null otherwise. A revoked key keeps its name here.

mcp_clientstring | null

The AI client that started the deployment for the person, when trigger is mcp, such as claude.ai. null otherwise.

env_versionstring | nullrequired

The version of the environment variables the deployment runs with: 7 lowercase hexadecimal characters. null for deployments made before environment versions, and for deployments with no variables.

created_atstringrequired

When the deployment was created.

started_atstring

When the deployment started. Absent while it waits in the queue.

finished_atstring

When the deployment finished. Absent until then.

public_urlstring

The address the cube is served at. Present once release_status is DEPLOYED.

created_atstringrequired

When the build was created.

started_atstring

When the build started running. Absent while it waits in the queue.

finished_atstring

When 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 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

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

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/builds/<build-id>" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "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"
}

Cancel a build

POST/v1/organizations/{org}/projects/{project}/applications/{cube}/builds/{build-id}/cancel

Asks 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

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

build-idrequiredstring

The ID of the build: the id you got when you started it. An opaque string that starts with bld_ (dep_ for the oldest builds). A build of another cube is not found.

Responses

StatusDescription
200

The build as it is now. It can still be running: cancelling is not instant.

Build object26 fields
idstringrequired

The build's ID: an opaque string that starts with bld_ (dep_ for the oldest builds). Do not take it apart.

revisionstringrequired

What 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_shastringrequired

The exact commit that was built, as 40 hexadecimal characters.

builderstring | nullrequired

How the build was made: dockerfile (a Dockerfile in the cube's app_root folder) or railpack. null until the build has looked for a Dockerfile, and for builds made before Dockerfile support. New values may appear.

portinteger | nullrequired

The port the cube listens on and gets traffic on, which it receives as PORT. It is the cube's port setting, else the one port the image exposes. null means the default, 8080.

frameworkstring | nullrequired

What the builder detected, such as vite, next or astro. A guess: a cube built with React Router can show as vite. null when nothing specific was detected, for Dockerfile builds and for builds made before detection. New values may appear.

staticboolean | nullrequired

true when the image serves files, as a static site does, and false when it runs a server. null for Dockerfile builds and for builds made before detection.

statusstringrequired

The build step's own status: QUEUED, BUILDING, SUCCEEDED, FAILED or CANCELLED. Follow release_status instead, which also covers the deployment that follows the build. New values may appear.

release_statusstringrequired

Where the release is, counting the build and the deployment that follows it. QUEUED is waiting to build and BUILDING is building. BUILT is built without deploying: it can be deployed later. DEPLOYING is built and going live, and DEPLOYED is live at public_url. BUILD_FAILED and DEPLOY_FAILED have an error; after a failed deployment the previous version keeps serving. CANCELLED was cancelled. SUPERSEDED was built, but a newer build was deployed instead. UNKNOWN is a status this API does not describe yet: keep polling.

One of: QUEUED, BUILDING, BUILD_FAILED, CANCELLED, BUILT, DEPLOYING, SUPERSEDED, DEPLOY_FAILED, DEPLOYED, UNKNOWN

terminalbooleanrequired

false while the release is still moving, so keep polling. true once release_status is final.

errorobject

Why the build or the deployment failed. Present when release_status is BUILD_FAILED or DEPLOY_FAILED.

error object2 fields
codestringrequired

A short code for the failure, such as BUILD_NOT_DETECTED, which means there is no Dockerfile and the builder could not tell how to build the cube. Others include WORKFLOW_EXECUTION_FAILED, a build step that failed, such as a compile error: the message names the step. When a build could not start, it is the code of the error that stopped it, such as REVISION_NOT_FOUND. New codes may appear.

messagestringrequired

What went wrong, in words you can show.

image_digeststring

The digest of the image the build made, as sha256: and 64 hexadecimal characters. Present once the image is built.

auto_deploystring

What became of the deployment that follows the build: PENDING (not decided yet), TRIGGERED (a deployment was started), SKIPPED or FAILED. Absent for a build that does not deploy.

reusedbooleanrequired

true only in the answer to a request that asked for reuse and was served by deploying this earlier build again instead of building. deployment_id and deployment are then the new deployment, and release_status, terminal, error and public_url describe it. Follow that deployment: a later read of this build shows it as it was, with reused set to false. false everywhere else.

created_bystring | null

The ID of the user who started the build. For a build started with an API key, the key's owner. null for a build that a push started, and for a build with no recorded origin.

triggerstring | null

What started the build: dashboard (a person, in the dashboard), push (a push to the branch the cube deploys from), api (an API key) or mcp (an AI agent signed in as a person through Cubecen's MCP server). null for a build with no recorded origin.

pushed_bystring | null

The GitHub login that pushed, when trigger is push. null otherwise.

api_keyobject | null

The API key that started the build, when trigger is api. null otherwise. A revoked key keeps its name here.

mcp_clientstring | null

The AI client that started the build for the person, when trigger is mcp, such as claude.ai. null otherwise.

env_versionstring | nullrequired

The version of the environment variables the build ran with: 7 lowercase hexadecimal characters. null for builds made before environment versions, and for builds with no variables.

deployment_idstring

The ID of the deployment that follows the build, once there is one. Absent for a build that does not deploy.

deploymentobject

The deployment that follows the build, once there is one.

deployment object15 fields
idstringrequired

The deployment's ID: an opaque string that starts with dpl_. Do not take it apart.

build_idstringrequired

The ID of the build the deployment runs.

image_digeststring

The digest of the image the deployment runs, as sha256: and 64 hexadecimal characters.

statusstringrequired

The deployment's own status: QUEUED, DEPLOYING, SUCCEEDED, FAILED or CANCELLED. New values may appear.

public_urlstring

The address the cube is served at. Present once the deployment has succeeded.

errorobject

Why the deployment failed. Present when it failed.

error object2 fields
codestringrequired

A short code for the failure, such as BUILD_NOT_DETECTED, which means there is no Dockerfile and the builder could not tell how to build the cube. Others include WORKFLOW_EXECUTION_FAILED, a build step that failed, such as a compile error: the message names the step. When a build could not start, it is the code of the error that stopped it, such as REVISION_NOT_FOUND. New codes may appear.

messagestringrequired

What went wrong, in words you can show.

created_bystring | null

The ID of the user who started the deployment. For a deployment that follows a build, the build's. null when a push started it, and when its origin is not recorded.

triggerstring | null

What started the deployment: dashboard, push, api or mcp, as on a build. null when its origin is not recorded.

pushed_bystring | null

The GitHub login that pushed, when trigger is push. null otherwise.

api_keyobject | null

The API key that started the deployment, when trigger is api. null otherwise. A revoked key keeps its name here.

mcp_clientstring | null

The AI client that started the deployment for the person, when trigger is mcp, such as claude.ai. null otherwise.

env_versionstring | nullrequired

The version of the environment variables the deployment runs with: 7 lowercase hexadecimal characters. null for deployments made before environment versions, and for deployments with no variables.

created_atstringrequired

When the deployment was created.

started_atstring

When the deployment started. Absent while it waits in the queue.

finished_atstring

When the deployment finished. Absent until then.

public_urlstring

The address the cube is served at. Present once release_status is DEPLOYED.

created_atstringrequired

When the build was created.

started_atstring

When the build started running. Absent while it waits in the queue.

finished_atstring

When 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 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

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

Shell
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)"
Response
{
  "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"
}