Skip to content
API referencea723f11 · docs(api): previews

Previews

A preview is a copy of a cube, built from the head commit of an open pull request and served at its own address. Previews follow the cube's tracked branch: the pull requests into it from a branch of the same repository get previews. A pull request from a fork gets none.

Endpoints

Read the preview settings first. enabled says whether previews are on. available says whether they can be turned on, and when they can't, reason says why: a cube made from a link has no previews, because Cubecen does not see its pull requests. Turn them on with a Full key:

Shell
curl -sS -X PUT "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/previews/settings" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'

Open pull requests get their previews within about 10 minutes. New pull requests and pushes get theirs within seconds. Turning previews on needs a plan that has them, else the answer is 402 with PLAN_LIMIT_REACHED. Turning them off is always allowed. It closes every preview of the cube.

List the previews to see them: the open ones first, then those closed in the last seven days. A preview's status says where it is. While it is pending, waiting, building or deploying, read the list every 10 seconds. When it is ready, it is served at url. A push builds the new head, and the previous version keeps serving at the same address meanwhile. limits.max_open is how many previews a cube can have open at once.

The logs of a preview work like the logs of a cube, a build and a deployment. Take a build's ID and a deployment's ID from the preview's release. To build a preview's head again, redeploy it. To close one until the next push to its pull request, remove it.

List the previews of a cube

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

Returns the pull request previews of a cube: the open ones first, then those closed in the last seven days, the most recently updated first, at most 50. It needs only read access. The list is not paged. Pull requests into the branch the cube deploys from get previews when their branch is in the same repository; a pull request from a fork gets none.

A preview is a copy of the cube, built from the head commit of a pull request into the cube's tracked branch and served at its own address. limits.max_open is how many previews a cube can have open at once, and limits.idle_days is how many days without a push make Cubecen remove a preview. For each preview, status says where it is, release is its newest build and the deployment that follows it (their IDs open its logs), and error explains a wait or a failure.

The list is empty when the cube has no previews. Turn previews on with updatePreviewSettings. While a preview is pending, waiting, building or deploying, read the list every 10 seconds.

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 previews of the cube, and the limits that apply to them.

PreviewList object2 fields
dataarray of objectrequired

The previews.

data items13 fields
idstringrequired

The preview's ID.

pull_requestobjectrequired

The pull request that the preview builds.

pull_request object9 fields
numberintegerrequired

The pull request's number.

titlestringrequired

The pull request's title.

authorstringrequired

The GitHub login that opened it.

urlstringrequired

Its page on GitHub. Empty until Cubecen has read the pull request.

head_refstringrequired

The branch it comes from.

base_refstringrequired

The branch it targets: the cube's tracked branch.

head_shastring | nullrequired

The newest head commit that Cubecen knows of. It is ahead of release.commit_sha while a new commit waits to be built. null until known.

head_received_atstring | nullrequired

When Cubecen learned of head_sha. null until known.

draftbooleanrequired

true for a draft pull request. Drafts get previews too.

statusstringrequired

pending was just seen and is being set up. waiting waits for a place or a build slot: error.code says which. building and deploying: the head is on its way. ready is served at url. failed: the build or the deployment failed, and error says why. A push or redeployPreview tries again. closed is gone: close_reason says why.

One of: pending, waiting, building, deploying, ready, failed, closed

urlstring | nullrequired

Where the preview is served, once it has served, until it closes. Its last successful deployment keeps serving while a newer build is on its way or has failed. null before the first one, and once closed.

releaseobject | nullrequired

The preview's newest build and the deployment that follows it. null before the first build starts.

errorobject

Why the preview waits or has failed. code is PREVIEW_WAITING_FOR_SLOT (the cube has limits.max_open previews open: it waits until one closes, or until a push to its pull request makes room), PREVIEW_WAITING_FOR_CAPACITY (Cubecen has no room for another preview now), PREVIEW_WAITING_FOR_PLAN (the organization has as many open previews as its plan allows, or its cubes are paused for the month's bandwidth), PREVIEW_WAITING_FOR_BUILD (previews build one at a time: it starts within minutes), GITHUB_PERMISSIONS_MISSING (the permissions of the Cubecen GitHub App were withdrawn on GitHub: it waits until they are approved again), PREVIEW_NOT_STARTED (its build could not be started for an hour: it failed, so push again or redeploy), BUILD_CANCELLED (its build was cancelled: it failed), REPOSITORY_NOT_ACCESSIBLE (the repository can no longer be reached through the organization's GitHub connection: it failed), or the code of a failed build or deployment, as for a build's error.

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.

