{ "openapi": "3.0.2", "info": { "title": "Klaviyo API (Beta)", "version": "2026-10-15.pre", "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/customer-agent-values-reports": { "post": { "operationId": "query_customer_agent_values_beta", "summary": "Query Customer Agent Conversation Metrics", "description": "\n > \ud83d\udea7 This endpoint is in beta and subject to change.\n >\n > A beta revision header (2026-10-15.pre) is required to use our beta APIs. Klaviyo APIs in beta are not intended for use in production. See our [versioning and deprecation policy](https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy) for more information.\n\nReturns conversation-level aggregates across the requested timeframe.\n\nA single call may request multiple ``statistics`` (``volume`` and/or ``resolution_rate``); each row of ``results`` carries the bucket-identifying ``groupings`` values and computed ``statistics`` for that bucket. Optionally group by ``channel`` or ``status``, or omit ``groupings`` for a single overall row.

*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`agents:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/beta/apis/query_customer_agent_values_beta.json)", "parameters": [ { "name": "fields[customer-agent-values-report]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-10-15.pre/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "id", "results" ] } }, "explode": false }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-10-15.pre" } } ], "requestBody": { "description": "Request body for the values-report endpoint.", "required": true, "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/CustomerAgentValuesReportQueryRequestDataWrapper" } } } }, "responses": { "201": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/CustomerAgentValuesReportResponseDataWrapper" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Beta APIs" ], "x-klaviyo-beta-revision": "2026-10-15.pre", "x-klaviyo-beta-subtag": "Conversations and Reports", "x-klaviyo-operation-aliases": [ "create_customer_agent_values_report" ], "x-klaviyo-pre-release": "BETA", "x-klaviyo-ratelimit": { "burst": "3/s", "steady": "60/m" }, "x-klaviyo-scopes": [ "agents:read" ], "x-klaviyo-subtag": "Customer Agent" } } }, "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": { "CustomerAgentValuesReportQueryRequest": { "type": "object", "properties": { "statistics": { "description": "Metrics to compute for each grouping bucket. Combine volume and resolution_rate in one call to receive both per bucket.", "type": "array", "items": { "$ref": "#/components/schemas/ValuesStatistic" } }, "timeframe": { "description": "Time window for the report.", "allOf": [ { "$ref": "#/components/schemas/ReportTimeframeRequest" } ] }, "groupings": { "description": "Optional dimension to break the result down by. Provide exactly one of channel or status, or omit entirely for a single aggregate row.", "type": "array", "items": { "$ref": "#/components/schemas/ValuesGrouping" }, "default": [] }, "filter": { "description": "Optional Klaviyo filter syntax. Use any(channel,[...]) to narrow by channel. When omitted, returns aggregates across every channel.", "type": "string", "example": "any(channel,[\"sms\",\"web-chat\"])", "nullable": true } }, "required": [ "statistics", "timeframe" ] }, "CustomerAgentValuesReportQueryRequestData": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/CustomerAgentValuesReportResourceName" }, "attributes": { "$ref": "#/components/schemas/CustomerAgentValuesReportQueryRequest" } }, "required": [ "type", "attributes" ] }, "CustomerAgentValuesReportQueryRequestDataWrapper": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/CustomerAgentValuesReportQueryRequestData" } }, "required": [ "data" ] }, "CustomerAgentValuesReportResourceName": { "type": "string", "enum": [ "customer-agent-values-report" ] }, "CustomerAgentValuesReportResponse": { "type": "object", "properties": { "results": { "description": "Computed values-report rows.", "type": "array", "items": { "$ref": "#/components/schemas/ValuesData" } } }, "required": [ "results" ] }, "CustomerAgentValuesReportResponseData": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/CustomerAgentValuesReportResourceName" }, "id": { "description": "Opaque identifier for the values report response.", "type": "string" }, "attributes": { "$ref": "#/components/schemas/CustomerAgentValuesReportResponse" }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "CustomerAgentValuesReportResponseDataWrapper": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/CustomerAgentValuesReportResponseData" }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "data" ] }, "ObjectLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } }, "required": [ "self" ] }, "ReportTimeframeRequest": { "type": "object", "properties": { "key": { "description": "Named preset window.", "type": "string", "enum": [ "today", "yesterday", "this_week", "last_week", "last_7_days", "last_30_days", "last_90_days", "this_month", "last_month" ], "nullable": true }, "start": { "description": "ISO-8601 lower-bound (inclusive) for the report window.", "type": "string", "format": "date-time", "example": "2026-05-01T00:00:00+00:00", "nullable": true }, "end": { "description": "ISO-8601 upper-bound (exclusive) for the report window.", "type": "string", "format": "date-time", "example": "2026-06-01T00:00:00+00:00", "nullable": true } } }, "ValuesData": { "type": "object", "properties": { "groupings": { "description": "Bucket-identifying values for this row. Empty when the request omits groupings for a single aggregate row.", "type": "object" }, "statistics": { "description": "Computed metrics for this row. Only the statistics named in the request appear here.", "type": "object" } }, "required": [ "groupings", "statistics" ] }, "ValuesGrouping": { "description": "Optional dimensions that can break down conversation values-report\n rows.", "type": "string", "enum": [ "channel", "status" ] }, "ValuesStatistic": { "description": "Metrics computable for each conversation values-report bucket.", "type": "string", "enum": [ "volume", "resolution_rate" ] } }, "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-10-15.pre/reference/api-overview#authentication", "x-default": "Klaviyo-API-Key your-private-api-key" } } }, "tags": [ { "name": "Beta APIs", "description": "beta apis" } ] }