For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Copy to LLMGithubGo to App
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
    • Overview
  • Python SDK
    • Reference
    • REST API Client
  • Typescript SDK
    • Overview
    • Opik TS
    • Prompts
    • Opik Query Language (OQL)
  • Rest API
    • Overview
        • GETGet prompts
        • POSTCreate prompt
        • POSTCreate prompt version
        • PATCHUpdate prompt versions
        • GETGet prompt by id
        • PUTUpdate prompt
        • DELDelete prompt
        • POSTDelete prompts
        • GETGet prompt by commit
        • GETGet prompt version by id
        • GETGet prompt version by sequential number
        • GETGet prompt versions
        • POSTGet prompts by commits
        • POSTRestore prompt version
        • POSTRetrieve prompt version
        • POSTRetrieve prompt versions by ids
        • PATCHSet prompt version environment
LogoLogo
Copy to LLMGithubGo to App
Rest APIAPI ReferencePrompts

Update prompt versions

PATCH
/v1/private/prompts/versions
PATCH
/api/v1/private/prompts/versions
$curl -X PATCH http://localhost:5173/api/v1/private/prompts/versions \
> -H "Content-Type: application/json" \
> -d '{
> "ids": [
> "string"
> ],
> "update": {}
>}'
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
Was this page helpful?
Previous

Get prompt by id

Next
Built with

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

This endpoint expects an object.
idslist of stringsRequired
IDs of prompt versions to update
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.

merge_tagsbooleanOptionalDefaults to false

Tag merge behavior:

  • true: Add new tags to existing tags (union)
  • false: Replace all existing tags with new tags (default behaviour if not provided)

Errors

400
Bad Request Error