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
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ deploymentsPOSTDeploy a build again or roll back/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ deploymentsGETGet a deployment/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ deployments/ {deployment-id}POSTCancel a deployment/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ deployments/ {deployment-id}/ cancelRolling 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.
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
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ deploymentsReturns 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
| 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 deployments of the cube, newest first, and the one that is live. DeploymentList object2 fieldsdataarray of objectrequiredThe deployments, newest first. data items15 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. live_deployment_idstring | nullrequiredThe ID of the deployment that serves the cube now, the successful one that finished last. |
| 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>/deployments" \
-H "Authorization: Bearer $CUBECEN_API_KEY"{
"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"
}{
"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"
}
}Deploy a build again or roll back
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ deploymentsDeploys 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
| 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 |
|---|---|---|
build_id | string | The build to deploy: its |
env_version | string | Also bring back the variables of an earlier release: the |
Responses
| Status | Description |
|---|---|
| 202 | The deployment was accepted. It is usually 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. |
| 400 | The request is not valid. |
| 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 |
| 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 |
| 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>/deployments" \
-H "Authorization: Bearer $CUBECEN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'{
"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"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request body must be valid JSON with only supported fields",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"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": "DEPLOYMENT_IN_PROGRESS",
"message": "A release of this cube is already in progress",
"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": "ENV_REFERENCE_BROKEN",
"message": "The variable API_URL refers to \"api\", which is no longer a cube of this project; change the variable, then deploy again",
"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"
}
}Get a deployment
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ deployments/ {deployment-id}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
| 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. |
deployment-idrequired | string | The ID of the deployment: the |
Responses
| Status | Description |
|---|---|
| 200 | The deployment. 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. |
| 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>/deployments/<deployment-id>" \
-H "Authorization: Bearer $CUBECEN_API_KEY"{
"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"
}{
"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 deployment
/ v1/ organizations/ {org}/ projects/ {project}/ applications/ {cube}/ deployments/ {deployment-id}/ cancelAsks 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
| 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. |
deployment-idrequired | string | The ID of the deployment: the |
Responses
| Status | Description |
|---|---|
| 200 | The deployment as it is now. It can still be running: cancelling is not instant. 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. |
| 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>/deployments/<deployment-id>/cancel" \
-H "Authorization: Bearer $CUBECEN_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"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"
}{
"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"
}
}