Skip to main content
GET
/
v1
/
prompts
/
:owner
/
:name
/
versions
List Versions
curl --request GET \
  --url https://api.example.com/v1/prompts/:owner/:name/versions
{
  "items": [
    {
      "items[].id": "<string>",
      "items[].prompt_id": "<string>",
      "items[].version": "<string>",
      "items[].tarball_url": "<string>",
      "items[].created_at": "<string>"
    }
  ],
  "404 Not Found": {},
  "500 Internal Server Error": {}
}

Overview

Fetch a list of all versions for a prompt identified by its owner and name. Versions are returned with the most recently created versions first.

Authentication

This endpoint does not require authentication for public prompts.

Request

Path Parameters

owner
string
required
The username or identifier of the prompt owner
name
string
required
The name of the prompt

Response

items
array
Array of version objects for the prompt
items[].id
string
Unique identifier for the version (UUID)
items[].prompt_id
string
The ID of the prompt this version belongs to
items[].version
string
The semantic version number (e.g., 1.0.0, 2.3.15)
items[].tarball_url
string
Storage key/path for the version’s tarball
items[].created_at
string
ISO 8601 timestamp of when the version was created

Examples

curl https://api.prompts.dev/v1/prompts/alice/code-review/versions

Response Example

200 OK
{
  "items": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440002",
      "prompt_id": "abc123",
      "version": "2.1.0",
      "tarball_url": "alice/code-review/2.1.0.tar.gz",
      "created_at": "2026-03-10T15:30:00Z"
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "prompt_id": "abc123",
      "version": "2.0.0",
      "tarball_url": "alice/code-review/2.0.0.tar.gz",
      "created_at": "2026-03-05T10:15:00Z"
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "prompt_id": "abc123",
      "version": "1.0.0",
      "tarball_url": "alice/code-review/1.0.0.tar.gz",
      "created_at": "2026-03-01T08:00:00Z"
    }
  ]
}
200 OK (Empty)
{
  "items": []
}

Error Responses

404 Not Found
error
Prompt with the specified owner and name does not exist
{
  "error": "NOT_FOUND",
  "message": "prompt not found"
}
500 Internal Server Error
error
Failed to fetch versions from the database
{
  "error": "INTERNAL_ERROR",
  "message": "failed to fetch versions"
}

Notes

Version Ordering: Versions are returned in reverse chronological order (newest first) based on the created_at timestamp, not by semantic version number.
Empty Results: If a prompt has no versions, an empty array is returned with a 200 status code.
Public Access: This endpoint is publicly accessible for public prompts. Private prompts may require authentication.

Build docs developers (and LLMs) love