---
title: "Update Mapped Metric"
description: "How to call Update Mapped Metric (PATCH /api/mapped-metrics/{id}) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2026-07-15/reference/update_mapped_metric"
revision: "2026-07-15"
latestUrl: "https://developers.klaviyo.com/en/reference/update_mapped_metric"
operationId: "update_mapped_metric"
method: "PATCH"
endpoint: "https://a.klaviyo.com/api/mapped-metrics/{id}"
authentication: "privateKey"
scopes: ["metrics:write"]
rateLimits: {"burst":"1/s","steady":"15/m","daily":"30/d"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_mapped_metric.json"
jsonApi: {"fields":{"mapped-metric":["id","updated"]}}
related: ["https://developers.klaviyo.com/en/v2026-07-15/reference/metrics/llms.txt","https://developers.klaviyo.com/en/v2026-07-15/reference/get_mapped_metrics.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_mapped_metric.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_metric_for_mapped_metric.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_metric_id_for_mapped_metric.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_custom_metric_for_mapped_metric.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_custom_metric_id_for_mapped_metric.md"]
---

# Update Mapped Metric

> This is the Markdown version of https://developers.klaviyo.com/en/v2026-07-15/reference/update_mapped_metric

```http
PATCH https://a.klaviyo.com/api/mapped-metrics/{id}
```

Update the mapped metric with the given ID.

- Revision header: `revision: 2026-07-15` (required)
- Scopes: `metrics:write`
- Rate limits: Burst: `1/s`, Steady: `15/m`, Daily: `30/d`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_mapped_metric.json)

## Example request

```bash
curl --request PATCH \
     --url 'https://a.klaviyo.com/api/mapped-metrics/revenue' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-07-15' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "mapped-metric",
    "id": "revenue"
  }
}'
```

## Path parameters

- `id` (string, required): The type of mapping. Allowed values: `added_to_cart`, `cancelled_sales`, `ordered_product`, `refunded_sales`, `revenue`, `started_checkout`, `viewed_product` Example: `revenue`

## Query parameters

- `fields[mapped-metric]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2026-07-15/reference.md) Allowed values: `id`, `updated`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2026-07-15`

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `mapped-metric`
  - `id` (string, required): The type of mapping. Allowed values: `added_to_cart`, `cancelled_sales`, `ordered_product`, `refunded_sales`, `revenue`, `started_checkout`, `viewed_product` Example: `revenue`
  - `relationships` (object)
    - `metric` (object)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_mapped_metric.json).
    - `custom-metric` (object)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_mapped_metric.json).

### Example request body

```json
{
  "data": {
    "type": "mapped-metric",
    "id": "revenue"
  }
}
```

## Responses

### 200: Success

Content type: `application/vnd.api+json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `mapped-metric`
  - `id` (string, required): The type of mapping. Allowed values: `added_to_cart`, `cancelled_sales`, `ordered_product`, `refunded_sales`, `revenue`, `started_checkout`, `viewed_product` Example: `revenue`
  - `attributes` (object, required)
    - `updated` (string<date-time>, required): The datetime when this mapping was last updated. Example: `2025-04-15T00:00:00Z`
  - `relationships` (object)
    - `metric` (object)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_mapped_metric.json).
      - `links` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_mapped_metric.json).
    - `custom-metric` (object)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_mapped_metric.json).
      - `links` (RelationshipLinks): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_mapped_metric.json).
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (ObjectLinks): Same fields as the first ObjectLinks above.
- `meta` (object): Response-level metadata
  - `agent_hints` (object): Optional hints emitted by the API for agent callers
    - `next_steps` (string[]): Suggested follow-up actions for agents to take after this response

#### Example response body

```json
{
  "data": {
    "type": "mapped-metric",
    "id": "revenue",
    "attributes": {
      "updated": "2025-04-15T00:00:00Z"
    },
    "relationships": {
      "metric": {
        "data": {
          "type": "metric",
          "id": "string"
        },
        "links": {
          "self": "https://www.example.com",
          "related": "https://www.example.com"
        }
      },
      "custom-metric": {
        "data": {
          "type": "custom-metric",
          "id": "string"
        },
        "links": {
          "self": "https://www.example.com",
          "related": "https://www.example.com"
        }
      }
    },
    "links": {
      "self": "https://www.example.com"
    }
  },
  "links": {
    "self": "https://www.example.com"
  },
  "meta": {
    "agent_hints": {
      "next_steps": [
        "string"
      ]
    }
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
