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

# List Prompt Versions

> List versions for a prompt.



## OpenAPI

````yaml /openapi.yaml get /workspaces/{workspaceId}/prompts/{promptId}/versions
openapi: 3.1.0
info:
  title: Actx0 API
  version: 1.0.0
  description: >-
    REST API for Actx0 workspaces, access keys, agents, sessions, messages,
    memories, prompts, and knowledge documents.


    Authenticate with `X-Access-Key` (workspace), `X-API-Key` (user), or a
    dashboard session.
servers:
  - url: https://app.actx0.com/api/v1
    description: Actx0 cloud
security: []
tags:
  - name: Me
    description: Inspect the authenticated access key or API key
  - name: API Keys
    description: User API keys for X-API-Key auth
  - name: Workspaces
    description: Team workspaces
  - name: Access Keys
    description: Scoped workspace keys for agents and SDKs
  - name: Agents
    description: Agents inside a workspace
  - name: Sessions
    description: Agent conversation sessions
  - name: Messages
    description: Session messages and semantic search
  - name: Memories
    description: Session memories, search, batch, and regenerate
  - name: Prompts
    description: Versioned prompts
  - name: Knowledge
    description: Document upload and semantic search
paths:
  /workspaces/{workspaceId}/prompts/{promptId}/versions:
    get:
      tags:
        - Prompts
      summary: List Prompt Versions
      description: List versions for a prompt.
      operationId: listPromptVersions
      parameters:
        - $ref: '#/components/parameters/WorkspaceId'
        - $ref: '#/components/parameters/PromptId'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptVersionList'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          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:
        - AccessKeyAuth: []
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl / acli
          source: >
            curl -X GET
            'https://app.actx0.com/api/v1/workspaces/<workspaceId>/prompts/<promptId>/versions'
            \
              -H "X-Access-Key: YOUR_ACCESS_KEY" \
              -H "Accept: application/json"

            # ---


            # acli

            export ACTX0_ACCESS_KEY="YOUR_ACCESS_KEY"

            export ACTX0_WORKSPACE_ID="YOUR_WORKSPACE_ID"


            acli prompt versions list PROMPT_ID
        - lang: python
          label: pctx0
          source: >
            from pctx0 import Pctx0Client


            client = Pctx0Client(
                access_key="YOUR_ACCESS_KEY",
                workspace_id="YOUR_WORKSPACE_ID",
            )


            versions = client.prompt.list_versions("PROMPT_ID", limit=50,
            offset=0)
        - lang: javascript
          label: nctx0
          source: >
            import { Nctx0Client } from "@actx0/nctx0";


            const client = new Nctx0Client({
              accessKey: "YOUR_ACCESS_KEY",
              workspaceId: "YOUR_WORKSPACE_ID",
            });


            const versions = await client.prompt.listVersions("PROMPT_ID", {
            limit: 50, offset: 0 });
        - lang: go
          label: gtcx0
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/Actx0/Gctx0\"\n)\n\nfunc main() {\n\tclient := gctx0.NewClient(\n\t\tgctx0.WithAccessKey(\"YOUR_ACCESS_KEY\"),\n\t\tgctx0.WithWorkspaceId(\"YOUR_WORKSPACE_ID\"),\n\t)\n\tdefer client.Close()\n\tctx := context.Background()\n\tversions, err := client.Prompt.ListVersions(ctx, \"PROMPT_ID\", 50, 0)\n\t_ = versions\n\t_ = err\n}\n"
components:
  parameters:
    WorkspaceId:
      name: workspaceId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      example: 11111111-1111-1111-1111-111111111111
    PromptId:
      name: promptId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      example: 66666666-6666-6666-6666-666666666666
    Limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
      description: Page size. Defaults to 50, max 100.
    Offset:
      name: offset
      in: query
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
      description: Number of items to skip.
  schemas:
    PromptVersionList:
      type: object
      required:
        - versions
        - _meta
      properties:
        versions:
          type: array
          items:
            $ref: '#/components/schemas/PromptVersion'
        _meta:
          $ref: '#/components/schemas/PaginationMeta'
    Error:
      type: object
      required:
        - errorMessage
      properties:
        errorMessage:
          type: string
          example: Name is required
    PromptVersion:
      type: object
      required:
        - id
        - name
        - handle
        - description
        - version
        - type
        - content
        - commitHash
        - status
        - production
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          example: 77777777-7777-7777-7777-777777777777
        name:
          type: string
          example: Support system prompt
        handle:
          type: string
          example: support-system-prompt
        description:
          type: string
        version:
          type: integer
          example: 1
        type:
          type: string
          enum:
            - text
            - chat
          example: text
        content:
          type: string
          example: You are a helpful support agent.
        config: {}
        labels:
          type: array
          items:
            type: string
          example:
            - latest
        commitMessage:
          type: string
          example: Initial version
        commitHash:
          type: string
          example: a1b2c3d
        meta:
          type: string
        status:
          type: string
          example: active
        production:
          type: boolean
          example: true
        createdAt:
          type: string
          format: date-time
          example: '2026-07-01T12:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-07-01T12:00:00Z'
    PaginationMeta:
      type: object
      required:
        - limit
        - offset
        - total
      properties:
        limit:
          type: integer
          example: 50
        offset:
          type: integer
          example: 0
        total:
          type: integer
          example: 12
  securitySchemes:
    AccessKeyAuth:
      type: apiKey
      in: header
      name: X-Access-Key
      description: Workspace access key for agent/runtime integrations.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: User API key for management and automation.

````