Appearance
GET /v1/prompts/:promptId/versions
Summary
This endpoint returns a list of published versions for a given prompt. It always returns the most recent versions first and is limited to 10 entries. Each entry contains the version's identifier, publication timestamp and a flag indicating whether it is the latest.
HTTP Request
http
GET /v1/prompts/:promptId/versionsPath parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
promptId | string | Yes | Identifier for the published prompt. |
Response
Success (200 OK)
When the prompt exists, the server returns a JSON object whose status is "SUCCESS" and a data field containing the prompt metadata.
| Field | Type | Description |
|---|---|---|
promptId | string | Identifier of the prompt. |
title | string | Title of the prompt. |
versions | array of versions | Up to 10 published versions. |
versions[].promptVersionId | string | Identifier of a prompt version. |
versions[].publishedAt | string (ISO 8601) | Timestamp published. |
versions[].isLatest | true | undefined | Present and true for latest. |
Example response
json
{
"status": "SUCCESS",
"data": {
"promptId": "01234567-89ab-cdef-0123-456789abcdef",
"title": "Image caption generator",
"versions": [
{
"promptVersionId": "aaaa1111-bbbb-cccc-dddd-eeee1111ffff",
"publishedAt": "2025-08-27T12:34:56.789Z",
"isLatest": true
},
{
"promptVersionId": "99998888-7777-6666-5555-444433332222",
"publishedAt": "2025-07-15T08:20:10.123Z"
}
]
}
}Error responses
| HTTP status | status code | Description |
|---|---|---|
422 | VALIDATION_ERROR | Invalid UUID. |
404 | NOT_FOUND_ERROR | Prompt not found or no versions exist. |
See also
- Get prompt metadata:
GET /v1/prompts/:promptId - Run a prompt:
POST /v1/runs