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

# List messages of a prompt version

> Returns the non-deleted messages attached to a prompt version, ordered by `index`. A version normally holds a single `system` message that carries the prompt content; the same object is exposed as `message` on the version resources.



## OpenAPI

````yaml GET /prompt-version-message
openapi: 3.0.1
info:
  title: Tela API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tela.com
security: []
paths:
  /prompt-version-message:
    get:
      tags:
        - Prompt Version Message
      summary: List messages of a prompt version
      description: >
        Returns the non-deleted messages attached to a prompt version, ordered
        by `index`. A version normally holds a

        single `system` message that carries the prompt content; the same object
        is exposed as `message` on the

        version resources.
      parameters:
        - name: promptVersionId
          in: query
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Messages of the version.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VersionMessageResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Missing or invalid credentials, or no access to the version'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: >-
            Version not found (or it belongs to a personal draft owned by
            someone else).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Query parameters failed validation (missing `promptVersionId`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    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
    Error: {}
  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.