---
title: "Update prompt versions"
method: PATCH
path: "/v1/private/prompts/versions"
tags: ["Prompts"]
---

# Update prompt versions

`PATCH /v1/private/prompts/versions`

Update one or more prompt versions.

Note: Prompt versions are immutable by design.
Only organizational properties, such as tags etc., can be updated.
Core properties like template and metadata cannot be modified after creation.

PATCH semantics:
- non-empty values update the field
- null values preserve existing field values (no change)
- empty values explicitly clear the field

## Request body

- PromptVersionBatchUpdate — Request to update one or more prompt versions. Note: Prompt versions are immutable by design - only organizational properties (such as tags etc.) can be updated.
  - `ids` string[], required — IDs of prompt versions to update
  - `update` PromptVersionUpdate, required — Update to apply to prompt versions. Note: Prompt versions are immutable by design. Only organizational properties (such as tags etc.) can be updated. Core properties like template, metadata etc. cannot be modified after creation.
    - `tags` string[] — Tags to set or merge with existing tags. Follows PATCH semantics: - If merge_tags is true, these tags will be added to existing tags. - If merge_tags is false, these tags will replace all existing tags. - null: preserve existing tags (no change). - empty set: clear all tags when merge_tags is false.
  - `merge_tags` boolean — Tag merge behavior: - true: Add new tags to existing tags (union) - false: Replace all existing tags with new tags (default behaviour if not provided)

## Response `204`

No Content

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/revisions/4ed2fbc97cc3/schema)
