This product is not supported for your selected Datadog site. ().

Update metric collection

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

Name

Type

Description

metric_collection_id [required]

string

The UUID of the metric collection.

Request

Body Data (required)

Expand All

Field

Type

Description

data [required]

object

JSON:API resource containing the metric collection identity and fields.

attributes

object

Fields supplied to update the metric collection.

description

string

Text that explains the metric collection.

is_guardrail

boolean

Whether the collection is used for guardrail metrics.

metrics

[object]

Metrics included in this collection.

metric_id [required]

uuid

Identifier of the metric to include in the collection.

name

string

Display name of the metric collection.

id

string

ID of the metric collection.

type [required]

enum

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

Field

Type

Description

data [required]

object

JSON:API resource containing the metric collection identity and fields.

attributes

object

Details of the metric collection.

created_at

date-time

Time when this resource was created.

description

string

Text that explains the metric collection.

is_guardrail

boolean

Whether the collection is used for guardrail metrics.

metric_count

int64

Number of metrics in this collection.

metrics

[object]

Metrics included in this collection.

metric_id

string

ID of the metric represented by this entry.

metric_name

string

Display name of the metric represented by this entry.

name

string

Display name of the metric collection.

updated_at

date-time

Time when this resource was last updated.

id [required]

uuid

ID of the metric collection.

type [required]

enum

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

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

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

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

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

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

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

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

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

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

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

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

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

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                          ## 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