close_reasonstring

Why the preview was closed, or is closing. closed and merged: its pull request was closed or merged, and it comes back if the pull request is reopened. idle: no push for limits.idle_days days. evicted: a more recently pushed pull request needed its place. removed: removed with removePreview. capacity: Cubecen needed the room. These four come back with the pull request's next push. base_changed: it no longer targets the tracked branch, and it comes back when it does again. disabled: previews were turned off, and they come back when previews are turned on. deleted: the cube was deleted. not_eligible: the pull request cannot have a preview.

One of: closed, merged, idle, disabled, deleted, base_changed, evicted, removed, not_eligible, capacity

created_atstringrequired

When the preview was made.

updated_atstringrequired

When the preview last changed.

ready_atstring | nullrequired

When the preview first served. null until then.

closed_atstring | nullrequired

When the preview was closed. null while it is open.

expires_atstring | nullrequired

When an open preview goes away if there is no new push. null once closed.

sizestring | nullrequired

The size the preview runs at: small, medium, large or xlarge, as the sizes of getOrganizationPlan list them. It is set when the preview's cube is made: a change of plan or size does not resize an open preview, and a closed preview keeps the size it ran at. null until the cube is made, and for previews closed before sizes were shown.

limitsobjectrequired

The limits that apply to the previews of a cube.

limits object2 fields
max_openintegerrequired

The most previews a cube can have open at once.

idle_daysintegerrequired

The days without a push after which a preview is removed.

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>/previews" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "data": [
    {
      "id": "7e4a9d12-5b83-4c60-a1f7-2d9e0c6b8a35",
      "pull_request": {
        "number": 42,
        "title": "New checkout page",
        "author": "octocat",
        "url": "https://github.com/acme/storefront/pull/42",
        "head_ref": "feature/checkout",
        "base_ref": "main",
        "head_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
        "head_received_at": "2026-10-25T09:40:18Z",
        "draft": false
      },
      "status": "ready",
      "url": "https://web-acme-pr42-8c1d0e.cubecen.app",
      "release": {
        "build_id": "bld_00000006a0fdd794980f85f9c353bf",
        "deployment_id": "dpl_00000007a0fdd794980f85f9c353bf",
        "commit_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
        "release_status": "DEPLOYED",
        "env_version": "e3a91c2",
        "started_at": "2026-10-25T09:40:44Z"
      },
      "created_at": "2026-10-25T09:38:02Z",
      "updated_at": "2026-10-25T09:43:10Z",
      "ready_at": "2026-10-25T09:43:10Z",
      "closed_at": null,
      "expires_at": "2026-11-01T09:40:18Z",
      "size": "small"
    },
    {
      "id": "c92f1b68-0d47-4e35-8a6c-5f3b7e1d9a20",
      "pull_request": {
        "number": 40,
        "title": "Fix the footer links",
        "author": "hubot",
        "url": "https://github.com/acme/storefront/pull/40",
        "head_ref": "fix/footer",
        "base_ref": "main",
        "head_sha": "b73a5f7f0d6cadd7602fbb6440a9434b4e1c8a90",
        "head_received_at": "2026-10-23T15:12:44Z",
        "draft": false
      },
      "status": "closed",
      "url": null,
      "release": {
        "build_id": "bld_00000003a0fdd794980f85f9c353bf",
        "deployment_id": "dpl_00000004a0fdd794980f85f9c353bf",
        "commit_sha": "b73a5f7f0d6cadd7602fbb6440a9434b4e1c8a90",
        "release_status": "DEPLOYED",
        "env_version": "e3a91c2",
        "started_at": "2026-10-23T15:13:10Z"
      },
      "close_reason": "merged",
      "created_at": "2026-10-23T15:10:51Z",
      "updated_at": "2026-10-24T08:02:37Z",
      "ready_at": "2026-10-23T15:16:20Z",
      "closed_at": "2026-10-24T08:02:37Z",
      "expires_at": null,
      "size": "small"
    }
  ],
  "limits": {
    "max_open": 3,
    "idle_days": 7
  }
}

Get the preview settings of a cube

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

Returns whether pull request previews are on for a cube, and whether they can be turned on. It needs only read access.

enabled is the switch. available says whether it can be turned on now. When it cannot, reason says why: PUBLIC_REPOSITORY (the cube was made from a link, so Cubecen does not see its pull requests), APPLICATION_NOT_READY (the cube is not active), PLAN (the organization's plan has no previews), REPOSITORY_NOT_ACCESSIBLE (the cube's GitHub connection is gone) or GITHUB_PERMISSIONS_MISSING (an owner of the GitHub account has not approved the permissions that previews need: approve_url is the page where they do). branch is the tracked branch: the pull requests into it get previews.

