Update a prompt version

Update a prompt version. Set deploy: true to make this version live immediately.

Authentication

AuthorizationBearer

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.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Path parameters

prompt_idstringRequired
The unique prompt identifier.
versionintegerRequired
The prompt version number.

Request

This endpoint expects an object.
descriptionstringOptional
Version description.
messageslist of objectsOptional

Messages for this version. Use {{variable_name}} placeholders for template variables.

thinkingobject or nullOptional

Optional provider-specific reasoning configuration.

modelstringOptional
Primary model for this version.
streambooleanOptionalDefaults to false
Whether to stream responses.
temperaturedoubleOptional

Sampling temperature (0-2).

max_tokensintegerOptional
Maximum tokens to generate.
top_pdoubleOptional
Nucleus sampling parameter.
frequency_penaltydoubleOptional

Frequency penalty (-2 to 2).

presence_penaltydoubleOptional

Presence penalty (-2 to 2).

reasoning_effortstring or nullOptional
verbositystring or nullOptional
seedinteger or nullOptional
variablesobjectOptional
Template variables and their default values.
fallback_modelslist of stringsOptional
Fallback models if the primary model fails.
load_balance_modelslist of objectsOptional

Weighted load-balancing model configuration.

toolslist of objectsOptional
Tools available to the model.
tool_choicestring or map from strings to anyOptional
response_formatobject or nullOptional

Structured output / response format configuration.

json_schemaobject or nullOptional
JSON schema used for structured outputs when configured.
is_enforcing_response_formatbooleanOptionalDefaults to false
Whether to strictly enforce the response format.
deploybooleanOptionalDefaults to false
Deploy this version as the live version immediately.

Response

Prompt version updated successfully.
idstringOptional
prompt_version_idstringOptional
versionintegerOptional
descriptionstring or nullOptional
messageslist of objectsOptional
thinkingobject or nullOptional
modelstringOptional
streambooleanOptional
temperaturedouble or nullOptional
max_tokensinteger or nullOptional
top_pdouble or nullOptional
frequency_penaltydouble or nullOptional
presence_penaltydouble or nullOptional
reasoning_effortstring or nullOptional
verbositystring or nullOptional
seedinteger or nullOptional
variablesobjectOptional
fallback_modelslist of strings or nullOptional
load_balance_modelslist of objects or nullOptional
toolslist of objects or nullOptional
tool_choicestring or map from strings to anyOptional
response_formatobject or nullOptional
json_schemaobject or nullOptional
is_enforcing_response_formatbooleanOptional
readonlybooleanOptional
is_deployedbooleanOptional
edited_byobjectOptional
created_atdatetimeOptional
updated_atdatetimeOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error