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

# Get Prompt Versions

> Retrieve all versions of a specific prompt

## Overview

Get all versions of a specific prompt, sorted by version number in descending order (newest first). Useful for auditing prompt changes or rolling back to a previous version.

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your eigi.ai API key. Must be prefixed with `vk_`.
</ParamField>

## Path Parameters

<ParamField path="prompt_name" type="string" required>
  The unique prompt name.

  Example: `customer_support_v1`
</ParamField>

## Response

<ResponseField name="prompt_name" type="string">
  The prompt name.
</ResponseField>

<ResponseField name="versions" type="array">
  Array of version objects sorted by version number (descending).

  Each version contains:

  * `prompt_version` (integer): Version number
  * `prompt_content` (string): The prompt text content
  * `created_at` (string): ISO 8601 timestamp when this version was created
</ResponseField>

<ResponseField name="total_versions" type="integer">
  Total number of versions for this prompt.
</ResponseField>


## OpenAPI

````yaml GET /v1/public/prompts/{prompt_name}/versions
openapi: 3.0.0
info:
  title: eigi.ai API
  description: REST API for managing AI voice agents and conversations
  version: 1.0.0
  contact:
    email: buddy@eigi.ai
    url: https://eigi.ai
servers:
  - url: https://api.eigi.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v1/public/prompts/{prompt_name}/versions:
    get:
      tags:
        - Prompts
      summary: Get Prompt Versions
      description: >-
        Retrieve all versions of a specific prompt, sorted by version number
        (descending).
      operationId: getPromptVersions
      parameters:
        - name: prompt_name
          in: path
          required: true
          description: The unique prompt name
          schema:
            type: string
          example: customer_support_v1
      responses:
        '200':
          description: Successfully retrieved prompt versions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptVersionsResponse'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PromptVersionsResponse:
      type: object
      properties:
        prompt_name:
          type: string
          description: Prompt name
        versions:
          type: array
          items:
            type: object
            properties:
              prompt_version:
                type: integer
                description: Version number
              prompt_content:
                type: string
                description: Prompt text content
              created_at:
                type: string
                format: date-time
                description: Version creation timestamp
          description: List of all versions (sorted by version descending)
        total_versions:
          type: integer
          description: Total number of versions
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your API key from the eigi.ai Dashboard
        under Settings â†’ API Keys.

````