Experiments
Update experiment protocol
Update the supplied fields of a draft protocol. Published protocols accept only name, description, and migration_metadata changes through PATCH. Use PUT to replace their settings. Archived protocols cannot be edited.
Omitted fields keep their current values, including fields inside analysis_plan, exposure_schedule, and enforcement. Arrays replace the stored arrays. Supported null values clear fields; see the request schema. Use primary_metric_id to select the primary metric and default_duration_days to set the experiment analysis duration. Nested metric is_primary and analysis_plan.target_duration_days fields are rejected.
patch/api/v2/experiments/protocols/{protocol_id}
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/tokenScopesproduct_analytics_experiments_write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
protocol_idstring uuid required
The UUID of the protocol.
Example:550e8400-e29b-41d4-a716-446655440000
Request body
Example request
{
"data": {
"attributes": {
"metric_groups": [
{
"metrics": [
{
"metric_id": "550e8400-e29b-41d4-a716-446655440000"
}
]
}
],
"name": "Checkout conversion"
},
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "protocols"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"archived_at": "2026-07-31T14:00:00Z",
"created_at": "2026-07-31T12:00:00Z",
"metric_groups": [],
"name": "Checkout conversion",
"status": "PUBLISHED",
"updated_at": "2026-01-01T00:00:00Z"
},
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "protocols"
}
}Changes
Changes to this operation have not been checked yet.