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

# Get the promoted (production) version of a canvas

> Resolves the version that is currently live for the canvas: the version published to the system `production` environment, falling back to the most recently updated version flagged `promoted: true` for canvases that predate environments.



## OpenAPI

````yaml GET /prompt/{id}/promoted-version
openapi: 3.0.1
info:
  title: Tela API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tela.com
security: []
paths:
  /prompt/{id}/promoted-version:
    get:
      tags:
        - Prompt Version
      summary: Get the promoted (production) version of a canvas
      description: >
        Resolves the version that is currently live for the canvas: the version
        published to the system

        `production` environment, falling back to the most recently updated
        version flagged `promoted: true` for

        canvases that predate environments. The response includes the version's
        active `environments`.


        This replaces the deprecated `GET /prompt-version?promptId=` listing for
        the "which version is in

        production" use case. Returns `404` when the canvas has no production or
        promoted version.
      parameters:
        - name: id
          in: path
          required: true
          description: Canvas id.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The promoted version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Missing or invalid credentials, or no access to the canvas's
            project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The project exists in the workspace but the caller's team has no
            access to it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Canvas not found, or no production/promoted version exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    VersionResponse:
      type: object
      description: >
        Full prompt version as returned by the version endpoints. `message` is
        the first message by `index`

        (normally the `system` prompt) and `messages` is the full ordered list.
        `environments` lists the

        environments the version is currently published to.
      properties:
        id:
          type: string
          format: uuid
        promptId:
          type: string
          format: uuid
        title:
          type: string
        titleLocked:
          type: boolean
          description: When `true` the title was set explicitly and is not auto-generated.
        content:
          type: string
          nullable: true
        markdownContent:
          type: string
          nullable: true
        variables:
          type: array
          items:
            $ref: '#/components/schemas/VersionVariable'
        configuration:
          $ref: '#/components/schemas/VersionConfiguration'
        promoted:
          type: boolean
          nullable: true
          description: >-
            Legacy promotion flag. Prefer `environments` to know where a version
            is live.
        draft:
          type: boolean
          nullable: true
        originVersionId:
          type: string
          format: uuid
          nullable: true
          description: >-
            Version this one was derived from through the lifecycle
            (edit/restore) operations.
        workspaceId:
          type: string
          format: uuid
        workflowSpec:
          type: string
          nullable: true
          description: Serialized workflow specification for workflow versions.
        graph:
          type: string
          nullable: true
          description: Serialized workflow graph for workflow versions.
        isWorkflow:
          type: boolean
          nullable: true
        promptCustomTags:
          type: array
          description: '`customTags` of the parent canvas.'
          items:
            type: string
        message:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/VersionMessageResponse'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/VersionMessageResponse'
        environments:
          type: array
          items:
            $ref: '#/components/schemas/VersionEnvironment'
        createdBy:
          type: string
        updatedBy:
          type: string
        deletedBy:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
        deletedAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - promptId
        - title
        - titleLocked
        - variables
        - configuration
        - workspaceId
        - message
        - messages
        - createdBy
        - updatedBy
      example:
        id: 9d2e4f6a-1b3c-4d5e-8f70-1a2b3c4d5e6f
        promptId: 5f0c1a2e-8b7d-4c3a-9e1f-2d4b6a8c0e12
        title: v12 - stricter totals
        titleLocked: false
        content: null
        markdownContent: null
        variables:
          - name: invoice
            type: file
            required: true
            processingOptions:
              allowMultimodal: true
        configuration:
          model: gpt-4.1
          temperature: 0
          type: chat
          structuredOutput:
            enabled: true
            schema:
              type: object
              title: Invoice
              description: Extracted invoice fields
              properties:
                total:
                  type: number
              required:
                - total
        promoted: true
        draft: false
        originVersionId: null
        workspaceId: 7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f
        workflowSpec: null
        graph: null
        isWorkflow: false
        promptCustomTags:
          - finance
        message:
          id: c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f
          promptVersionId: 9d2e4f6a-1b3c-4d5e-8f70-1a2b3c4d5e6f
          role: system
          content: Extract the invoice total from {{invoice}}.
          markdownContent: null
          index: 0
          createdBy: ana@example.com
          updatedBy: ana@example.com
          createdAt: '2026-08-19T09:41:00.000Z'
          updatedAt: '2026-08-19T09:41:00.000Z'
          deletedAt: null
        messages:
          - id: c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f
            promptVersionId: 9d2e4f6a-1b3c-4d5e-8f70-1a2b3c4d5e6f
            role: system
            content: Extract the invoice total from {{invoice}}.
            markdownContent: null
            index: 0
            createdBy: ana@example.com
            updatedBy: ana@example.com
            createdAt: '2026-08-19T09:41:00.000Z'
            updatedAt: '2026-08-19T09:41:00.000Z'
            deletedAt: null
        environments:
          - id: 3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b
            name: production
            isSystem: true
            publishedAt: '2026-08-19T10:00:00.000Z'
        createdBy: ana@example.com
        updatedBy: ana@example.com
        deletedBy: null
        createdAt: '2026-08-19T09:41:00.000Z'
        updatedAt: '2026-08-19T09:41:00.000Z'
        deletedAt: null
    Error: {}
    VersionVariable:
      type: object
      properties:
        id:
          type: string
          description: Optional stable identifier.
        name:
          type: string
        type:
          type: string
          enum:
            - file
            - text
            - mixed
        required:
          type: boolean
        description:
          type: string
        processingOptions:
          type: object
          properties:
            allowMultimodal:
              type: boolean
          required:
            - allowMultimodal
        content:
          type: string
      required:
        - name
        - type
        - required
    VersionConfiguration:
      type: object
      properties:
        model:
          type: string
        temperature:
          type: number
        budget_tokens:
          type: number
          description: Thinking/reasoning token budget for models that support it.
        type:
          type: string
          enum:
            - chat
            - completion
        structuredOutput:
          $ref: '#/components/schemas/VersionStructuredOutput'
        functions:
          type: array
          items:
            $ref: '#/components/schemas/VersionFunction'
      required:
        - model
        - type
    VersionMessageResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        promptVersionId:
          type: string
          format: uuid
        role:
          type: string
          enum:
            - user
            - assistant
            - system
            - function
        content:
          type: string
          nullable: true
          description: Plain-text prompt content. May use `{{variable}}` placeholders.
        markdownContent:
          type: string
          nullable: true
        index:
          type: integer
          description: >-
            Position of the message inside the version. The prompt is read from
            index 0.
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
        deletedAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - promptVersionId
        - role
        - index
        - createdBy
        - updatedBy
      example:
        id: c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f
        promptVersionId: 9d2e4f6a-1b3c-4d5e-8f70-1a2b3c4d5e6f
        role: system
        content: Extract the invoice total from {{invoice}}.
        markdownContent: null
        index: 0
        createdBy: ana@example.com
        updatedBy: ana@example.com
        createdAt: '2026-08-19T09:41:00.000Z'
        updatedAt: '2026-08-19T09:41:00.000Z'
        deletedAt: null
    VersionEnvironment:
      type: object
      description: An environment the version is currently published to.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          description: Environment name, for example `production`.
        isSystem:
          type: boolean
          description: '`true` for the built-in `production` environment.'
        publishedAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - isSystem
        - publishedAt
    VersionStructuredOutput:
      type: object
      properties:
        enabled:
          type: boolean
        citations:
          type: boolean
        citationsRationale:
          type: boolean
        schema:
          type: object
          properties:
            type:
              type: string
              enum:
                - object
            title:
              type: string
            description:
              type: string
            properties:
              type: object
              additionalProperties: true
            required:
              type: array
              items:
                type: string
          required:
            - type
            - title
            - description
            - properties
            - required
      required:
        - enabled
    VersionFunction:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        parameters:
          type: object
          properties:
            type:
              type: string
              enum:
                - object
            properties:
              type: object
              additionalProperties: true
            required:
              type: array
              items:
                type: string
          required:
            - type
            - properties
      required:
        - id
        - name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or UUID

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.