What the GitHub account has granted is read from GitHub at most once an hour, and again when its owner approves new permissions. Change the switch with updatePreviewSettings.

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 preview settings of the cube.

PreviewSettings object6 fields
enabledbooleanrequired

Whether previews are on.

availablebooleanrequired

Whether previews can be turned on now.

reasonstring | nullrequired

Why they cannot be turned on. PUBLIC_REPOSITORY: the cube was made from a link, so Cubecen does not see its pull requests. APPLICATION_NOT_READY: the cube is not active. PLAN: the organization's plan has no previews. REPOSITORY_NOT_ACCESSIBLE: the cube's GitHub connection is gone. GITHUB_PERMISSIONS_MISSING: an owner of the GitHub account has not approved the permissions that previews need. null when they can.

approve_urlstring | nullrequired

Where an owner of the GitHub account approves the permissions, on github.com. null unless reason is GITHUB_PERMISSIONS_MISSING.

branchstring | nullrequired

The tracked branch: the pull requests into it get previews. null when the cube has none.

limitsobjectrequired

The limits that apply to the previews of a cube.

limits object2 fields
max_openintegerrequired

The most previews a cube can have open at once.

idle_daysintegerrequired

The days without a push after which a preview is removed.

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.

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 "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/previews/settings" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "enabled": true,
  "available": true,
  "reason": null,
  "approve_url": null,
  "branch": "main",
  "limits": {
    "max_open": 3,
    "idle_days": 7
  }
}

Turn previews on or off for a cube

PUT/v1/organizations/{org}/projects/{project}/applications/{cube}/previews/settings

Turns pull request previews on or off for a cube. It needs a key with full access.

Send {"enabled": true} or {"enabled": false}. enabled is required. The answer is the settings, as getPreviewSettings shows them.

Turning previews on first asks GitHub again what the account has granted. It is refused when previews cannot be turned on: with 402 PLAN_LIMIT_REACHED while the organization's plan has no previews (error.limit is previews), with 409 APPLICATION_NOT_READY while the cube is not active, and with 422 GITHUB_PERMISSIONS_MISSING, REPOSITORY_NOT_ACCESSIBLE, GITHUB_INSTALLATION_REMOVED or GITHUB_INSTALLATION_SUSPENDED when GitHub does not allow it. The pull requests that are already open get their previews within about 10 minutes. New pull requests and pushes get theirs within seconds.

Turning previews off is always allowed. It closes every preview of the cube: their cubes are deleted and GitHub is told. Turning previews on again brings back the previews of the pull requests that are still open.

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
enabledrequiredboolean

true turns previews on, false turns them off. Required.

Responses

StatusDescription
200

The preview settings after the change.

PreviewSettings object6 fields
enabledbooleanrequired

Whether previews are on.

availablebooleanrequired

Whether previews can be turned on now.

reasonstring | nullrequired

Why they cannot be turned on. PUBLIC_REPOSITORY: the cube was made from a link, so Cubecen does not see its pull requests. APPLICATION_NOT_READY: the cube is not active. PLAN: the organization's plan has no previews. REPOSITORY_NOT_ACCESSIBLE: the cube's GitHub connection is gone. GITHUB_PERMISSIONS_MISSING: an owner of the GitHub account has not approved the permissions that previews need. null when they can.

approve_urlstring | nullrequired

Where an owner of the GitHub account approves the permissions, on github.com. null unless reason is GITHUB_PERMISSIONS_MISSING.

branchstring | nullrequired

The tracked branch: the pull requests into it get previews. null when the cube has none.

limitsobjectrequired

The limits that apply to the previews of a cube.

limits object2 fields
max_openintegerrequired

The most previews a cube can have open at once.

idle_daysintegerrequired

The days without a push after which a preview is removed.

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 PUT "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/previews/settings" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"enabled": true}'
Response
{
  "enabled": true,
  "available": true,
  "reason": null,
  "approve_url": null,
  "branch": "main",
  "limits": {
    "max_open": 3,
    "idle_days": 7
  }
}

Get a preview

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

Returns one pull request preview of a cube, with its newest release. It needs only read access.

status says where the preview is: pending (just seen, being set up), waiting (for a place or a build slot: error.code says which), building, deploying, ready (served at url), failed (error says why) or closed (close_reason says why). url is set once the preview has served, until it closes. A push builds the new head while the previous version keeps serving at the same address, and a failed build leaves it serving too.

