Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Update prompt versions

PATCH/v1/private/prompts/versionsUpdate prompt 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

application/json
objectPromptVersionBatchUpdate

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.

idsarray of string · uuidrequired

IDs of prompt versions to update

maxItems 1000 · minItems 1 · uniqueItems true

Show child attributes

maxItems 1000 · minItems 1 · uniqueItems true

merge_tagsboolean

Tag merge behavior: - true: Add new tags to existing tags (union) - false: Replace all existing tags with new tags (default behaviour if not provided)

default false

updateobjectrequired

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.

Show child attributes
tagsarray of 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.

maxItems 50 · minItems 0 · uniqueItems true

Show child attributes

maxItems 50 · minItems 0 · uniqueItems true

Example request
{
  "ids": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "merge_tags": false,
  "update": {
    "tags": [
      "string"
    ]
  }
}

Responses

204No Content
400Bad Requestapplication/json
objectErrorMessage
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
Documentation menu