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

# Query Prompt Versions

> Search through versions of a specific prompt



## OpenAPI

````yaml post /v1/prompt/{promptId}/versions/query
openapi: 3.0.0
info:
  title: helicone-api
  version: 1.0.0
  license:
    name: MIT
  contact: {}
servers:
  - url: https://api.helicone.ai/
  - url: http://localhost:8585/
security: []
paths:
  /v1/prompt/{promptId}/versions/query:
    post:
      tags:
        - Prompt
      operationId: GetPromptVersions
      parameters:
        - in: path
          name: promptId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptVersionsQueryParams'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Result_PromptVersionResult-Array.string_'
      security:
        - api_key: []
components:
  schemas:
    PromptVersionsQueryParams:
      properties:
        filter:
          $ref: '#/components/schemas/PromptVersionsFilterNode'
        includeExperimentVersions:
          type: boolean
      type: object
      additionalProperties: false
    Result_PromptVersionResult-Array.string_:
      anyOf:
        - $ref: '#/components/schemas/ResultSuccess_PromptVersionResult-Array_'
        - $ref: '#/components/schemas/ResultError_string_'
    PromptVersionsFilterNode:
      anyOf:
        - $ref: '#/components/schemas/FilterLeafSubset_prompts_versions_'
        - $ref: '#/components/schemas/PromptVersionsFilterBranch'
        - type: string
          enum:
            - all
    ResultSuccess_PromptVersionResult-Array_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PromptVersionResult'
          type: array
        error:
          type: number
          enum:
            - null
          nullable: true
      required:
        - data
        - error
      type: object
      additionalProperties: false
    ResultError_string_:
      properties:
        data:
          type: number
          enum:
            - null
          nullable: true
        error:
          type: string
      required:
        - data
        - error
      type: object
      additionalProperties: false
    FilterLeafSubset_prompts_versions_:
      $ref: '#/components/schemas/Pick_FilterLeaf.prompts_versions_'
    PromptVersionsFilterBranch:
      properties:
        right:
          $ref: '#/components/schemas/PromptVersionsFilterNode'
        operator:
          type: string
          enum:
            - or
            - and
        left:
          $ref: '#/components/schemas/PromptVersionsFilterNode'
      required:
        - right
        - operator
        - left
      type: object
    PromptVersionResult:
      properties:
        id:
          type: string
        minor_version:
          type: number
          format: double
        major_version:
          type: number
          format: double
        prompt_v2:
          type: string
        model:
          type: string
        helicone_template:
          type: string
        created_at:
          type: string
        metadata:
          $ref: '#/components/schemas/Record_string.any_'
        parent_prompt_version:
          type: string
          nullable: true
        experiment_id:
          type: string
          nullable: true
        updated_at:
          type: string
      required:
        - id
        - minor_version
        - major_version
        - prompt_v2
        - model
        - helicone_template
        - created_at
        - metadata
      type: object
      additionalProperties: false
    Pick_FilterLeaf.prompts_versions_:
      properties:
        prompts_versions:
          $ref: '#/components/schemas/Partial_PromptVersionsToOperators_'
      type: object
      description: From T, pick a set of properties whose keys are in the union K
    Record_string.any_:
      properties: {}
      additionalProperties: {}
      type: object
      description: Construct a type with a set of properties K of type T
    Partial_PromptVersionsToOperators_:
      properties:
        minor_version:
          $ref: '#/components/schemas/Partial_NumberOperators_'
        major_version:
          $ref: '#/components/schemas/Partial_NumberOperators_'
        id:
          $ref: '#/components/schemas/Partial_TextOperators_'
        prompt_v2:
          $ref: '#/components/schemas/Partial_TextOperators_'
      type: object
      description: Make all properties in T optional
    Partial_NumberOperators_:
      properties:
        not-equals:
          type: number
          format: double
        equals:
          type: number
          format: double
        gte:
          type: number
          format: double
        lte:
          type: number
          format: double
        lt:
          type: number
          format: double
        gt:
          type: number
          format: double
      type: object
      description: Make all properties in T optional
    Partial_TextOperators_:
      properties:
        not-equals:
          type: string
        equals:
          type: string
        like:
          type: string
        ilike:
          type: string
        contains:
          type: string
        not-contains:
          type: string
      type: object
      description: Make all properties in T optional
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
      description: 'Bearer token authentication. Format: ''Bearer YOUR_API_KEY'''

````

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