Skip to main content
POST
Retrieves all versions of a specific prompt, optionally filtered by major version.

Request Body

string
required
The unique identifier of the prompt
number
Optional filter to return only versions with this major version number

Response

array
Array of prompt version objects
string | null
Error message if the request failed, null otherwise

Version Numbering

Prompt versions use semantic versioning:
  • Major version: Breaking changes or complete rewrites (e.g., 1.x → 2.x)
  • Minor version: Incremental updates and improvements (e.g., 2.0 → 2.1)
Versions are returned in descending order (newest first).

Getting the Full Prompt Body

The versions endpoint returns metadata only. To get the full prompt body including messages, use:
  • GET /v1/prompt-2025/{promptVersionId}/prompt-body - Get prompt body for a specific version
  • POST /v2/prompt-2025/query/version - Get version with body included
See the Get Prompt Body endpoint for details.

Environment Management

Versions can be associated with environments (e.g., “production”, “staging”, “development”). Use these endpoints to manage environments:
  • POST /v1/prompt-2025/update/environment - Assign a version to an environment
  • POST /v1/prompt-2025/remove/environment - Remove a version from an environment
  • POST /v1/prompt-2025/query/environment-version - Get the version for a specific environment