Klaviyo · Capability

Klaviyo API — Metrics

Klaviyo API — Metrics. 24 operations. Lead operation: Get Custom Metrics. Self-contained Naftiko capability covering one Klaviyo business surface.

Run with Naftiko KlaviyoMetrics

What You Can Do

GET
Getcustommetrics — Get Custom Metrics
/v1/api/custom-metrics
POST
Createcustommetric — Create Custom Metric
/v1/api/custom-metrics
GET
Getcustommetric — Get Custom Metric
/v1/api/custom-metrics/{id}
PATCH
Updatecustommetric — Update Custom Metric
/v1/api/custom-metrics/{id}
DELETE
Deletecustommetric — Delete Custom Metric
/v1/api/custom-metrics/{id}
GET
Getmetricsforcustommetric — Get Metrics for Custom Metric
/v1/api/custom-metrics/{id}/metrics
GET
Getmetricidsforcustommetric — Get Metric IDs for Custom Metric
/v1/api/custom-metrics/{id}/relationships/metrics
GET
Getmappedmetrics — Get Mapped Metrics
/v1/api/mapped-metrics
GET
Getmappedmetric — Get Mapped Metric
/v1/api/mapped-metrics/{id}
PATCH
Updatemappedmetric — Update Mapped Metric
/v1/api/mapped-metrics/{id}
GET
Getcustommetricformappedmetric — Get Custom Metric for Mapped Metric
/v1/api/mapped-metrics/{id}/custom-metric
GET
Getmetricformappedmetric — Get Metric for Mapped Metric
/v1/api/mapped-metrics/{id}/metric
GET
Getcustommetricidformappedmetric — Get Custom Metric ID for Mapped Metric
/v1/api/mapped-metrics/{id}/relationships/custom-metric
GET
Getmetricidformappedmetric — Get Metric ID for Mapped Metric
/v1/api/mapped-metrics/{id}/relationships/metric
POST
Querymetricaggregates — Query Metric Aggregates
/v1/api/metric-aggregates
GET
Getmetricproperty — Get Metric Property
/v1/api/metric-properties/{id}
GET
Getmetricformetricproperty — Get Metric for Metric Property
/v1/api/metric-properties/{id}/metric
GET
Getmetricidformetricproperty — Get Metric ID for Metric Property
/v1/api/metric-properties/{id}/relationships/metric
GET
Getmetrics — Get Metrics
/v1/api/metrics
GET
Getmetric — Get Metric
/v1/api/metrics/{id}
GET
Getflowstriggeredbymetric — Get Flows Triggered by Metric
/v1/api/metrics/{id}/flow-triggers
GET
Getpropertiesformetric — Get Properties for Metric
/v1/api/metrics/{id}/metric-properties
GET
Getidsforflowstriggeredbymetric — Get IDs for Flows Triggered by Metric
/v1/api/metrics/{id}/relationships/flow-triggers
GET
Getpropertyidsformetric — Get Property IDs for Metric
/v1/api/metrics/{id}/relationships/metric-properties

MCP Tools

get-custom-metrics

Get Custom Metrics

read-only idempotent
create-custom-metric

Create Custom Metric

get-custom-metric

Get Custom Metric

read-only idempotent
update-custom-metric

Update Custom Metric

idempotent
delete-custom-metric

Delete Custom Metric

idempotent
get-metrics-custom-metric

Get Metrics for Custom Metric

read-only idempotent
get-metric-ids-custom-metric

Get Metric IDs for Custom Metric

read-only idempotent
get-mapped-metrics

Get Mapped Metrics

read-only idempotent
get-mapped-metric

Get Mapped Metric

read-only idempotent
update-mapped-metric

Update Mapped Metric

idempotent
get-custom-metric-mapped-metric

Get Custom Metric for Mapped Metric

read-only idempotent
get-metric-mapped-metric

Get Metric for Mapped Metric

read-only idempotent
get-custom-metric-id-mapped

Get Custom Metric ID for Mapped Metric

read-only idempotent
get-metric-id-mapped-metric

Get Metric ID for Mapped Metric

read-only idempotent
query-metric-aggregates

Query Metric Aggregates

read-only
get-metric-property

Get Metric Property

read-only idempotent
get-metric-metric-property

Get Metric for Metric Property

read-only idempotent
get-metric-id-metric-property

Get Metric ID for Metric Property

