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

# Create a prompt version checkpoint

> Snapshots the prompt text into a new immutable version. If prompt text is omitted, the current prompt body is used. Returns the new version document; if the text is unchanged from the latest version, the request is treated as a no-op and skipped is true.



## OpenAPI

````yaml /api-reference/openapi.yaml post /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:
    post:
      tags:
        - Prompts
      summary: Create a prompt version checkpoint
      description: >-
        Snapshots the prompt text into a new immutable version. If prompt text
        is omitted, the current prompt body is used. Returns the new version
        document; if the text is unchanged from the latest version, the request
        is treated as a no-op and skipped is true.
      operationId: post_prompts_version_checkpoint
      parameters:
        - in: path
          name: promptId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptVersionCheckpointRequest'
      responses:
        '201':
          description: Version saved (or no-op when unchanged)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptVersionCheckpointResponse'
        '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:
    PromptVersionCheckpointRequest:
      type: object
      properties:
        prompt:
          type: string
          description: Optional override; defaults to current prompt body when omitted
        label:
          type: string
        displayVersion:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        source:
          type: string
          enum:
            - manual_save
            - ai_apply
            - checkpoint
      additionalProperties: true
      example:
        label: Pre-launch checkpoint
        displayVersion: v1.4
        title: Pre-launch
        description: Snapshot before rolling out to production.
        source: manual_save
    PromptVersionCheckpointResponse:
      type: object
      properties:
        message:
          type: string
        skipped:
          type: boolean
        version:
          type: integer
        versionId:
          type: string
        versionSnapshot:
          $ref: '#/components/schemas/PromptVersionSummary'
      additionalProperties: true
      example:
        message: Version saved
        skipped: false
        version: 5
        versionId: 65f9b1c2e8a1d4e001a0b1c4
    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

````