release is the newest build of the preview and its automatic deployment. Its build_id and deployment_id are what getPreviewBuildLogs and getPreviewDeploymentLogs take. pull_request.head_sha is the newest commit that Cubecen knows of: it is ahead of release.commit_sha while a new commit waits to be built.

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.

preview-idrequiredstring

The ID of the preview: the id that listPreviews shows. A preview of another cube is not found.

Responses

StatusDescription
200

The preview.

Preview object13 fields
idstringrequired

The preview's ID.

pull_requestobjectrequired

The pull request that the preview builds.

pull_request object9 fields
numberintegerrequired

The pull request's number.

titlestringrequired

The pull request's title.

authorstringrequired

The GitHub login that opened it.

urlstringrequired

Its page on GitHub. Empty until Cubecen has read the pull request.

head_refstringrequired

The branch it comes from.

base_refstringrequired

The branch it targets: the cube's tracked branch.

head_shastring | nullrequired

The newest head commit that Cubecen knows of. It is ahead of release.commit_sha while a new commit waits to be built. null until known.

head_received_atstring | nullrequired

When Cubecen learned of head_sha. null until known.

draftbooleanrequired

true for a draft pull request. Drafts get previews too.

statusstringrequired

pending was just seen and is being set up. waiting waits for a place or a build slot: error.code says which. building and deploying: the head is on its way. ready is served at url. failed: the build or the deployment failed, and error says why. A push or redeployPreview tries again. closed is gone: close_reason says why.

One of: pending, waiting, building, deploying, ready, failed, closed

urlstring | nullrequired

Where the preview is served, once it has served, until it closes. Its last successful deployment keeps serving while a newer build is on its way or has failed. null before the first one, and once closed.

releaseobject | nullrequired

The preview's newest build and the deployment that follows it. null before the first build starts.

errorobject

Why the preview waits or has failed. code is PREVIEW_WAITING_FOR_SLOT (the cube has limits.max_open previews open: it waits until one closes, or until a push to its pull request makes room), PREVIEW_WAITING_FOR_CAPACITY (Cubecen has no room for another preview now), PREVIEW_WAITING_FOR_PLAN (the organization has as many open previews as its plan allows, or its cubes are paused for the month's bandwidth), PREVIEW_WAITING_FOR_BUILD (previews build one at a time: it starts within minutes), GITHUB_PERMISSIONS_MISSING (the permissions of the Cubecen GitHub App were withdrawn on GitHub: it waits until they are approved again), PREVIEW_NOT_STARTED (its build could not be started for an hour: it failed, so push again or redeploy), BUILD_CANCELLED (its build was cancelled: it failed), REPOSITORY_NOT_ACCESSIBLE (the repository can no longer be reached through the organization's GitHub connection: it failed), or the code of a failed build or deployment, as for a build's error.

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.

close_reasonstring

Why the preview was closed, or is closing. closed and merged: its pull request was closed or merged, and it comes back if the pull request is reopened. idle: no push for limits.idle_days days. evicted: a more recently pushed pull request needed its place. removed: removed with removePreview. capacity: Cubecen needed the room. These four come back with the pull request's next push. base_changed: it no longer targets the tracked branch, and it comes back when it does again. disabled: previews were turned off, and they come back when previews are turned on. deleted: the cube was deleted. not_eligible: the pull request cannot have a preview.

One of: closed, merged, idle, disabled, deleted, base_changed, evicted, removed, not_eligible, capacity

created_atstringrequired

When the preview was made.

updated_atstringrequired

When the preview last changed.

ready_atstring | nullrequired

When the preview first served. null until then.

closed_atstring | nullrequired

When the preview was closed. null while it is open.

expires_atstring | nullrequired

When an open preview goes away if there is no new push. null once closed.

sizestring | nullrequired