read-only idempotent
get-metrics

Get Metrics

read-only idempotent
get-metric

Get Metric

read-only idempotent
get-flows-triggered-metric

Get Flows Triggered by Metric

read-only idempotent
get-properties-metric

Get Properties for Metric

read-only idempotent
get-ids-flows-triggered-metric

Get IDs for Flows Triggered by Metric

read-only idempotent
get-property-ids-metric

Get Property IDs for Metric

read-only idempotent

Capability Spec

klaviyo-metrics.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Klaviyo API — Metrics
  description: 'Klaviyo API — Metrics. 24 operations. Lead operation: Get Custom Metrics. Self-contained Naftiko capability
    covering one Klaviyo business surface.'
  tags:
  - Klaviyo
  - Metrics
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KLAVIYO_API_KEY: KLAVIYO_API_KEY
capability:
  consumes:
  - type: http
    namespace: klaviyo-metrics
    baseUri: https://a.klaviyo.com
    description: Klaviyo API — Metrics business capability. Self-contained, no shared references.
    resources:
    - name: api-custom-metrics
      path: /api/custom-metrics
      operations:
      - name: getcustommetrics
        method: GET
        description: Get Custom Metrics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields[custom-metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: include
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
      - name: createcustommetric
        method: POST
        description: Create Custom Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-custom-metrics-id
      path: /api/custom-metrics/{id}
      operations:
      - name: getcustommetric
        method: GET
        description: Get Custom Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the custom metric
          required: true
        - name: fields[custom-metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: include
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
      - name: updatecustommetric
        method: PATCH
        description: Update Custom Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the custom metric
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecustommetric
        method: DELETE
        description: Delete Custom Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the custom metric
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-custom-metrics-id-metrics
      path: /api/custom-metrics/{id}/metrics
      operations:
      - name: getmetricsforcustommetric
        method: GET
        description: Get Metrics for Custom Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the custom metric
          required: true
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-custom-metrics-id-relationships-metrics
      path: /api/custom-metrics/{id}/relationships/metrics
      operations:
      - name: getmetricidsforcustommetric
        method: GET
        description: Get Metric IDs for Custom Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the custom metric
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-mapped-metrics
      path: /api/mapped-metrics
      operations:
      - name: getmappedmetrics
        method: GET
        description: Get Mapped Metrics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields[custom-metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[mapped-metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: include
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-mapped-metrics-id
      path: /api/mapped-metrics/{id}
      operations:
      - name: getmappedmetric
        method: GET
        description: Get Mapped Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The type of mapping.
          required: true
        - name: fields[custom-metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[mapped-metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: include
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
      - name: updatemappedmetric
        method: PATCH
        description: Update Mapped Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The type of mapping.
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-mapped-metrics-id-custom-metric
      path: /api/mapped-metrics/{id}/custom-metric
      operations:
      - name: getcustommetricformappedmetric
        method: GET
        description: Get Custom Metric for Mapped Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The type of mapping.
          required: true
        - name: fields[custom-metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-mapped-metrics-id-metric
      path: /api/mapped-metrics/{id}/metric
      operations:
      - name: getmetricformappedmetric
        method: GET
        description: Get Metric for Mapped Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The type of mapping.
          required: true
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-mapped-metrics-id-relationships-custom-metric
      path: /api/mapped-metrics/{id}/relationships/custom-metric
      operations:
      - name: getcustommetricidformappedmetric
        method: GET
        description: Get Custom Metric ID for Mapped Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The type of mapping.
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-mapped-metrics-id-relationships-metric
      path: /api/mapped-metrics/{id}/relationships/metric
      operations:
      - name: getmetricidformappedmetric
        method: GET
        description: Get Metric ID for Mapped Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The type of mapping.
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metric-aggregates
      path: /api/metric-aggregates
      operations:
      - name: querymetricaggregates
        method: POST
        description: Query Metric Aggregates
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-metric-properties-id
      path: /api/metric-properties/{id}
      operations:
      - name: getmetricproperty
        method: GET
        description: Get Metric Property
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the metric property
          required: true
        - name: additional-fields[metric-property]
          in: query
          type: array
          description: 'Request additional fields not included by default in the response. Supported values: ''sample_values'''
        - name: fields[metric-property]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: include
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metric-properties-id-metric
      path: /api/metric-properties/{id}/metric
      operations:
      - name: getmetricformetricproperty
        method: GET
        description: Get Metric for Metric Property
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the metric property
          required: true
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metric-properties-id-relationships-metric
      path: /api/metric-properties/{id}/relationships/metric
      operations:
      - name: getmetricidformetricproperty
        method: GET
        description: Get Metric ID for Metric Property
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the metric property
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metrics
      path: /api/metrics
      operations:
      - name: getmetrics
        method: GET
        description: Get Metrics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields[flow]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: filter
          in: query
          type: string
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#filtering<br>Allowed
            field(s)/operator(s):<br>`integratio
        - name: include
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships
        - name: page[cursor]
          in: query
          type: string
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metrics-id
      path: /api/metrics/{id}
      operations:
      - name: getmetric
        method: GET
        description: Get Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: Metric ID
          required: true
        - name: fields[flow]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: fields[metric]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: include
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metrics-id-flow-triggers
      path: /api/metrics/{id}/flow-triggers
      operations:
      - name: getflowstriggeredbymetric
        method: GET
        description: Get Flows Triggered by Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: fields[flow]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metrics-id-metric-properties
      path: /api/metrics/{id}/metric-properties
      operations:
      - name: getpropertiesformetric
        method: GET
        description: Get Properties for Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the metric
          required: true
        - name: additional-fields[metric-property]
          in: query
          type: array
          description: 'Request additional fields not included by default in the response. Supported values: ''sample_values'''
        - name: fields[metric-property]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metrics-id-relationships-flow-triggers
      path: /api/metrics/{id}/relationships/flow-triggers
      operations:
      - name: getidsforflowstriggeredbymetric
        method: GET
        description: Get IDs for Flows Triggered by Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-metrics-id-relationships-metric-properties
      path: /api/metrics/{id}/relationships/metric-properties
      operations:
      - name: getpropertyidsformetric
        method: GET
        description: Get Property IDs for Metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the metric
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.KLAVIYO_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: klaviyo-metrics-rest
    port: 8080
    description: REST adapter for Klaviyo API — Metrics. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/custom-metrics
      name: api-custom-metrics
      description: REST surface for api-custom-metrics.
      operations:
      - method: GET
        name: getcustommetrics
        description: Get Custom Metrics
        call: klaviyo-metrics.getcustommetrics
        with:
          fields[custom-metric]: rest.fields[custom-metric]
          fields[metric]: rest.fields[metric]
          include: rest.include
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcustommetric
        description: Create Custom Metric
        call: klaviyo-metrics.createcustommetric
        with:
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/custom-metrics/{id}
      name: api-custom-metrics-id
      description: REST surface for api-custom-metrics-id.
      operations:
      - method: GET
        name: getcustommetric
        description: Get Custom Metric
        call: klaviyo-metrics.getcustommetric
        with:
          id: rest.id
          fields[custom-metric]: rest.fields[custom-metric]
          fields[metric]: rest.fields[metric]
          include: rest.include
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatecustommetric
        description: Update Custom Metric
        call: klaviyo-metrics.updatecustommetric
        with:
          id: rest.id
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecustommetric
        description: Delete Custom Metric
        call: klaviyo-metrics.deletecustommetric
        with:
          id: rest.id
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/custom-metrics/{id}/metrics
      name: api-custom-metrics-id-metrics
      description: REST surface for api-custom-metrics-id-metrics.
      operations:
      - method: GET
        name: getmetricsforcustommetric
        description: Get Metrics for Custom Metric
        call: klaviyo-metrics.getmetricsforcustommetric
        with:
          id: rest.id
          fields[metric]: rest.fields[metric]
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/custom-metrics/{id}/relationships/metrics
      name: api-custom-metrics-id-relationships-metrics
      description: REST surface for api-custom-metrics-id-relationships-metrics.
      operations:
      - method: GET
        name: getmetricidsforcustommetric
        description: Get Metric IDs for Custom Metric
        call: klaviyo-metrics.getmetricidsforcustommetric
        with:
          id: rest.id
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/mapped-metrics
      name: api-mapped-metrics
      description: REST surface for api-mapped-metrics.
      operations:
      - method: GET
        name: getmappedmetrics
        description: Get Mapped Metrics
        call: klaviyo-metrics.getmappedmetrics
        with:
          fields[custom-metric]: rest.fields[custom-metric]
          fields[mapped-metric]: rest.fields[mapped-metric]
          fields[metric]: rest.fields[metric]
          include: rest.include
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/mapped-metrics/{id}
      name: api-mapped-metrics-id
      description: REST surface for api-mapped-metrics-id.
      operations:
      - method: GET
        name: getmappedmetric
        description: Get Mapped Metric
        call: klaviyo-metrics.getmappedmetric
        with:
          id: rest.id
          fields[custom-metric]: rest.fields[custom-metric]
          fields[mapped-metric]: rest.fields[mapped-metric]
          fields[metric]: rest.fields[metric]
          include: rest.include
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatemappedmetric
        description: Update Mapped Metric
        call: klaviyo-metrics.updatemappedmetric
        with:
          id: rest.id
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/mapped-metrics/{id}/custom-metric
      name: api-mapped-metrics-id-custom-metric
      description: REST surface for api-mapped-metrics-id-custom-metric.
      operations:
      - method: GET
        name: getcustommetricformappedmetric
        description: Get Custom Metric for Mapped Metric
        call: klaviyo-metrics.getcustommetricformappedmetric
        with:
          id: rest.id
          fields[custom-metric]: rest.fields[custom-metric]
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/mapped-metrics/{id}/metric
      name: api-mapped-metrics-id-metric
      description: REST surface for api-mapped-metrics-id-metric.
      operations:
      - method: GET
        name: getmetricformappedmetric
        description: Get Metric for Mapped Metric
        call: klaviyo-metrics.getmetricformappedmetric
        with:
          id: rest.id
          fields[metric]: rest.fields[metric]
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/mapped-metrics/{id}/relationships/custom-metric
      name: api-mapped-metrics-id-relationships-custom-metric
      description: REST surface for api-mapped-metrics-id-relationships-custom-metric.
      operations:
      - method: GET
        name: getcustommetricidformappedmetric
        description: Get Custom Metric ID for Mapped Metric
        call: klaviyo-metrics.getcustommetricidformappedmetric
        with:
          id: rest.id
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/mapped-metrics/{id}/relationships/metric
      name: api-mapped-metrics-id-relationships-metric
      description: REST surface for api-mapped-metrics-id-relationships-metric.
      operations:
      - method: GET
        name: getmetricidformappedmetric
        description: Get Metric ID for Mapped Metric
        call: klaviyo-metrics.getmetricidformappedmetric
        with:
          id: rest.id
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/metric-aggregates
      name: api-metric-aggregates
      description: REST surface for api-metric-aggregates.
      operations:
      - method: POST
        name: querymetricaggregates
        description: Query Metric Aggregates
        call: klaviyo-metrics.querymetricaggregates
        with:
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/metric-properties/{id}
      name: api-metric-properties-id
      description: REST surface for api-metric-properties-id.
      operations:
      - method: GET
        name: getmetricproperty
        description: Get Metric Property
        call: klaviyo-metrics.getmetricproperty
        with:
          id: rest.id
          additional-fields[metric-property]: rest.additional-fields[metric-property]
          fields[metric-property]: rest.fields[metric-property]
          fields[metric]: rest.fields[metric]
          include: rest.include
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/metric-properties/{id}/metric
      name: api-metric-properties-id-metric
      description: REST surface for api-metric-properties-id-metric.
      operations:
      - method: GET
        name: getmetricformetricproperty
        description: Get Metric for Metric Property
        call: klaviyo-metrics.getmetricformetricproperty
        with:
          id: rest.id
          fields[metric]: rest.fields[metric]
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/metric-properties/{id}/relationships/metric
      name: api-metric-properties-id-relationships-metric
      description: REST surface for api-metric-properties-id-relationships-metric.
      operations:
      - method: GET
        name: getmetricidformetricproperty
        description: Get Metric ID for Metric Property
        call: klaviyo-metrics.getmetricidformetricproperty
        with:
          id: rest.id
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/metrics
      name: api-metrics
      description: REST surface for api-metrics.
      operations:
      - method: GET
        name: getmetrics
        description: Get Metrics
        call: klaviyo-metrics.getmetrics
        with:
          fields[flow]: rest.fields[flow]
          fields[metric]: rest.fields[metric]
          filter: rest.filter
          include: rest.include
          page[cursor]: rest.page[cursor]
          revision: rest.re

# --- truncated at 32 KB (44 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/klaviyo/refs/heads/main/capabilities/klaviyo-metrics.yaml