Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceRecipesChangelogUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

Update a Holdout using JSON Patch

Updates a specific holdout using JSON Patch operations (RFC 6902). This endpoint allows you to modify individual properties of an existing holdout without replacing the entire resource.

Supported Operations:

  • Status transitions: Move holdouts through their lifecycle (draftrunningconcluded)
  • Configuration updates: Modify traffic allocation, name, description, and other settings
  • Archive management: Archive/unarchive concluded holdouts
  • Metrics updates: Modify metric configurations (restricted based on status)

State Management & Validation Rules:

  • Draft holdouts: All fields can be updated except readonly properties
  • Running holdouts: Limited updates allowed; cannot modify metrics or core configuration
  • Concluded holdouts: Only name and archived status can be modified
  • Status transitions: Must follow proper sequence (draft→running→concluded)
  • Traffic allocation: Must be 0-10000 basis points (0-100%)

Automatic Timestamp Management:

  • Moving to running status automatically sets start_time to current timestamp
  • Moving to concluded status automatically sets end_time to current timestamp

Common Update Patterns:

[
  {"op": "replace", "path": "/name", "value": "Updated Holdout Name"},
  {"op": "replace", "path": "/traffic_allocation", "value": 1500},
  {"op": "replace", "path": "/status", "value": "running"}
]

Important Limitations:

  • Cannot modify metrics on running holdouts (prevents mid-experiment changes)
  • Cannot archive non-concluded holdouts (must conclude first)
  • Cannot update core configuration on running/concluded holdouts
  • ReadOnly properties in patch operations are ignored
👍

Beta

Holdouts are in beta. Apply on the Optimizely beta signup page or contact your Customer Success Manager.

Language
Credentials
Click Try It! to start a request and see the response here!