The size the preview runs at: small, medium, large or xlarge, as the sizes of getOrganizationPlan list them. It is set when the preview's cube is made: a change of plan or size does not resize an open preview, and a closed preview keeps the size it ran at. null until the cube is made, and for previews closed before sizes were shown.

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.

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>/previews/<preview-id>" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "id": "7e4a9d12-5b83-4c60-a1f7-2d9e0c6b8a35",
  "pull_request": {
    "number": 42,
    "title": "New checkout page",
    "author": "octocat",
    "url": "https://github.com/acme/storefront/pull/42",
    "head_ref": "feature/checkout",
    "base_ref": "main",
    "head_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
    "head_received_at": "2026-10-25T09:40:18Z",
    "draft": false
  },
  "status": "ready",
  "url": "https://web-acme-pr42-8c1d0e.cubecen.app",
  "release": {
    "build_id": "bld_00000006a0fdd794980f85f9c353bf",
    "deployment_id": "dpl_00000007a0fdd794980f85f9c353bf",
    "commit_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
    "release_status": "DEPLOYED",
    "env_version": "e3a91c2",
    "started_at": "2026-10-25T09:40:44Z"
  },
  "created_at": "2026-10-25T09:38:02Z",
  "updated_at": "2026-10-25T09:43:10Z",
  "ready_at": "2026-10-25T09:43:10Z",
  "closed_at": null,
  "expires_at": "2026-11-01T09:40:18Z",
  "size": "small"
}

Remove a preview

DELETE/v1/organizations/{org}/projects/{project}/applications/{cube}/previews/{preview-id}

Closes a preview until the next push to its pull request. It needs a key with full access.

The answer is 202 with the preview, which now has close_reason set to removed. Within seconds the preview is closed, its cube is deleted and GitHub is told. It comes back with the next push to the pull request. A preview that is already closed is answered as it is.

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.

preview-idrequiredstring

The ID of the preview: the id that listPreviews shows. A preview of another cube is not found.

Responses

StatusDescription
202

The preview, which is being closed.

Preview object13 fields
idstringrequired

The preview's ID.

pull_requestobjectrequired

The pull request that the preview builds.

pull_request object9 fields
numberintegerrequired

The pull request's number.

titlestringrequired

The pull request's title.

authorstringrequired

The GitHub login that opened it.

urlstringrequired

Its page on GitHub. Empty until Cubecen has read the pull request.

head_refstringrequired

The branch it comes from.

base_refstringrequired

The branch it targets: the cube's tracked branch.

head_shastring | nullrequired

The newest head commit that Cubecen knows of. It is ahead of release.commit_sha while a new commit waits to be built. null until known.

head_received_atstring | nullrequired

When Cubecen learned of head_sha. null until known.

draftbooleanrequired

true for a draft pull request. Drafts get previews too.

statusstringrequired

pending was just seen and is being set up. waiting waits for a place or a build slot: error.code says which. building and deploying: the head is on its way. ready is served at url. failed: the build or the deployment failed, and error says why. A push or redeployPreview tries again. closed is gone: close_reason says why.

One of: pending, waiting, building, deploying, ready, failed, closed

urlstring | nullrequired

Where the preview is served, once it has served, until it closes. Its last successful deployment keeps serving while a newer build is on its way or has failed. null before the first one, and once closed.

releaseobject | nullrequired

The preview's newest build and the deployment that follows it. null before the first build starts.

errorobject

Why the preview waits or has failed. code is PREVIEW_WAITING_FOR_SLOT (the cube has limits.max_open previews open: it waits until one closes, or until a push to its pull request makes room), PREVIEW_WAITING_FOR_CAPACITY (Cubecen has no room for another preview now), PREVIEW_WAITING_FOR_PLAN (the organization has as many open previews as its plan allows, or its cubes are paused for the month's bandwidth), PREVIEW_WAITING_FOR_BUILD (previews build one at a time: it starts within minutes), GITHUB_PERMISSIONS_MISSING (the permissions of the Cubecen GitHub App were withdrawn on GitHub: it waits until they are approved again), PREVIEW_NOT_STARTED (its build could not be started for an hour: it failed, so push again or redeploy), BUILD_CANCELLED (its build was cancelled: it failed), REPOSITORY_NOT_ACCESSIBLE (the repository can no longer be reached through the organization's GitHub connection: it failed), or the code of a failed build or deployment, as for a build's error.

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.

close_reasonstring

Why the preview was closed, or is closing. closed and merged: its pull request was closed or merged, and it comes back if the pull request is reopened. idle: no push for limits.idle_days days. evicted: a more recently pushed pull request needed its place. removed: removed with removePreview. capacity: Cubecen needed the room. These four come back with the pull request's next push. base_changed: it no longer targets the tracked branch, and it comes back when it does again. disabled: previews were turned off, and they come back when previews are turned on. deleted: the cube was deleted. not_eligible: the pull request cannot have a preview.

One of: closed, merged, idle, disabled, deleted, base_changed, evicted, removed, not_eligible, capacity

created_atstringrequired

When the preview was made.

updated_atstringrequired

When the preview last changed.

ready_atstring | nullrequired

When the preview first served. null until then.

closed_atstring | nullrequired

When the preview was closed. null while it is open.

