---
title: "Update a prompt version"
method: PATCH
path: "/api/prompts/{prompt_id}/versions/{version}/"
tags: ["prompts"]
---

# Update a prompt version

`PATCH /api/prompts/{prompt_id}/versions/{version}/`

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

## Path parameters

- `prompt_id` string, required
- `version` integer, required

## Headers

- `Authorization` string, required

## Request body

- object
  - `description` string — Version description.
  - `messages` ApiPromptsPromptIdVersionsVersionPatchRequestBodyContentApplicationJsonSchemaMessagesItems[] — Messages for this version. Use `{{variable_name}}` placeholders for template variables.
    - `role` string, required
    - `content` union
      - string
      - unknown[]
        - unknown
  - `thinking` ApiPromptsPromptIdVersionsVersionPatchRequestBodyContentApplicationJsonSchemaThinking — Optional provider-specific reasoning configuration.
  - `model` string — Primary model for this version.
  - `stream` boolean — Whether to stream responses.
  - `temperature` number, double — Sampling temperature (0-2).
  - `max_tokens` integer — Maximum tokens to generate.
  - `top_p` number, double — Nucleus sampling parameter.
  - `frequency_penalty` number, double — Frequency penalty (-2 to 2).
  - `presence_penalty` number, double — Presence penalty (-2 to 2).
  - `reasoning_effort` string, nullable
  - `verbosity` string, nullable
  - `seed` integer, nullable
  - `variables` ApiPromptsPromptIdVersionsVersionPatchRequestBodyContentApplicationJsonSchemaVariables — Template variables and their default values.
  - `fallback_models` string[] — Fallback models if the primary model fails.
  - `load_balance_models` ApiPromptsPromptIdVersionsVersionPatchRequestBodyContentApplicationJsonSchemaLoadBalanceModelsItems[] — Weighted load-balancing model configuration.
  - `tools` ApiPromptsPromptIdVersionsVersionPatchRequestBodyContentApplicationJsonSchemaToolsItems[] — Tools available to the model.
  - `tool_choice` union
    - string
    - object
  - `response_format` ApiPromptsPromptIdVersionsVersionPatchRequestBodyContentApplicationJsonSchemaResponseFormat — Structured output / response format configuration.
  - `json_schema` ApiPromptsPromptIdVersionsVersionPatchRequestBodyContentApplicationJsonSchemaJsonSchema — JSON schema used for structured outputs when configured.
  - `is_enforcing_response_format` boolean — Whether to strictly enforce the response format.
  - `deploy` boolean — Deploy this version as the live version immediately.

## Response `200`

Prompt version updated successfully.

- PromptsUpdatePromptVersionResponse200
  - `id` string
  - `prompt_version_id` string
  - `version` integer
  - `description` string, nullable
  - `messages` ApiPromptsPromptIdVersionsVersionPatchResponsesContentApplicationJsonSchemaMessagesItems[]
    - `role` string, required
    - `content` union
      - string
      - unknown[]
        - unknown
  - `thinking` ApiPromptsPromptIdVersionsVersionPatchResponsesContentApplicationJsonSchemaThinking
  - `model` string
  - `stream` boolean
  - `temperature` number, double, nullable
  - `max_tokens` integer, nullable
  - `top_p` number, double, nullable
  - `frequency_penalty` number, double, nullable
  - `presence_penalty` number, double, nullable
  - `reasoning_effort` string, nullable
  - `verbosity` string, nullable
  - `seed` integer, nullable
  - `variables` ApiPromptsPromptIdVersionsVersionPatchResponsesContentApplicationJsonSchemaVariables
  - `fallback_models` string[], nullable
  - `load_balance_models` ApiPromptsPromptIdVersionsVersionPatchResponsesContentApplicationJsonSchemaLoadBalanceModelsItems[], nullable
  - `tools` ApiPromptsPromptIdVersionsVersionPatchResponsesContentApplicationJsonSchemaToolsItems[], nullable
  - `tool_choice` union
    - string
    - object
  - `response_format` ApiPromptsPromptIdVersionsVersionPatchResponsesContentApplicationJsonSchemaResponseFormat
  - `json_schema` ApiPromptsPromptIdVersionsVersionPatchResponsesContentApplicationJsonSchemaJsonSchema
  - `is_enforcing_response_format` boolean
  - `readonly` boolean
  - `is_deployed` boolean
  - `edited_by` ApiPromptsPromptIdVersionsVersionPatchResponsesContentApplicationJsonSchemaEditedBy
    - `id` integer
    - `email` string
    - `first_name` string
    - `last_name` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Bad Request
- `401` — Unauthorized - Missing/invalid authentication
- `404` — Prompt version not found

## Changes

> 6 revisions in range; 2 could not be searched.

- **2026-08-13** `4e064cf81dae` — 33 breaking, 19 warning, 23 info
  - for the `path` request parameter `version`, the type/format was changed from `string`/`` to `integer`/``
  - the request property `fallback_models` became not nullable
  - the request property `frequency_penalty` became not nullable
  - the request property `load_balance_models` became not nullable
  - …71 more
- **2026-07-31** `c26d550029f8` — 15 breaking, 6 warning, 52 info
  - added the new required request property `messages/items/content`
  - added the new required request property `messages/items/role`
  - added the new required request property `tools/items/function`
  - the request property `thinking/oneOf[subschema #2]/` became not nullable
  - …69 more

[Change history](https://skmtc.dev/keywordsai/apis/api-reference/changes/api/prompts/:prompt_id/versions/:version/patch.md)

---

[API](https://skmtc.dev/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.dev/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/c61efaf24756/schema)
