Skip to content

GET /v1/prompts/:promptId

Summary

This endpoint retrieves metadata about a published prompt. By default, it returns the latest published version; you can request a specific version by providing the optional versionId query parameter. The response includes the prompt's version identifier, title, publication timestamp, and input configuration.

HTTP Request

http
GET /v1/prompts/:promptId?versionId=<versionId>

Path parameters

ParameterTypeRequiredDescription
promptIdstringYesUnique identifier for the published prompt.

Query parameters

ParameterTypeRequiredDescription
versionIdstringNoIdentifier of a specific prompt version. When omitted, the latest published version is returned.

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.

FieldTypeDescription
promptVersionIdstringIdentifier of the returned prompt version.
promptIdstringIdentifier of the published prompt.
titlestringHuman-readable title of the prompt.
publishedAtstring (ISO 8601)Timestamp when the version was published.
configobjectInput configuration metadata for the prompt.

Example response

json
{
  "status": "SUCCESS",
  "data": {
    "promptVersionId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "promptId": "01234567-89ab-cdef-0123-456789abcdef",
    "title": "Image caption generator",
    "publishedAt": "2025-08-27T12:34:56.789Z",
    "config": {}
  }
}

Error responses

HTTP statusstatus codeDescription
422VALIDATION_ERRORInvalid UUID or parameters.
404NOT_FOUND_ERRORThe prompt/version does not exist.

See also