expires_atstring | nullrequired

When an open preview goes away if there is no new push. null once closed.

sizestring | nullrequired

The size the preview runs at: small, medium, large or xlarge, as the sizes of getOrganizationPlan list them. It is set when the preview's cube is made: a change of plan or size does not resize an open preview, and a closed preview keeps the size it ran at. null until the cube is made, and for previews closed before sizes were shown.

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.

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 DELETE "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/previews/<preview-id>" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response
{
  "id": "7e4a9d12-5b83-4c60-a1f7-2d9e0c6b8a35",
  "pull_request": {
    "number": 42,
    "title": "New checkout page",
    "author": "octocat",
    "url": "https://github.com/acme/storefront/pull/42",
    "head_ref": "feature/checkout",
    "base_ref": "main",
    "head_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
    "head_received_at": "2026-10-25T09:40:18Z",
    "draft": false
  },
  "status": "ready",
  "url": "https://web-acme-pr42-8c1d0e.cubecen.app",
  "release": {
    "build_id": "bld_00000006a0fdd794980f85f9c353bf",
    "deployment_id": "dpl_00000007a0fdd794980f85f9c353bf",
    "commit_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
    "release_status": "DEPLOYED",
    "env_version": "e3a91c2",
    "started_at": "2026-10-25T09:40:44Z"
  },
  "close_reason": "removed",
  "created_at": "2026-10-25T09:38:02Z",
  "updated_at": "2026-10-25T13:15:27Z",
  "ready_at": "2026-10-25T09:43:10Z",
  "closed_at": null,
  "expires_at": "2026-11-01T09:40:18Z",
  "size": "small"
}

Build a preview again

POST/v1/organizations/{org}/projects/{project}/applications/{cube}/previews/{preview-id}/redeploy

Builds the head of an open preview again, with the current variables and the secrets marked for previews. It needs a key with full access.

The answer is 202 with the preview as it is, and the build starts within seconds. Follow it with getPreview. A preview that is closed is refused with 409 CONFLICT: a push to its pull request brings it back.

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.

preview-idrequiredstring

The ID of the preview: the id that listPreviews shows. A preview of another cube is not found.

Responses

StatusDescription
202

The preview as it is. Its head is built again within seconds.

Preview object13 fields
idstringrequired

The preview's ID.

pull_requestobjectrequired

The pull request that the preview builds.

pull_request object9 fields
numberintegerrequired

The pull request's number.

titlestringrequired

The pull request's title.

authorstringrequired

The GitHub login that opened it.

urlstringrequired

Its page on GitHub. Empty until Cubecen has read the pull request.

head_refstringrequired

The branch it comes from.

base_refstringrequired

The branch it targets: the cube's tracked branch.

head_shastring | nullrequired

The newest head commit that Cubecen knows of. It is ahead of release.commit_sha while a new commit waits to be built. null until known.

head_received_atstring | nullrequired

When Cubecen learned of head_sha. null until known.

draftbooleanrequired

true for a draft pull request. Drafts get previews too.

statusstringrequired

pending was just seen and is being set up. waiting waits for a place or a build slot: error.code says which. building and deploying: the head is on its way. ready is served at url. failed: the build or the deployment failed, and error says why. A push or redeployPreview tries again. closed is gone: close_reason says why.

One of: pending, waiting, building, deploying, ready, failed, closed

urlstring | nullrequired

Where the preview is served, once it has served, until it closes. Its last successful deployment keeps serving while a newer build is on its way or has failed. null before the first one, and once closed.

releaseobject | nullrequired

The preview's newest build and the deployment that follows it. null before the first build starts.

errorobject

Why the preview waits or has failed. code is PREVIEW_WAITING_FOR_SLOT (the cube has limits.max_open previews open: it waits until one closes, or until a push to its pull request makes room), PREVIEW_WAITING_FOR_CAPACITY (Cubecen has no room for another preview now), PREVIEW_WAITING_FOR_PLAN (the organization has as many open previews as its plan allows, or its cubes are paused for the month's bandwidth), PREVIEW_WAITING_FOR_BUILD (previews build one at a time: it starts within minutes), GITHUB_PERMISSIONS_MISSING (the permissions of the Cubecen GitHub App were withdrawn on GitHub: it waits until they are approved again), PREVIEW_NOT_STARTED (its build could not be started for an hour: it failed, so push again or redeploy), BUILD_CANCELLED (its build was cancelled: it failed), REPOSITORY_NOT_ACCESSIBLE (the repository can no longer be reached through the organization's GitHub connection: it failed), or the code of a failed build or deployment, as for a build's error.

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.

