---
title: "Deployment token"
method: POST
path: "/api/v1/deployments/{deploymentId}/token"
tags: ["Deployments"]
---

# Deployment token

`POST /api/v1/deployments/{deploymentId}/token`

## Path parameters

- `deploymentId` integer, required

## Request body

- CreateDeploymentTokenInput
  - `expiresIn` integer, nullable — Token lifetime in seconds, between 60 and 86400. Omit to keep the historical default of 24 hours (86400). Callers that hold the token outside a browser session — scripts, BI tools, scheduled jobs — should request a short lifetime and re-issue tokens instead.

## Response `200`

- DeploymentTokenResponse
  - `cubeApiToken` string, required

## Changes

- **2026-09-02** `914d24830bb3` — 1 info
  - added optional request body
- **2026-07-31** `a0c6b1d2ac96` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api/changes/api/v1/deployments/:deploymentId/token/post.md)

---

[API](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api.md) · [All operations](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cube-js/cube-cloud-rest-api/revisions/914d24830bb3/schema)
