Skip to content
API referenced2c4400 · docs(api): deployments

Deployments

A deployment runs a build as the live version of a cube. A build that deploys makes one when it finishes. These endpoints make one without building again: to redeploy the version that is live, or to roll back to an earlier build.

Endpoints

Rolling back usually takes three steps. List the releases to find the build to go back to. Then create a deployment with that build's build_id. Add its env_version to bring back the variables it ran with. Last, read the deployment every 3 to 5 seconds until its status is SUCCEEDED, FAILED or CANCELLED.

Shell
curl -sS -X POST "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/deployments" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"build_id": "<build-id>"}'

While a release of the cube is in progress, a new deployment is refused with 409 DEPLOYMENT_IN_PROGRESS. To roll back at once, cancel the running release first. Only a successful build can be deployed. If a refusal comes after the variables were restored (BUSY or ENV_REFERENCE_BROKEN), the restored version stays the current one: read the variables again before you retry.

List the deployments of a cube

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

Returns the deployments of a cube, newest first. The list is not paged.

A deployment runs a build as the version of the cube that serves traffic. A build that deploys makes one when it finishes, and createDeployment makes one to redeploy or roll back. Both are listed here.

live_deployment_id is the ID of the deployment that serves the cube now: the successful one that finished last. It is null when nothing is live. A cube that is still being set up has no deployments.

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 deployments of the cube, newest first, and the one that is live.

DeploymentList object2 fields
dataarray of objectrequired

The deployments, newest first.

data items15 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.

live_deployment_idstring | nullrequired

The ID of the deployment that serves the cube now, the successful one that finished last. null when nothing is live.

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>/deployments" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "data": [
    {
      "id": "dpl_00000005a0fdd794980f85f9c353bf",
      "build_id": "bld_00000000a0fdd794980f85f9c353bf",
      "image_digest": "sha256:8b0e7153bf7c3706d85c524e440066559a6656c90bd5482a90a29b9fa5ff5180",
      "status": "DEPLOYING",
      "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": "b7d2e49",
      "created_at": "2026-10-25T11:02:10Z",
      "started_at": "2026-10-25T11:02:11Z"
    },
    {
      "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"
    }
  ],
  "live_deployment_id": "dpl_00000002a0fdd794980f85f9c353bf"
}

Deploy a build again or roll back

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

Deploys a build that has already succeeded, without building it again. Use it to redeploy the version that is live, or to roll back to an earlier one. It needs a key with full access.

Send {"build_id": "bld_..."} to deploy that build. It must be a successful build of this cube: a build that is queued, running, failed or cancelled is refused with 409 BUILD_NOT_DEPLOYABLE. A build that you started with "deploy": false can be deployed this way. Send {} to deploy the cube's latest successful build.

The answer is 202 Accepted with the deployment, usually QUEUED. The Location header gives its path. Follow it with getDeployment until status is SUCCEEDED, FAILED or CANCELLED. A deployment that fails or is cancelled leaves the previous version serving.

To roll back with the variables that an earlier release ran with, add env_version: the env_version of that release, as listReleases and getRelease show it. Cubecen first makes those variables the current ones again, as a new version, unless the current ones already hold the same values, and then deploys with them. Old secret values come back too: a secret that you changed since returns to its old value. Without env_version, the deployment ships the current variables. Most refusals come before anything changes and leave the variables as they are. Two can come after the restore: BUSY and ENV_REFERENCE_BROKEN. Then the restored version stays the current one, so read the variables again before you retry.

While any release of the cube is in progress, a new deployment is refused with 409 DEPLOYMENT_IN_PROGRESS: it would wait in line and then replace the newer release. A release is in progress when a deployment is QUEUED or DEPLOYING, or when a build that deploys when it finishes has not finished. A build that does not deploy does not count. To roll back at once, cancel the running release first, with cancelDeployment or cancelBuild.

A cube that is not active cannot be deployed: the request is refused with 409 APPLICATION_NOT_READY. If a variable of the cube refers to a cube or database that is no longer in the project, or to a database that is being deleted, the request is refused with 422 ENV_REFERENCE_BROKEN: change the variable first.

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
build_idstring

The build to deploy: its id. It must be a successful build of this cube. Without it, the cube's latest successful build is deployed.

env_versionstring

Also bring back the variables of an earlier release: the env_version of that release, 7 lowercase hexadecimal characters. They are first made the current variables again, as a new version, unless the current ones already hold the same values, and then the deployment ships them. Old secret values come back too. Without it, the deployment ships the current variables.

Responses

StatusDescription
202

The deployment was accepted. It is usually QUEUED; follow it until status is SUCCEEDED, FAILED or CANCELLED.

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.

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.

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.

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>/deployments" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
Response
{
  "id": "dpl_00000005a0fdd794980f85f9c353bf",
  "build_id": "bld_00000000a0fdd794980f85f9c353bf",
  "image_digest": "sha256:8b0e7153bf7c3706d85c524e440066559a6656c90bd5482a90a29b9fa5ff5180",
  "status": "QUEUED",
  "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": "b7d2e49",
  "created_at": "2026-10-25T11:02:10Z"
}

Get a deployment

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

Returns one deployment of a cube.

Use it to follow a deployment that you started with createDeployment. When createBuild with reuse deploys an earlier build again, its answer names the new deployment: follow that deployment here. Poll it every 3 to 5 seconds until status is SUCCEEDED, FAILED or CANCELLED. QUEUED and DEPLOYING mean keep polling.

Once the deployment has succeeded, public_url holds the address of the cube. When it fails, error says why, in words you can show. A failed or cancelled deployment leaves the previous version serving.

A deployment 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.

deployment-idrequiredstring

The ID of the deployment: the id that createDeployment gave, or that listDeployments shows. An opaque string that starts with dpl_. A deployment of another cube is not found.

Responses

StatusDescription
200

The deployment.

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.

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>/deployments/<deployment-id>" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "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"
}

Cancel a deployment

POST/v1/organizations/{org}/projects/{project}/applications/{cube}/deployments/{deployment-id}/cancel

Asks for a deployment to be cancelled. It needs a key with full access.

Cancelling is not instant. The answer is the deployment as it is at that moment, often still QUEUED or DEPLOYING. Read the deployment with getDeployment until status is CANCELLED, or another final status if it finished first. A cancelled deployment leaves the previous version serving. Cancelling a deployment that has finished changes nothing.

Cancel a running release to roll back right away: while a release is in progress, createDeployment is refused.

In this answer created_by, trigger, pushed_by, api_key and mcp_client are null. getDeployment shows who started the deployment.

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.

deployment-idrequiredstring

The ID of the deployment: the id that createDeployment gave, or that listDeployments shows. An opaque string that starts with dpl_. A deployment of another cube is not found.

Responses

StatusDescription
200

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

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.

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>/deployments/<deployment-id>/cancel" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response
{
  "id": "dpl_00000005a0fdd794980f85f9c353bf",
  "build_id": "bld_00000000a0fdd794980f85f9c353bf",
  "image_digest": "sha256:8b0e7153bf7c3706d85c524e440066559a6656c90bd5482a90a29b9fa5ff5180",
  "status": "DEPLOYING",
  "created_by": null,
  "trigger": null,
  "pushed_by": null,
  "api_key": null,
  "mcp_client": null,
  "env_version": "b7d2e49",
  "created_at": "2026-10-25T11:02:10Z",
  "started_at": "2026-10-25T11:02:11Z"
}