close_reasonstring

Why the preview was closed, or is closing. closed and merged: its pull request was closed or merged, and it comes back if the pull request is reopened. idle: no push for limits.idle_days days. evicted: a more recently pushed pull request needed its place. removed: removed with removePreview. capacity: Cubecen needed the room. These four come back with the pull request's next push. base_changed: it no longer targets the tracked branch, and it comes back when it does again. disabled: previews were turned off, and they come back when previews are turned on. deleted: the cube was deleted. not_eligible: the pull request cannot have a preview.

One of: closed, merged, idle, disabled, deleted, base_changed, evicted, removed, not_eligible, capacity

created_atstringrequired

When the preview was made.

updated_atstringrequired

When the preview last changed.

ready_atstring | nullrequired

When the preview first served. null until then.

closed_atstring | nullrequired

When the preview was closed. null while it is open.

expires_atstring | nullrequired

When an open preview goes away if there is no new push. null once closed.

sizestring | nullrequired

The size the preview runs at: small, medium, large or xlarge, as the sizes of getOrganizationPlan list them. It is set when the preview's cube is made: a change of plan or size does not resize an open preview, and a closed preview keeps the size it ran at. null until the cube is made, and for previews closed before sizes were shown.

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.

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>/previews/<preview-id>/redeploy" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response
{
  "id": "7e4a9d12-5b83-4c60-a1f7-2d9e0c6b8a35",
  "pull_request": {
    "number": 42,
    "title": "New checkout page",
    "author": "octocat",
    "url": "https://github.com/acme/storefront/pull/42",
    "head_ref": "feature/checkout",
    "base_ref": "main",
    "head_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
    "head_received_at": "2026-10-25T09:40:18Z",
    "draft": false
  },
  "status": "ready",
  "url": "https://web-acme-pr42-8c1d0e.cubecen.app",
  "release": {
    "build_id": "bld_00000006a0fdd794980f85f9c353bf",
    "deployment_id": "dpl_00000007a0fdd794980f85f9c353bf",
    "commit_sha": "6e8b7d3c38a461f0c27c4d52b7a0943e4cbbb119",
    "release_status": "DEPLOYED",
    "env_version": "e3a91c2",
    "started_at": "2026-10-25T09:40:44Z"
  },
  "created_at": "2026-10-25T09:38:02Z",
  "updated_at": "2026-10-25T09:43:10Z",
  "ready_at": "2026-10-25T09:43:10Z",
  "closed_at": null,
  "expires_at": "2026-11-01T09:40:18Z",
  "size": "small"
}

Stream the logs of a preview

GET/v1/organizations/{org}/projects/{project}/applications/{cube}/previews/{preview-id}/logs
Read-only key

Streams what a preview prints, from all of its replicas, together with its pod events, as Server-Sent Events (text/event-stream). It works like getApplicationLogs, for a preview. It needs only read access.

The stream starts with a window of the output: the last tail lines (1 to 1000), or the lines since since, or the last 100 lines when you send neither. tail and since together are refused with 400. Without follow, the stream ends with an end event after the window. With follow=true it stays open and sends new lines a few seconds after they are printed.

To continue after a broken connection, send the id of the last event you received as cursor. It wins over tail and since.

A preview that has no cube of its own yet, because it is closed or not set up yet, has no logs and is answered with 404. The events are described under the response.

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.

preview-idrequiredstring

The ID of the preview: the id that listPreviews shows. A preview of another cube is not found.

Query parameters

NameTypeDescription
followboolean

true keeps the stream open: it sends new lines a few seconds after they are printed. Without it, or with false, the stream sends the lines that exist and ends.

cursorstring

Where to continue a stream: the id of the last event you received, as it is. Send it after a broken connection, and the stream goes on after that line. A value that is not a log position, or whose position has expired, is refused with 400; the message differs between the two, so match on the code. Leave it out to start at the beginning.

tailinteger

Start with the last N lines, from 1 to 1000. Without tail, since or a cursor, the last 100 lines. Not together with since.

sincestring

Start at this time, as an RFC 3339 time, instead of with the last lines. Not together with tail.

Header parameters

NameTypeDescription
Last-Event-IDstring

The same as cursor: the id of the last event you received. EventSource sends it by itself when it reconnects. If both are sent, this one counts.

Responses

StatusDescription
200

