> ## 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.

# Create deployment environment token for meta sync



## OpenAPI

````yaml /api-reference/api.yaml post /v1/deployments/{deploymentId}/environments/{environmentId}/tokens-for-meta-sync
openapi: 3.1.0
info:
  title: Cube Cloud REST API
  version: 1.0.0
  description: >-
    Programmatically manage Cube Cloud: deployments and everything scoped to
    them

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

    plus account-level users, groups, policies, embedding, and AI settings.
servers:
  - url: https://{tenant}.cubecloud.dev/api
    description: >-
      Cube Cloud API base URL. Replace the whole host if you use a custom
      domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube Cloud tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Environments
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Notifications
  - name: Workspace
  - name: Embed
  - name: Embed Tenants
paths:
  /v1/deployments/{deploymentId}/environments/{environmentId}/tokens-for-meta-sync:
    post:
      tags:
        - Environments
      summary: Create deployment environment token for meta sync
      operationId: createDeploymentEnvironmentTokenForMetaSync
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: integer
        - in: path
          name: environmentId
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDeploymentEnvironmentTokenInput'
        description: CreateDeploymentEnvironmentTokenInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentEnvironmentTokenResponse'
          description: ''
components:
  schemas:
    CreateDeploymentEnvironmentTokenInput:
      properties:
        expires_in:
          oneOf:
            - maximum: 3600
              type: integer
              minimum: 1
            - type: 'null'
        scopes:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
        security_context:
          additionalProperties: true
          not:
            type: 'null'
          type: object
      required:
        - security_context
      type: object
    DeploymentEnvironmentTokenResponse:
      properties:
        data:
          $ref: '#/components/schemas/DeploymentEnvironmentToken'
      required:
        - data
      type: object
    DeploymentEnvironmentToken:
      properties:
        created_at:
          type: string
        expires_at:
          type: string
        security_context:
          type: object
          additionalProperties: true
        token:
          type: string
      required:
        - token
        - security_context
        - created_at
        - expires_at
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````