Get a prompt
https://api.respan.ai/api/prompts/{prompt_id}/Returns the prompt template with its current and live versions.
Servers
https://api.respan.ai: Respan API Server
Authentication
RespanApiKey
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.
HTTP scheme: bearer; format: Respan API key.
Authorization: Bearer $RESPAN_API_KEYOr:
DashboardJwt
Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.
HTTP scheme: bearer; format: Dashboard JWT.
Authorization: Bearer $RESPAN_DASHBOARD_JWTPath parameters
prompt_id string RequiredResponses
200
Prompt details.
application/json
$ object Body
{"id":"prompt_abc123","name":"Customer Support Assistant","description":"Handles customer support queries with empathy","prompt_slug":"customer-support-assistant","tags":[{"id":"tag_abc123","name":"support","color":"#3B82F6","created_at":"2026-01-01T00:00:00Z","updated_at":"2026-01-01T00:00:00Z"}],"current_version":{"version":3,"model":"gpt-4o","updated_at":"2026-01-20T10:30:00Z"},"live_version":{"version":2,"model":"gpt-4o-mini","updated_at":"2026-01-15T08:00:00Z"},"created_at":"2026-01-01T00:00:00Z","updated_at":"2026-01-20T10:30:00Z"}id string Optionalname string Optionaldescription string or null Optionalprompt_slug string or null Optionaltags array<object> Optional
tags[] object Array item
tags[].id string Optionaltags[].name string Optionaltags[].color string Optionaltags[].created_at string Optionaldate-timetags[].updated_at string Optionaldate-timecurrent_version object or null Optional
current_version.version integer Optionalcurrent_version.model string Optionalcurrent_version.updated_at string Optionaldate-timelive_version object or null Optional
null until a version is deployed.live_version.version integer Optionallive_version.model string Optionallive_version.updated_at string Optionaldate-timeOpenAPI response schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique prompt identifier."
},
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"prompt_slug": {
"type": "string",
"nullable": true
},
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
},
"current_version": {
"type": "object",
"nullable": true,
"properties": {
"version": {
"type": "integer"
},
"model": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"description": "The prompt's current version, as the full version object that Get a prompt version returns."
},
"live_version": {
"type": "object",
"nullable": true,
"properties": {
"version": {
"type": "integer"
},
"model": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"description": "The deployed version, as the full version object that Get a prompt version returns. `null` until a version is deployed."
}
},
"example": {
"id": "prompt_abc123",
"name": "Customer Support Assistant",
"description": "Handles customer support queries with empathy",
"prompt_slug": "customer-support-assistant",
"tags": [
{
"id": "tag_abc123",
"name": "support",
"color": "#3B82F6",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}
],
"current_version": {
"version": 3,
"model": "gpt-4o",
"updated_at": "2026-01-20T10:30:00Z"
},
"live_version": {
"version": 2,
"model": "gpt-4o-mini",
"updated_at": "2026-01-15T08:00:00Z"
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-20T10:30:00Z"
}
}403
The API key is missing, invalid or expired.
application/json
$ object Body
detail string Required in parentOpenAPI response schema
{
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
}Example
{
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}404
Prompt not found
application/json
$ object Body
detail string Required in parentOpenAPI response schema
{
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
}Example
{
"detail": "Prompt not found"
}OpenAPI source
The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.
OpenAPI operation
{
"summary": "Get a prompt",
"operationId": "retrievePrompt",
"tags": [
"Prompts"
],
"description": "Returns the prompt template with its current and live versions.",
"parameters": [
{
"name": "prompt_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The unique prompt identifier."
}
],
"responses": {
"200": {
"description": "Prompt details.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique prompt identifier."
},
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"prompt_slug": {
"type": "string",
"nullable": true
},
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
},
"current_version": {
"type": "object",
"nullable": true,
"properties": {
"version": {
"type": "integer"
},
"model": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"description": "The prompt's current version, as the full version object that Get a prompt version returns."
},
"live_version": {
"type": "object",
"nullable": true,
"properties": {
"version": {
"type": "integer"
},
"model": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"description": "The deployed version, as the full version object that Get a prompt version returns. `null` until a version is deployed."
}
},
"example": {
"id": "prompt_abc123",
"name": "Customer Support Assistant",
"description": "Handles customer support queries with empathy",
"prompt_slug": "customer-support-assistant",
"tags": [
{
"id": "tag_abc123",
"name": "support",
"color": "#3B82F6",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}
],
"current_version": {
"version": 3,
"model": "gpt-4o",
"updated_at": "2026-01-20T10:30:00Z"
},
"live_version": {
"version": 2,
"model": "gpt-4o-mini",
"updated_at": "2026-01-15T08:00:00Z"
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-20T10:30:00Z"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/InvalidApiKey"
},
"404": {
"description": "Prompt not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"example": {
"detail": "Prompt not found"
}
}
}
}
},
"security": [
{
"RespanApiKey": []
},
{
"DashboardJwt": []
}
]
}OpenAPI path metadata
{}Referenced OpenAPI components
{
"responses": {
"InvalidApiKey": {
"description": "The API key is missing, invalid or expired.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"example": {
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
}
}
}
},
"securitySchemes": {
"DashboardJwt": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "Dashboard JWT",
"description": "Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.",
"x-fern-bearer": {
"name": "dashboardJwt",
"env": "RESPAN_DASHBOARD_JWT"
}
},
"RespanApiKey": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "Respan API key",
"description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
"x-fern-bearer": {
"name": "respanApiKey",
"env": "RESPAN_API_KEY"
}
}
}
}