> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cube.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a deployment

Update any subset of a deployment’s settings — everything the console’s Settings pages own — and read the full settings back. Fields you omit are left alone, and `templateVariables` is merged key-by-key rather than replaced, so setting one configuration flag never clears the others. `releaseChannelVersion` must be one of the versions `GET /:deploymentId/versions` lists for the target channel (in any of the forms it reports) — anything else is a 400, and the container image is resolved from the version rather than sent. Choosing a version that is not the channel’s latest also sets `releaseChannelVersionHold` unless you send it explicitly, so auto-upgrade does not undo the pin.


## OpenAPI

````yaml /api-reference/api.yaml put /api/v1/deployments/{deploymentId}
openapi: 3.1.0
info:
  title: Cube Platform API
  version: 1.0.0
  description: >-
    Programmatically manage Cube: deployments and everything scoped to them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
    Data-model

    authoring, dev mode, branches, and uploads live under /build/api/v1 — same
    host and

    token, routed to the build pods.
servers:
  - url: https://{tenant}.cubecloud.dev
    description: Your tenant host. Replace the whole host if you use a custom domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Deployment Creation
  - name: Environments
  - name: Env Variables
  - name: Regions
  - name: Data Model
  - name: Data Model Uploads
  - name: GitHub
  - name: GitHub Connection
  - name: dbt Sync
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Notifications
  - name: Workspace
  - name: Users Admin
  - name: User Attributes
  - name: User Attribute Values
  - name: Tenant Settings
  - name: OAuth Integrations
  - name: User OAuth Tokens
  - name: OIDC Token Configs
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
  - name: Dashboard Embed Access
  - name: OpenAPI Spec
paths:
  /api/v1/deployments/{deploymentId}:
    put:
      tags:
        - Deployments
      summary: Update a deployment
      operationId: updateDeployment
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDeploymentInput'
        description: UpdateDeploymentInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentSettings'
          description: ''