The log lines, as a stream of Server-Sent Events.

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.

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>/previews/<preview-id>/logs" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
"retry: 3000\n: connected\n\nid: NjMwMQ\nevent: log\ndata: {\"time\":\"2026-10-25T09:44:01.204118Z\",\"source\":\"runtime\",\"pod\":\"app-9a2f1c3e-6d5b8f7c49-x7k2p\",\"line\":\"Listening on port 8080\"}\n\n: ping\n"

Stream the logs of a preview build

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

Streams the log lines of one build of a preview, from fetching the source to pushing the image, as Server-Sent Events (text/event-stream). It works like getBuildLogs, for a preview. It needs only read access.

Take the build's ID from release.build_id of the preview, as getPreview shows it. Without follow, the stream sends the lines that exist and ends with an end event. With follow=true it stays open and sends new lines a few seconds after they are printed. When the build has finished and every line is sent, the stream ends with complete: true.

To continue after a broken connection, send the id of the last event you received as cursor. tail and since are for the output of a running preview (getPreviewLogs): without a cursor, a request that has one of them is refused with 400.

Only builds of this preview are found. Any other build ID, the cube's own builds included, is 404, and so is a preview that has no cube of its own yet. The events are described under the response.

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.

preview-idrequiredstring

The ID of the preview: the id that listPreviews shows. A preview of another cube is not found.

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.

Query parameters

NameTypeDescription
followboolean

true keeps the stream open: it sends new lines a few seconds after they are printed. Without it, or with false, the stream sends the lines that exist and ends.

cursorstring

Where to continue a stream: the id of the last event you received, as it is. Send it after a broken connection, and the stream goes on after that line. A value that is not a log position, or whose position has expired, is refused with 400; the message differs between the two, so match on the code. Leave it out to start at the beginning.

Header parameters

NameTypeDescription
Last-Event-IDstring

The same as cursor: the id of the last event you received. EventSource sends it by itself when it reconnects. If both are sent, this one counts.

Responses

StatusDescription
200

The log lines, as a stream of Server-Sent Events.

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.

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>/previews/<preview-id>/builds/<build-id>/logs" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
"retry: 3000\n: connected\n\nid: NzEwMQ\nevent: log\ndata: {\"time\":\"2026-10-25T09:40:48.331092Z\",\"source\":\"build\",\"step\":\"fetch\",\"line\":\"Fetching revision feature/checkout\"}\n\nid: NzEwMg\nevent: end\ndata: {\"complete\":true,\"cursor\":\"NzEwMg\"}\n"

Stream the logs of a preview deployment

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

Streams the log lines of one deployment of a preview as Server-Sent Events (text/event-stream): its own steps (apply and rollout), the output of the new pods as they start, and the pod events that happen while it rolls out. It works like getDeploymentLogs, for a preview. It needs only read access.

Take the deployment's ID from release.deployment_id of the preview, as getPreview shows it. It is null until the build has succeeded. Without follow, the stream sends the lines that exist and ends with an end event. With follow=true it stays open and sends new lines a few seconds after they are printed. When the deployment has finished and every line is sent, the stream ends with complete: true.

To continue after a broken connection, send the id of the last event you received as cursor. tail and since are for the output of a running preview (getPreviewLogs): without a cursor, a request that has one of them is refused with 400.

Only deployments of this preview are found. Any other deployment ID, the cube's own deployments included, is 404, and so is a preview that has no cube of its own yet. The events are described under the response.

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.

preview-idrequiredstring

The ID of the preview: the id that listPreviews shows. A preview of another cube is not found.

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.

Query parameters

NameTypeDescription
followboolean

true keeps the stream open: it sends new lines a few seconds after they are printed. Without it, or with false, the stream sends the lines that exist and ends.

cursorstring

Where to continue a stream: the id of the last event you received, as it is. Send it after a broken connection, and the stream goes on after that line. A value that is not a log position, or whose position has expired, is refused with 400; the message differs between the two, so match on the code. Leave it out to start at the beginning.

Header parameters

NameTypeDescription
Last-Event-IDstring

The same as cursor: the id of the last event you received. EventSource sends it by itself when it reconnects. If both are sent, this one counts.

Responses

StatusDescription
200

The log lines, as a stream of Server-Sent Events.

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.

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>/previews/<preview-id>/deployments/<deployment-id>/logs" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
"retry: 3000\n: connected\n\nid: ODEwMQ\nevent: log\ndata: {\"time\":\"2026-10-25T09:42:20.511903Z\",\"source\":\"deploy\",\"step\":\"apply\",\"line\":\"Applying the new version\"}\n\nid: ODEwMg\nevent: end\ndata: {\"complete\":true,\"cursor\":\"ODEwMg\"}\n"