Skip to content

Metrics API

Map a role to a metric or custom metric

PATCHhttps://email.growthdept.ai/api/mapped-metrics/{id}

Set relationships.metric or relationships.custom-metric; null clears the role, which then falls back to the metric with the conventional name.

The request body can be up to 5 MB.

Rate limits

Burst: 1/s

Steady: 15/m

Daily: 30/day

Tier XS. See rate limits for how requests are counted.

Scopes

metrics:write

Operation id

update_mapped_metric The same operation as in Klaviyo's API. OpenAPI document

Path parameters

stringrequired

Query parameters

array of strings

Attributes of mapped-metric resources to return.

Sparse fieldsets guide

Pick values to add them to the request:

Body

Send application/vnd.api+json or application/json.

object

  • dataobjectrequired

    data: 4 fields
    • typestringrequired

      mapped-metric
    • idstringrequired

      added_to_cartcancelled_salesordered_productrefunded_salesrevenuestarted_checkoutviewed_product
    • attributesobject

    • relationshipsobject

      relationships: 2 fields
      • metricobject

        metric: 1 field
        • dataobjectrequired

          data: 2 fields
          • typestringrequired

            metric
          • idstringrequired

      • custom-metricobject

        custom-metric: 1 field
        • dataobjectrequired

          data: 2 fields
          • typestringrequired

            custom-metric
          • idstringrequired

Edit the example. The code samples use what you type here.

Headers

stringrequireddefault 2026-10-15

API revision, YYYY-MM-DD. This server implements 2026-10-15.

Revisions guide

Responses

200Success

Response body

object

  • dataobjectrequired

    data: 5 fields
    • typestringrequired

      mapped-metric
    • idstringrequired

      added_to_cartcancelled_salesordered_productrefunded_salesrevenuestarted_checkoutviewed_product
    • attributesobjectrequired

      attributes: 1 field
      • updatedstring (date-time)required

    • relationshipsobject

      relationships: 2 fields
      • metricobject

        metric: 2 fields
        • dataobject

          data: 2 fields
          • typestringrequired

            metric
          • idstringrequired

        • linksobject

          links: 2 fields
          • selfstring (uri)required

          • relatedstring (uri)required

      • custom-metricobject

        custom-metric: 2 fields
        • dataobject

          data: 2 fields
          • typestringrequired

            custom-metric
          • idstringrequired

        • linksobject

          links: 2 fields
          • selfstring (uri)required

          • relatedstring (uri)required

    • linksobjectrequired

      links: 1 field
      • selfstring (uri)required

  • linksobject

    links: 1 field
    • selfstring (uri)required

  • metaobject

4XXClient error

Response body

object

  • errorsarray of objectsrequired

    errors: 8 fields
    • idstringrequired

    • statusintegerrequired

    • codestringrequired

    • titlestringrequired

    • detailstringrequired

    • sourceobject

      source: 2 fields
      • pointerstring

      • parameterstring

    • linksobject

    • metaobject

See status codes for each code.

5XXServer error

Response body

object

  • errorsarray of objectsrequired

    errors: 8 fields
    • idstringrequired

    • statusintegerrequired

    • codestringrequired

    • titlestringrequired

    • detailstringrequired

    • sourceobject

      source: 2 fields
      • pointerstring

      • parameterstring

    • linksobject

    • metaobject