{ "openapi": "3.0.2", "info": { "title": "Klaviyo API", "version": "2026-04-15", "description": "The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.", "contact": { "name": "Klaviyo Developer Experience Team", "email": "developers@klaviyo.com", "url": "https://developers.klaviyo.com" }, "termsOfService": "https://www.klaviyo.com/legal/api-terms", "license": { "name": "License", "url": "https://www.klaviyo.com/legal" } }, "servers": [ { "url": "https://a.klaviyo.com", "description": "Production" } ], "security": [ { "Klaviyo-API-Key": [] } ], "paths": { "/api/metrics": { "get": { "operationId": "get_metrics", "summary": "Get Metrics", "description": "Get all metrics in an account.\n\nRequests can be filtered by the following fields:\nintegration `name`, integration `category`\n\nReturns a maximum of 200 results per page.

*Rate limits*:
Burst: `10/s`
Steady: `150/m`\n\n**Scopes:**\n`metrics:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_metrics.json)", "parameters": [ { "name": "fields[flow]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "archived", "created", "id", "name", "status", "trigger_type", "updated" ] } }, "explode": false }, { "name": "fields[metric]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "created", "id", "integration", "name", "updated" ] } }, "explode": false }, { "name": "filter", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#filtering
Allowed field(s)/operator(s):
`integration.name`: `equals`
`integration.category`: `equals`", "schema": { "type": "string", "example": "equals(integration.name,'example')" } }, { "name": "include", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships", "schema": { "type": "array", "items": { "type": "string", "enum": [ "flow-triggers" ] } }, "explode": false }, { "name": "page[cursor]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination", "required": false, "schema": { "type": "string" } }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-04-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetMetricResponseCollectionCompoundDocument" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Metrics" ], "x-klaviyo-filters": { "integration.name": { "operators": { "single": [ "equals" ] }, "value": { "type": "string" } }, "integration.category": { "operators": { "single": [ "equals" ] }, "value": { "type": "string" } } }, "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "10/s", "steady": "150/m" }, "x-klaviyo-scopes": [ "metrics:read" ] } } }, "components": { "responses": { "ClientError": { "description": "Client Error", "content": { "application/vnd.api+json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "id", "code", "title", "detail" ], "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" } } } } } } }, "required": [ "errors" ] } } } }, "ServerError": { "description": "Server Error", "content": { "application/vnd.api+json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "id", "code", "title", "detail" ], "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" } } } } } } }, "required": [ "errors" ] } } } } }, "schemas": { "CollectionLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" }, "prev": { "type": "string", "format": "uri" }, "next": { "type": "string", "format": "uri" } }, "required": [ "self" ] }, "FlowActionEnum": { "type": "string", "enum": [ "flow-action" ] }, "FlowEnum": { "type": "string", "enum": [ "flow" ] }, "FlowResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "status": { "type": "string", "nullable": true }, "archived": { "type": "boolean", "nullable": true }, "created": { "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated": { "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "trigger_type": { "description": "Corresponds to the object which triggered the flow.", "type": "string", "enum": [ "Added to List", "Date Based", "Low Inventory", "Metric", "Price Drop", "Unconfigured" ], "nullable": true } } }, "relationships": { "type": "object", "properties": { "flow-actions": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowActionEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "tags": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "GetMetricResponseCollectionCompoundDocument": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/MetricResponseObjectResource" } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "included": { "type": "array", "items": { "$ref": "#/components/schemas/FlowResponseObjectResource" } } }, "required": [ "data" ] }, "MetricEnum": { "type": "string", "enum": [ "metric" ] }, "MetricResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/MetricEnum" }, "id": { "description": "The Metric ID", "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "description": "The name of the metric", "type": "string", "nullable": true }, "created": { "description": "Creation time in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "nullable": true }, "updated": { "description": "Last updated time in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "nullable": true }, "integration": { "description": "The integration associated with the event", "type": "object", "nullable": true } } }, "relationships": { "type": "object", "properties": { "flow-triggers": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "ObjectLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } }, "required": [ "self" ] }, "RelationshipLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" }, "related": { "type": "string", "format": "uri" } }, "required": [ "self", "related" ] }, "TagEnum": { "type": "string", "enum": [ "tag" ] } }, "securitySchemes": { "Klaviyo-API-Key": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "Private key authentication for /api/ endpoints is performed by setting the `Authorization` header to `Klaviyo-API-Key your-private-api-key`
For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#authentication", "x-default": "Klaviyo-API-Key your-private-api-key" } } }, "tags": [ { "name": "Metrics", "description": "metrics" } ] }