> ## Documentation Index
> Fetch the complete documentation index at: https://cubed3-pavel-claude-elegant-dirac-88avqw.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Promote and publish a workbook

Promote the current workbook atomically if its source hash still matches the preview. Repeated promotions update the linked copy, including its deployment-scoped slug. Override replaces destination edits, never source validation or permissions. An idempotency key makes retries safe.


## OpenAPI

````yaml /api-reference/api.yaml post /api/v1/deployments/{deploymentId}/workbooks/{workbookId}/promotions
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: Databricks Metric View Publication
  - name: Databricks Metric View Integration
  - name: Folders
  - name: Reports
  - name: External Documents
  - name: Workbooks
  - name: Workbook Promotions
  - name: Dashboard Exports
  - name: Notifications
  - name: Workspace
  - name: Users
  - name: Users Admin
  - name: Roles
  - 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: Usage Analytics
  - name: OpenAPI Spec
paths:
  /api/v1/deployments/{deploymentId}/workbooks/{workbookId}/promotions:
    post:
      tags:
        - Workbook Promotions
      summary: Promote and publish a workbook
      operationId: promoteWorkbook
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: number
        - in: path
          name: workbookId
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyWorkbookPromotionInput'
        description: ApplyWorkbookPromotionInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkbookPromotionDto'
          description: ''
components:
  schemas:
    ApplyWorkbookPromotionInput:
      properties:
        expectedDestinationHash:
          oneOf:
            - pattern: ^[a-f0-9]{64}$
              type: string
            - type: 'null'
        expectedSourceHash:
          pattern: ^[a-f0-9]{64}$
          type: string
        idempotencyKey:
          format: uuid
          type: string
        override:
          oneOf:
            - type: boolean
            - type: 'null'
        targetDeploymentId:
          minimum: 1
          type: integer
        targetFolderId:
          oneOf:
            - minimum: 1
              type: integer
            - type: 'null'
      required:
        - targetDeploymentId
        - expectedSourceHash
        - idempotencyKey
      type: object
    WorkbookPromotionDto:
      properties:
        completedAt:
          oneOf:
            - format: date
              type: string
            - format: date-time
              type: string
        destinationChangedSincePreview:
          type: boolean
        destinationWasDiverged:
          type: boolean
        id:
          type: integer
        linkId:
          type: integer
        outcome:
          $ref: '#/components/schemas/WorkbookPromotionDtoOutcome'
        overrideRequested:
          type: boolean
        performedBy:
          $ref: '#/components/schemas/PromotionActorDto'
        source:
          oneOf:
            - $ref: '#/components/schemas/PromotionReferenceDto'
            - type: 'null'
        target:
          oneOf:
            - $ref: '#/components/schemas/PromotionReferenceDto'
            - type: 'null'
        targetDashboardVersionId:
          type: integer
      required:
        - id
        - linkId
        - completedAt
        - outcome
        - performedBy
        - overrideRequested
        - destinationWasDiverged
        - destinationChangedSincePreview
        - targetDashboardVersionId
      type: object
    WorkbookPromotionDtoOutcome:
      enum:
        - created
        - updated
        - unchanged
      type: string
    PromotionActorDto:
      properties:
        apiKeyId:
          oneOf:
            - type: integer
            - type: 'null'
        authenticationMethod:
          $ref: '#/components/schemas/PromotionActorDtoAuthenticationMethod'
        displayName:
          type: string
        userId:
          type: integer
      required:
        - userId
        - displayName
        - authenticationMethod
      type: object
    PromotionReferenceDto:
      properties:
        availability:
          $ref: '#/components/schemas/PromotionReferenceDtoAvailability'
        deploymentId:
          oneOf:
            - type: integer
            - type: 'null'
        name:
          oneOf:
            - type: string
            - type: 'null'
        workbookId:
          oneOf:
            - type: integer
            - type: 'null'
      required:
        - availability
      type: object
    PromotionActorDtoAuthenticationMethod:
      enum:
        - session
        - apiKey
      type: string
    PromotionReferenceDtoAvailability:
      enum:
        - available
        - unavailable
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````