components:
  schemas:
    UpdateDeploymentInput:
      properties:
        cloudProvider:
          oneOf:
            - $ref: '#/components/schemas/UpdateDeploymentInputCloudProvider'
            - type: 'null'
        creationMethod:
          oneOf:
            - $ref: '#/components/schemas/UpdateDeploymentInputCreationMethod'
            - type: 'null'
        cspsConfig:
          oneOf:
            - $ref: '#/components/schemas/CspsConfigInput'
            - type: 'null'
        customDomain:
          oneOf:
            - type: string
            - type: 'null'
        defaultLaunchpadViewGroup:
          oneOf:
            - type: string
            - type: 'null'
        deployBranchMergeAllowed:
          oneOf:
            - type: boolean
            - type: 'null'
        deployBranchName:
          oneOf:
            - type: string
            - type: 'null'
        deployBranchReadOnly:
          oneOf:
            - type: boolean
            - type: 'null'
        deployMode:
          oneOf:
            - $ref: '#/components/schemas/UpdateDeploymentInputDeployMode'
            - type: 'null'
        deployProjectRoot:
          oneOf:
            - type: string
            - type: 'null'
        launchpadTabs:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
        name:
          oneOf:
            - type: string
            - type: 'null'
        region:
          oneOf:
            - type: string
            - type: 'null'
        releaseChannel:
          oneOf:
            - $ref: '#/components/schemas/UpdateDeploymentInputReleaseChannel'
            - type: 'null'
        releaseChannelVersion:
          oneOf:
            - type: string
            - type: 'null'
        releaseChannelVersionHold:
          oneOf:
            - type: boolean
            - type: 'null'
        template:
          oneOf:
            - $ref: '#/components/schemas/UpdateDeploymentInputTemplate'
            - type: 'null'
        templateVariables:
          oneOf:
            - additionalProperties: true
              type: object
            - type: 'null'
      type: object
    DeploymentSettings:
      properties:
        autoDomain:
          oneOf:
            - type: string
            - type: 'null'
        cloudProvider:
          $ref: '#/components/schemas/DeploymentSettingsCloudProvider'
        creationMethod:
          oneOf:
            - $ref: '#/components/schemas/DeploymentSettingsCreationMethod'
            - type: 'null'
        creationStep:
          oneOf:
            - $ref: '#/components/schemas/CreationStep'
            - type: 'null'
        cspsConfig:
          oneOf:
            - $ref: '#/components/schemas/CspsConfig'
            - type: 'null'
        cubeImageCloud:
          oneOf:
            - type: string
            - type: 'null'
        cubeImageVersion:
          oneOf:
            - type: string
            - type: 'null'
        customDomain:
          oneOf:
            - type: string
            - type: 'null'
        defaultLaunchpadViewGroup:
          oneOf:
            - type: string
            - type: 'null'
        deployBranchMergeAllowed:
          type: boolean
        deployBranchName:
          type: string
        deployBranchReadOnly:
          type: boolean
        deployMode:
          oneOf:
            - $ref: '#/components/schemas/DeploymentSettingsDeployMode'
            - type: 'null'
        deployProjectRoot:
          type: string
        deploymentUrl:
          oneOf:
            - type: string
            - type: 'null'
        id:
          type: integer
        isCold:
          oneOf:
            - type: boolean
            - type: 'null'
        isCubeSqlEnabled:
          type: boolean
        isManaged:
          oneOf:
            - type: boolean
            - type: 'null'
        isSupportPreAggregations:
          type: boolean
        launchpadTabs:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
        name:
          type: string
        region:
          oneOf:
            - type: string
            - type: 'null'
        releaseChannel:
          $ref: '#/components/schemas/DeploymentSettingsReleaseChannel'
        releaseChannelVersion:
          oneOf:
            - type: string
            - type: 'null'
        releaseChannelVersionHold:
          oneOf:
            - type: boolean
            - type: 'null'
        repoType:
          oneOf:
            - $ref: '#/components/schemas/DeploymentSettingsRepoType'
            - type: 'null'
        targetPlatform:
          oneOf:
            - type: string
            - type: 'null'
        template:
          $ref: '#/components/schemas/DeploymentSettingsTemplate'
        templateVariables:
          oneOf:
            - additionalProperties: true
              type: object
            - type: 'null'
      required:
        - id
        - name
        - template
        - cloudProvider
        - releaseChannel
        - deployBranchName
        - deployBranchReadOnly
        - deployBranchMergeAllowed
        - deployProjectRoot
        - isCubeSqlEnabled
        - isSupportPreAggregations
      type: object
    UpdateDeploymentInputCloudProvider:
      enum:
        - cubecloud
        - aws
        - gcp
      type: string
    UpdateDeploymentInputCreationMethod:
      enum:
        - upload
        - cubecloud
        - github
        - ssh
      type: string
    CspsConfigInput:
      properties:
        awsRoleArn:
          oneOf:
            - type: string
            - type: 'null'
        azureClientId:
          oneOf:
            - type: string
            - type: 'null'
        azureContainer:
          oneOf:
            - type: string
            - type: 'null'
        azureStorageAccount:
          oneOf:
            - type: string
            - type: 'null'
        azureTenantId:
          oneOf:
            - type: string
            - type: 'null'
        enabled:
          type: boolean
        gcpServiceAccountEmail:
          oneOf:
            - type: string
            - type: 'null'
        gcpWorkloadIdentityProvider:
          oneOf:
            - type: string
            - type: 'null'
        gcsBucket:
          oneOf:
            - type: string
            - type: 'null'
        s3Bucket:
          oneOf:
            - type: string
            - type: 'null'
        s3Region:
          oneOf:
            - type: string
            - type: 'null'
        s3Sse:
          oneOf:
            - type: string
            - type: 'null'
        storageProvider:
          type: string
      required:
        - enabled
        - storageProvider
      type: object
    UpdateDeploymentInputDeployMode:
      enum:
        - git
        - cli
      type: string
    UpdateDeploymentInputReleaseChannel:
      enum:
        - latest
        - release
      type: string
    UpdateDeploymentInputTemplate:
      enum:
        - single
        - simpleCluster
        - multiCluster
      type: string
    DeploymentSettingsCloudProvider:
      enum:
        - cubecloud
        - aws
        - gcp
      type: string
    DeploymentSettingsCreationMethod:
      enum:
        - upload
        - cubecloud
        - github
        - ssh
      type: string
    CreationStep:
      enum:
        - project
        - upload
        - schema
        - github
        - ssh
        - databases
        - ready
        - demo
      type: string
    CspsConfig:
      properties:
        awsRoleArn:
          oneOf:
            - type: string
            - type: 'null'
        azureClientId:
          oneOf:
            - type: string
            - type: 'null'
        azureContainer:
          oneOf:
            - type: string
            - type: 'null'
        azureStorageAccount:
          oneOf:
            - type: string
            - type: 'null'
        azureTenantId:
          oneOf:
            - type: string
            - type: 'null'
        enabled:
          type: boolean
        gcpServiceAccountEmail:
          oneOf:
            - type: string
            - type: 'null'
        gcpWorkloadIdentityProvider:
          oneOf:
            - type: string
            - type: 'null'
        gcsBucket:
          oneOf:
            - type: string
            - type: 'null'
        s3Bucket:
          oneOf:
            - type: string
            - type: 'null'
        s3Region:
          oneOf:
            - type: string
            - type: 'null'
        s3Sse:
          oneOf:
            - type: string
            - type: 'null'
        storageProvider:
          type: string
      required:
        - enabled
        - storageProvider
      type: object
    DeploymentSettingsDeployMode:
      enum:
        - git
        - cli
      type: string
    DeploymentSettingsReleaseChannel:
      enum:
        - latest
        - release
      type: string
    DeploymentSettingsRepoType:
      enum:
        - git
        - deployRepo
      type: string
    DeploymentSettingsTemplate:
      enum:
        - single
        - simpleCluster
        - multiCluster
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````