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

# List versions for a prompt

> Returns paginated version snapshots for a prompt the caller owns or has acquired as an editable reference. Each item is a summary (preview, displayVersion, label, source) and is marked as matchesCurrentPrompt when its text equals the live prompt.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/prompts/{promptId}/versions
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/prompts/{promptId}/versions:
    get:
      tags:
        - Prompts
      summary: List versions for a prompt
      description: >-
        Returns paginated version snapshots for a prompt the caller owns or has
        acquired as an editable reference. Each item is a summary (preview,
        displayVersion, label, source) and is marked as matchesCurrentPrompt
        when its text equals the live prompt.
      operationId: get_prompts_versions
      parameters:
        - in: path
          name: promptId
          required: true
          schema:
            type: string
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - in: query
          name: skip
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: Versions returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptVersionListResponse'
        '403':
          description: Prompt not found or not accessible by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptErrorResponse'
        '404':
          description: Prompt not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    PromptVersionListResponse:
      type: object
      properties:
        versions:
          type: array
          items:
            $ref: '#/components/schemas/PromptVersionSummary'
        total:
          type: integer
        limit:
          type: integer
        skip:
          type: integer
      required:
        - versions
        - total
        - limit
        - skip
      additionalProperties: true
      example:
        versions:
          - _id: 65f9b1c2e8a1d4e001a0b1c3
            version: 4
            displayVersion: v1.3
            source: manual_save
            createdAt: '2026-04-22T10:14:00.000Z'
            matchesCurrentPrompt: true
            preview: <prompt>...
        total: 7
        limit: 20
        skip: 0
    PromptErrorResponse:
      type: object
      description: Generic error envelope returned by Prompt endpoints.
      properties:
        error:
          type: string
        details:
          type: string
      required:
        - error
      additionalProperties: true
      example:
        error: Prompt not found
        details: No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user.
    PromptVersionSummary:
      type: object
      properties:
        _id:
          type: string
        version:
          type: integer
        label:
          type: string
          nullable: true
        displayVersion:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        source:
          type: string
          enum:
            - manual_save
            - ai_apply
            - checkpoint
        createdAt:
          type: string
          format: date-time
        matchesCurrentPrompt:
          type: boolean
        preview:
          type: string
      additionalProperties: true
      example:
        _id: 65f9b1c2e8a1d4e001a0b1c3
        version: 4
        label: Friendlier tone
        displayVersion: v1.3
        title: Tone update
        description: Softened the opening line.
        source: manual_save
        createdAt: '2026-04-22T10:14:00.000Z'
        matchesCurrentPrompt: true
        preview: <prompt><role>Leasing assistant</role>...
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````