PATCH https://api.ap1.datadoghq.com/api/v2/experiments/metric-collections/{metric_collection_id} https://api.ap2.datadoghq.com/api/v2/experiments/metric-collections/{metric_collection_id} https://api.datadoghq.eu/api/v2/experiments/metric-collections/{metric_collection_id} https://api.ddog-gov.com/api/v2/experiments/metric-collections/{metric_collection_id} https://api.us2.ddog-gov.com/api/v2/experiments/metric-collections/{metric_collection_id} https://api.uk1.datadoghq.com/api/v2/experiments/metric-collections/{metric_collection_id} https://api.datadoghq.com/api/v2/experiments/metric-collections/{metric_collection_id} https://api.us3.datadoghq.com/api/v2/experiments/metric-collections/{metric_collection_id} https://api.us5.datadoghq.com/api/v2/experiments/metric-collections/{metric_collection_id}
Overview Update metric collection.
This endpoint requires the product_analytics_metrics_write permission.
OAuth apps require the product_analytics_metrics_write authorization scope to access this endpoint.
Arguments Path Parameters metric_collection_id [required ]
The UUID of the metric collection.
Request Body Data (required)
Expand All
JSON:API resource containing the metric collection identity and fields.
Fields supplied to update the metric collection.
Text that explains the metric collection.
Whether the collection is used for guardrail metrics.
Metrics included in this collection.
Identifier of the metric to include in the collection.
Display name of the metric collection.
ID of the metric collection.
Metric collections resource type.
Allowed enum values: metric-collections
default: metric-collections
{
"data" : {
"type" : "metric-collections" ,
"attributes" : {
"name" : "ex-14bb9543f523edde updated"
}
}
} Response OK
Response containing the metric collection.
Expand All
JSON:API resource containing the metric collection identity and fields.
Details of the metric collection.
Time when this resource was created.
Text that explains the metric collection.
Whether the collection is used for guardrail metrics.
Number of metrics in this collection.
Metrics included in this collection.
ID of the metric represented by this entry.
Display name of the metric represented by this entry.
Display name of the metric collection.
Time when this resource was last updated.
ID of the metric collection.
Metric collections resource type.
Allowed enum values: metric-collections
default: metric-collections
{
"data" : {
"attributes" : {
"created_at" : "2026-08-01T12:00:00Z" ,
"description" : "Metrics reviewed for every checkout experiment." ,
"is_guardrail" : false ,
"metrics" : [
{
"metric_id" : "550e8400-e29b-41d4-a716-446655440020" ,
"metric_name" : "Checkout conversion"
}
],
"name" : "Checkout metrics" ,
"updated_at" : "2026-08-02T09:30:00Z"
},
"id" : "550e8400-e29b-41d4-a716-446655440040" ,
"type" : "metric-collections"
}
} Bad Request
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Unauthorized
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Forbidden
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Not Found
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Conflict
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Request body sent with a media type other than application/json or application/vnd.api+json.
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Too many requests
{
"errors" : [
"Bad Request"
]
} Code Example Copy
## default
#
# Path parameters export metric_collection_id = "550e8400-e29b-41d4-a716-446655440000" # Use a Personal Access Token or Service Access Token export DD_BEARER_TOKEN = "<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" # Curl command curl -X PATCH "https://api.ap1.datadoghq.com "https://api.ap2.datadoghq.com "https://api.datadoghq.eu "https://api.ddog-gov.com "https://api.us2.ddog-gov.com "https://api.uk1.datadoghq.com "https://api.datadoghq.com "https://api.us3.datadoghq.com "https://api.us5.datadoghq.com /api/v2/experiments/metric-collections/${metric_collection_id} " \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN} " \
-d @- << EOF
{
"data": {
"attributes": {
"metrics": []
},
"type": "metric-collections"
}
}
EOF