{
"openapi": "3.0.2",
"info": {
"title": "Klaviyo API (Beta)",
"version": "2026-04-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/campaigns/{id}/campaign-audiences": {
"get": {
"operationId": "get_campaign_audiences_for_campaign_beta",
"summary": "Get Campaign Audiences for Campaign",
"description": "\n > \ud83d\udea7 This endpoint is in beta and will be released in GA in our 2026-07-15 revision.\n >\n > A beta revision header (2026-04-15.pre) is required to use our beta APIs.\n\nGet all campaign audiences for the given campaign ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m`\n\n**Scopes:**\n`campaigns:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/beta/apis/get_campaign_audiences_for_campaign_beta.json)",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The campaign ID",
"required": true,
"schema": {
"description": "The campaign ID",
"type": "string"
}
},
{
"name": "fields[campaign-audience]",
"in": "query",
"description": "For more information please visit https://developers.klaviyo.com/en/v2026-04-15.pre/reference/api-overview#sparse-fieldsets",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"created",
"definition",
"definition.excluded",
"definition.included",
"definition.name",
"definition.priority",
"id",
"updated"
]
}
},
"explode": false
},
{
"name": "revision",
"in": "header",
"description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
"required": true,
"schema": {
"type": "string",
"default": "2026-04-15.pre"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/GetAudienceResponseCollection"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/ClientError"
},
"5XX": {
"$ref": "#/components/responses/ServerError"
}
},
"tags": [
"Beta APIs"
],
"x-klaviyo-operation-aliases": [
"get_audiences_for_campaign",
"get_campaign_audiences"
],
"x-klaviyo-pre-release": "BETA",
"x-klaviyo-ratelimit": {
"burst": "10/s",
"steady": "150/m"
},
"x-klaviyo-scopes": [
"campaigns:read"
],
"x-klaviyo-subtag": "Campaigns"
}
}
},
"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": {
"AudienceDefinition": {
"type": "object",
"properties": {
"name": {
"description": "The name of the audience",
"type": "string",
"example": "My Audience",
"nullable": true
},
"included": {
"description": "The list of included group IDs",
"type": "array",
"items": {
"type": "string"
},
"example": [
"abc123"
],
"nullable": true
},
"excluded": {
"description": "The list of excluded group IDs",
"type": "array",
"items": {
"type": "string"
},
"example": [
"abc123"
],
"nullable": true
},
"priority": {
"description": "The priority of the audience",
"type": "integer",
"example": 1,
"nullable": true
}
}
},
"AudienceResponseObjectResource": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/CampaignAudienceEnum"
},
"id": {
"description": "The ID of the audience",
"type": "string",
"example": "925e385b52fb405715f3616c337cc65c"
},
"attributes": {
"type": "object",
"properties": {
"created": {
"description": "The datetime when this audience was created",
"type": "string",
"format": "date-time",
"example": "2022-11-08T00:00:00+00:00"
},
"updated": {
"description": "The datetime when this audience was last updated",
"type": "string",
"format": "date-time",
"example": "2022-11-08T00:00:00+00:00"
},
"definition": {
"description": "The definition of this audience",
"$ref": "#/components/schemas/AudienceDefinition"
}
},
"required": [
"created",
"updated",
"definition"
]
},
"relationships": {
"type": "object",
"properties": {
"campaign": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/CampaignEnum"
},
"id": {
"description": "Related Campaign",
"type": "string"
}
},
"required": [
"type",
"id"
]
},
"links": {
"$ref": "#/components/schemas/RelationshipLinks"
}
}
},
"campaign-messages": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"id"
],
"properties": {
"type": {
"$ref": "#/components/schemas/CampaignMessageEnum"
},
"id": {
"description": "Related Campaign Messages",
"type": "string"
}
}
}
},
"links": {
"$ref": "#/components/schemas/RelationshipLinks"
}
}
}
}
},
"links": {
"$ref": "#/components/schemas/ObjectLinks"
}
},
"required": [
"type",
"id",
"attributes",
"links"
]
},
"CampaignAudienceEnum": {
"type": "string",
"enum": [
"campaign-audience"
]
},
"CampaignEnum": {
"type": "string",
"enum": [
"campaign"
]
},
"CampaignMessageEnum": {
"type": "string",
"enum": [
"campaign-message"
]
},
"CollectionLinks": {
"type": "object",
"properties": {
"self": {
"type": "string",
"format": "uri"
},
"prev": {
"type": "string",
"format": "uri"
},
"next": {
"type": "string",
"format": "uri"
}
},
"required": [
"self"
]
},
"GetAudienceResponseCollection": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AudienceResponseObjectResource"
}
},
"links": {
"$ref": "#/components/schemas/CollectionLinks"
}
},
"required": [
"data"
]
},
"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"
]
}
},
"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.pre/reference/api-overview#authentication",
"x-default": "Klaviyo-API-Key your-private-api-key"
}
}
},
"tags": [
{
"name": "Beta APIs",
"description": "beta apis"
}
]
}