Operations 24
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“What metrics (event types) are being tracked in my Klaviyo account?”
“Can I filter metrics by integration name or category?”
Tell an agent
List all metrics in my account.
Show metrics from the integration matching {filter}.
Ask an LLM
“How do I look up the details of a single metric like Placed Order?”
“Which integration does a specific metric come from?”
Tell an agent
Get metric {metric_id}.
Show metric {metric_id} with its {include}.
Ask an LLM
“How do I inspect a single property recorded on a metric's events?”
“Can I see sample values for one metric property?”
Tell an agent
Get metric property {property_id}.
Show metric property {property_id} with extra fields {additional_fields}.
Ask an LLM
“Which custom metrics have I defined in my account?”
“Can I see the underlying metrics each custom metric combines?”
Tell an agent
List all my custom metrics.
Show custom metrics including their {include}.
Ask an LLM
“How do I define a custom metric that combines several events into one?”
“What fields does a new custom metric need?”
Tell an agent
Create a custom metric with name and definition {custom_metric}.
Define a new custom metric that rolls up {custom_metric}.
Ask an LLM
“How is a specific custom metric defined?”
“Can I fetch one custom metric by its ID?”
Tell an agent
Get custom metric {custom_metric_id}.
Show the definition of custom metric {custom_metric_id}.
Ask an LLM
“Can I change which events a custom metric is built from?”
“How do I rename an existing custom metric?”
Tell an agent
Update custom metric {custom_metric_id} with {changes}.
Change the definition of custom metric {custom_metric_id} to {changes}.
Ask an LLM
“How do I get rid of a custom metric I no longer use?”
“Can I remove a custom metric by its ID?”
Tell an agent destructive · confirm first
Delete custom metric {custom_metric_id}.
Remove the unused custom metric {custom_metric_id}.
Ask an LLM
“Which metrics are mapped to things like revenue in my account?”
“Can I see the metric or custom metric each mapping points to?”
Tell an agent
List all mapped metrics.
Show mapped metrics along with their {include}.
Ask an LLM
“What is a particular mapped metric currently pointing at?”
“Can I look up one mapped metric by its ID?”
Tell an agent
Get mapped metric {mapped_metric_id}.
Show mapping {mapped_metric_id} with its {include}.
Ask an LLM
“How do I change which metric counts toward a mapped metric like revenue?”
“Can I point a mapped metric at a custom metric instead?”
Tell an agent
Update mapped metric {mapped_metric_id} to {mapping}.
Point mapping {mapped_metric_id} at the metric in {mapping}.
Ask an LLM
“How much revenue did Placed Order events generate per day last month?”
“Can I count a metric's events grouped by a property over a date range?”
Tell an agent
Aggregate metric events with this query: {query}.
Sum and count events for the metric and date range in {query}, grouped by day.
GET
/api/metrics/{id}/flow-triggers
List flows triggered by a metric · Get Flows Triggered by Metric
#
Ask an LLM
“Which flows start when a given metric's event happens?”
“Can I see full flow records for everything a metric triggers?”
Tell an agent
List flows triggered by metric {metric_id}.
Show full flow details for automations started by metric {metric_id}.
GET
/api/metrics/{id}/relationships/flow-triggers
Get IDs of flows a metric triggers · Get IDs for Flows Triggered by Metric
#
Ask an LLM
“Can I get only the flow IDs that use a metric as their trigger?”
“What flow-trigger relationships does a metric have?”
Tell an agent
Get just the flow IDs triggered by metric {metric_id}.
Return flow-trigger relationships of metric {metric_id}.
Ask an LLM
“What properties are recorded on a metric's events?”
“Can I see full details of every property on a metric?”
Tell an agent
List the properties recorded for metric {metric_id}.
Show all event properties on metric {metric_id} with {additional_fields}.
GET
/api/metrics/{id}/relationships/metric-properties
Get property IDs for a metric · Get Property IDs for Metric
#
Ask an LLM
“Can I fetch only the property IDs attached to a metric?”
“What metric-property relationships exist for one metric?”
Tell an agent
Get just the property IDs for metric {metric_id}.
Return metric-property relationships of metric {metric_id}.
GET
/api/metric-properties/{id}/metric
Get the metric a property belongs to · Get Metric for Metric Property
#
Ask an LLM
“Which metric does a given metric property belong to?”
“Can I get the full parent metric from a property ID?”
Tell an agent
Get the metric that property {property_id} belongs to.
Show the full parent metric of property {property_id}.
GET
/api/metric-properties/{id}/relationships/metric
Get the metric ID for a property · Get Metric ID for Metric Property
#
Ask an LLM
“Can I get only the parent metric ID for a metric property?”
“What metric relationship does a property carry?”
Tell an agent
Get just the metric ID for property {property_id}.
Return the metric relationship of property {property_id}.
GET
/api/custom-metrics/{id}/metrics
List metrics inside a custom metric · Get Metrics for Custom Metric
#
Ask an LLM
“Which underlying metrics make up a custom metric?”
“Can I see full metric records for everything a custom metric combines?”
Tell an agent
List the metrics that custom metric {custom_metric_id} combines.
Show full metric details inside custom metric {custom_metric_id}.
GET
/api/custom-metrics/{id}/relationships/metrics
Get metric IDs inside a custom metric · Get Metric IDs for Custom Metric
#
Ask an LLM
“Can I get only the IDs of metrics a custom metric is built from?”
“What metric relationships does a custom metric have?”
Tell an agent
Get just the metric IDs for custom metric {custom_metric_id}.
Return metric relationships of custom metric {custom_metric_id}.
GET
/api/mapped-metrics/{id}/metric
Get the metric behind a mapped metric · Get Metric for Mapped Metric
#
Ask an LLM
“Which standard metric does a mapped metric point to, if any?”
“Can I get the full metric record from a mapping?”
Tell an agent
Get the metric mapped by {mapped_metric_id}.
Show full details of the standard metric behind mapping {mapped_metric_id}.
GET
/api/mapped-metrics/{id}/relationships/metric
Get the metric ID for a mapped metric · Get Metric ID for Mapped Metric
#
Ask an LLM
“Can I fetch only the metric ID a mapped metric points to?”
“What metric relationship does a mapping hold?”
Tell an agent
Get just the metric ID for mapped metric {mapped_metric_id}.
Return the metric relationship of mapping {mapped_metric_id}.
GET
/api/mapped-metrics/{id}/custom-metric
Get the custom metric behind a mapping · Get Custom Metric for Mapped Metric
#
Ask an LLM
“Is a mapped metric using a custom metric, and which one?”
“Can I read the custom metric definition a revenue mapping relies on?”
Tell an agent
Get the custom metric used by mapped metric {mapped_metric_id}.
Show the full custom metric definition behind mapping {mapped_metric_id}.
GET
/api/mapped-metrics/{id}/relationships/custom-metric
Get the custom metric ID for a mapping · Get Custom Metric ID for Mapped Metric
#
Ask an LLM
“Can I get only the custom metric ID that a mapped metric uses?”
“Is there a custom-metric relationship ID stored on this mapping?”
Tell an agent
Look up which custom metric ID mapping {mapped_metric_id} uses.
Return the custom-metric relationship on mapped metric {mapped_metric_id}.
Documentation
Documentation
https://developers.klaviyo.com/
Authentication
https://developers.klaviyo.com/en/docs/authenticate_
RateLimits
https://developers.klaviyo.com/en/docs/rate_limits_and_error_handling
Specifications
OpenAPI
https://artifacts.apis.io/klaviyo/openapi/klaviyo-metrics-api-openapi.yml
AsyncAPI
https://artifacts.apis.io/klaviyo/asyncapi/klaviyo-webhooks-asyncapi.yaml
Other Resources
Reference
https://developers.klaviyo.com/en/reference/api_overview
Versioning
https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy
ChangeLog
https://developers.klaviyo.com/en/docs/changelog_
SDKs
https://developers.klaviyo.com/en/docs/sdk_overview
GitHub
https://github.com/klaviyo/openapi
Overlay
https://artifacts.apis.io/klaviyo/overlays/klaviyo-metrics-api-overlay.yaml