{ "openapi": "3.0.2", "info": { "title": "Klaviyo API", "version": "2026-07-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/campaigns": { "get": { "operationId": "get_campaigns", "summary": "Get Campaigns", "description": "Returns some or all campaigns based on filters.\n\nA channel filter is required to list campaigns. Please provide either:\n`?filter=equals(messages.channel,'email')` to list email campaigns, or\n`?filter=equals(messages.channel,'sms')` to list SMS campaigns.\n`?filter=equals(messages.channel,'mobile_push')` to list mobile push campaigns.

*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/stable/apis/get_campaigns.json)", "parameters": [ { "name": "fields[campaign-message]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "created_at", "definition", "definition.channel", "definition.content", "definition.content.action_buttons", "definition.content.bcc_email", "definition.content.body", "definition.content.cc_email", "definition.content.dynamic_image", "definition.content.from_email", "definition.content.from_label", "definition.content.media_url", "definition.content.preview_text", "definition.content.reply_to_email", "definition.content.subject", "definition.content.title", "definition.kv_pairs", "definition.label", "definition.notification_type", "definition.options", "definition.options.badge", "definition.options.badge.badge_options", "definition.options.badge.badge_options.badge_config", "definition.options.badge.badge_options.set_from_property", "definition.options.badge.badge_options.value", "definition.options.badge.display", "definition.options.on_open", "definition.options.on_open.android_deep_link", "definition.options.on_open.ios_deep_link", "definition.options.on_open.type", "definition.options.on_open.web_url", "definition.options.play_sound", "definition.render_options", "definition.render_options.add_info_link", "definition.render_options.add_opt_out_language", "definition.render_options.add_org_prefix", "definition.render_options.shorten_links", "id", "send_times", "updated_at" ] } }, "explode": false }, { "name": "fields[campaign]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "archived", "audiences", "audiences.excluded", "audiences.included", "created_at", "id", "name", "scheduled_at", "send_options", "send_options.use_smart_sending", "send_strategy", "send_strategy.date", "send_strategy.datetime", "send_strategy.method", "send_strategy.options", "send_strategy.options.is_local", "send_strategy.options.send_past_recipients_immediately", "send_strategy.throttle_percentage", "send_time", "status", "tracking_options", "tracking_options.add_tracking_params", "tracking_options.custom_tracking_params", "tracking_options.is_tracking_clicks", "tracking_options.is_tracking_opens", "updated_at" ] } }, "explode": false }, { "name": "fields[tag]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "id", "name" ] } }, "explode": false }, { "name": "filter", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#filtering
Allowed field(s)/operator(s):
`id`: `any` (string)
`messages.channel`: `equals` (allowed values: `'email'`, `'sms'`, `'mobile_push'`)
`name`: `contains` (string)
`status`: `any`, `equals` (allowed values: `'Scheduled'`, `'Sent'`, `'Draft'`, `'Cancelled'`, `'Adding Recipients'`, `'Sending'`, `'Variations Sent'`, `'Sending Segments'`, `'Cancelled: Smart Sending'`, `'Preparing to send'`, `'Cancelled: Account Disabled'`, `'Cancelled: No Recipients'`, `'Preparing to schedule'`, `'Cancelled: Internal Error'`, `'Queued without Recipients'`, `'Cancelled: Billing Limit'`, `'Cancelled: Misconfigured'`, `'Unknown'`)
`archived`: `equals` (boolean)
`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (date-time)
`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (date-time)
`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (date-time)", "required": true, "schema": { "type": "string", "example": "equals(messages.channel,'email')" } }, { "name": "include", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#relationships", "schema": { "type": "array", "items": { "type": "string", "enum": [ "campaign-messages", "tags" ] } }, "explode": false }, { "name": "page[cursor]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#pagination", "required": false, "schema": { "type": "string" } }, { "name": "page[size]", "in": "query", "description": "Default: 100. Min: 1. Max: 100.", "required": false, "schema": { "type": "integer", "default": 100, "maximum": 100, "minimum": 1 } }, { "name": "sort", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sorting", "schema": { "type": "string", "enum": [ "created_at", "-created_at", "id", "-id", "name", "-name", "scheduled_at", "-scheduled_at", "updated_at", "-updated_at" ] } }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetCampaignResponseCollectionCompoundDocument" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Campaigns" ], "x-klaviyo-filters": { "id": { "operators": { "list": [ "any" ] }, "value": { "type": "string" } }, "messages.channel": { "operators": { "single": [ "equals" ] }, "value": { "type": "string", "enum": [ "email", "sms", "mobile_push" ] } }, "name": { "operators": { "single": [ "contains" ] }, "value": { "type": "string" } }, "status": { "operators": { "list": [ "any", "equals" ], "single": [ "equals" ] }, "value": { "type": "string", "enum": [ "Scheduled", "Sent", "Draft", "Cancelled", "Adding Recipients", "Sending", "Variations Sent", "Sending Segments", "Cancelled: Smart Sending", "Preparing to send", "Cancelled: Account Disabled", "Cancelled: No Recipients", "Preparing to schedule", "Cancelled: Internal Error", "Queued without Recipients", "Cancelled: Billing Limit", "Cancelled: Misconfigured", "Unknown" ] } }, "archived": { "operators": { "single": [ "equals" ] }, "value": { "type": "boolean" } }, "created_at": { "operators": { "single": [ "greater-or-equal", "greater-than", "less-or-equal", "less-than" ] }, "value": { "type": "string", "format": "date-time" } }, "scheduled_at": { "operators": { "single": [ "greater-or-equal", "greater-than", "less-or-equal", "less-than" ] }, "value": { "type": "string", "format": "date-time" } }, "updated_at": { "operators": { "single": [ "greater-or-equal", "greater-than", "less-or-equal", "less-than" ] }, "value": { "type": "string", "format": "date-time" } } }, "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "10/s", "steady": "150/m" }, "x-klaviyo-scopes": [ "campaigns: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": { "ABTestSendStrategy": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "ab_test_campaign" ] } }, "required": [ "method" ] }, "AgentHints": { "description": "Optional hints emitted by the API for agent callers", "type": "object", "properties": { "next_steps": { "description": "Suggested follow-up actions for agents to take after this response", "type": "array", "items": { "type": "string" } } } }, "Audiences": { "type": "object", "properties": { "included": { "description": "A list of included audiences", "type": "array", "items": { "type": "string" }, "example": [ "Y6nRLr" ] }, "excluded": { "description": "An optional list of excluded audiences", "type": "array", "items": { "type": "string" }, "example": [ "UTd5ui" ], "nullable": true } }, "required": [ "included" ] }, "CampaignEnum": { "type": "string", "enum": [ "campaign" ] }, "CampaignMessageEnum": { "type": "string", "enum": [ "campaign-message" ] }, "CampaignMessageIncrement": { "type": "object", "properties": { "badge_config": { "type": "string", "enum": [ "increment_one" ] } }, "required": [ "badge_config" ] }, "CampaignMessageProperty": { "type": "object", "properties": { "badge_config": { "type": "string", "enum": [ "set_property" ] }, "set_from_property": { "type": "string" } }, "required": [ "badge_config", "set_from_property" ] }, "CampaignMessageResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/CampaignMessageEnum" }, "id": { "description": "The message ID", "type": "string" }, "attributes": { "type": "object", "properties": { "definition": { "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/EmailMessageDefinition" }, { "$ref": "#/components/schemas/SMSMessageDefinition" }, { "$ref": "#/components/schemas/MobilePushMessageStandardDefinition" }, { "$ref": "#/components/schemas/MobilePushMessageSilentDefinition" } ] }, "send_times": { "description": "The list of appropriate Send Time Sub-objects associated with the message", "type": "array", "items": { "$ref": "#/components/schemas/SendTime" }, "nullable": true }, "created_at": { "description": "The datetime when the message was created", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated_at": { "description": "The datetime when the message was last updated", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true } } }, "relationships": { "type": "object", "properties": { "campaign": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/CampaignEnum" }, "id": { "description": "The parent campaign id", "type": "string" } }, "required": [ "type", "id" ] }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "template": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/TemplateEnum" }, "id": { "description": "The associated template id", "type": "string" } }, "required": [ "type", "id" ] }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "image": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/ImageEnum" }, "id": { "description": "The associated image id", "type": "string" } }, "required": [ "type", "id" ] }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "CampaignMessageStaticCount": { "type": "object", "properties": { "badge_config": { "type": "string", "enum": [ "set_count" ] }, "value": { "type": "string" } }, "required": [ "badge_config", "value" ] }, "CampaignResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/CampaignEnum" }, "id": { "description": "The campaign ID", "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "description": "The campaign name", "type": "string" }, "status": { "description": "The current status of the campaign", "type": "string", "enum": [ "Adding Recipients", "Cancelled", "Cancelled: Account Disabled", "Cancelled: Billing Limit", "Cancelled: Internal Error", "Cancelled: Misconfigured", "Cancelled: No Recipients", "Cancelled: Smart Sending", "Draft", "Preparing to schedule", "Preparing to send", "Queued without Recipients", "Scheduled", "Sending", "Sending Segments", "Sent", "Unknown", "Variations Sent" ] }, "archived": { "description": "Whether the campaign has been archived or not", "type": "boolean" }, "audiences": { "description": "The audiences to be included and/or excluded from the campaign", "$ref": "#/components/schemas/Audiences" }, "send_options": { "description": "Options to use when sending a campaign", "oneOf": [ { "$ref": "#/components/schemas/EmailSendOptions" }, { "$ref": "#/components/schemas/SMSSendOptions" }, { "$ref": "#/components/schemas/PushSendOptions" } ] }, "tracking_options": { "description": "The tracking options associated with the campaign", "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/CampaignsEmailTrackingOptions" }, { "$ref": "#/components/schemas/CampaignsSMSTrackingOptions" } ] }, "send_strategy": { "description": "The send strategy the campaign will send with", "oneOf": [ { "$ref": "#/components/schemas/StaticSendStrategy" }, { "$ref": "#/components/schemas/SmartSendTimeStrategy" }, { "$ref": "#/components/schemas/ThrottledSendStrategy" }, { "$ref": "#/components/schemas/ImmediateSendStrategy" }, { "$ref": "#/components/schemas/ABTestSendStrategy" }, { "$ref": "#/components/schemas/UnsupportedSendStrategy" } ] }, "created_at": { "description": "The datetime when the campaign was created", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00" }, "scheduled_at": { "description": "The datetime when the campaign was scheduled for future sending", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated_at": { "description": "The datetime when the campaign was last updated by a user or the system", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00" }, "send_time": { "description": "The datetime when the campaign will be / was sent or None if not yet scheduled by a send_job.", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true } }, "required": [ "name", "status", "archived", "audiences", "send_options", "send_strategy", "created_at", "updated_at" ] }, "relationships": { "type": "object", "properties": { "campaign-messages": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/CampaignMessageEnum" }, "id": { "description": "The message(s) associated with the campaign", "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" ] }, "CampaignsEmailTrackingOptions": { "type": "object", "properties": { "add_tracking_params": { "description": "Whether the campaign needs custom tracking parameters. If set to False, tracking params will not be used.", "type": "boolean", "nullable": true }, "custom_tracking_params": { "description": "A list of custom tracking parameters. If an empty list is given and add_tracking_params is True, uses company defaults.", "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/DynamicTrackingParam" }, { "$ref": "#/components/schemas/StaticTrackingParam" } ] }, "nullable": true }, "is_tracking_clicks": { "description": "Whether the campaign is tracking click events. If not specified, uses company defaults.", "type": "boolean", "nullable": true }, "is_tracking_opens": { "description": "Whether the campaign is tracking open events. If not specified, uses company defaults.", "type": "boolean", "nullable": true } } }, "CampaignsSMSTrackingOptions": { "type": "object", "properties": { "add_tracking_params": { "description": "Whether the campaign needs custom tracking parameters. If set to False, tracking params will not be used.", "type": "boolean", "nullable": true }, "custom_tracking_params": { "description": "A list of custom tracking parameters. If an empty list is given and add_tracking_params is True, uses company defaults.", "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/DynamicTrackingParam" }, { "$ref": "#/components/schemas/StaticTrackingParam" } ] }, "nullable": true } } }, "CollectionLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" }, "prev": { "type": "string", "format": "uri" }, "next": { "type": "string", "format": "uri" } }, "required": [ "self" ] }, "DynamicTrackingParam": { "type": "object", "properties": { "type": { "description": "The type of the tracking parameter", "type": "string", "enum": [ "dynamic" ] }, "value": { "description": "The value of the tracking parameter", "type": "string", "enum": [ "campaign_id", "campaign_name", "campaign_name_id", "campaign_name_send_day", "email_subject", "group_id", "group_name", "group_name_id", "link_alt_text", "message_type", "profile_external_id", "profile_id", "variation_name" ] }, "name": { "description": "Name of the tracking param", "type": "string", "example": "utm_medium" } }, "required": [ "type", "value", "name" ] }, "EmailContent": { "type": "object", "properties": { "subject": { "description": "The subject of the message", "type": "string", "example": "Buy our product!", "nullable": true }, "preview_text": { "description": "Preview text associated with the message", "type": "string", "example": "My preview text", "nullable": true }, "from_email": { "description": "The email the message should be sent from", "type": "string", "example": "store@my-company.com", "nullable": true }, "from_label": { "description": "The label associated with the from_email", "type": "string", "example": "My Company", "nullable": true }, "reply_to_email": { "description": "Optional Reply-To email address", "type": "string", "example": "reply-to@my-company.com", "nullable": true }, "cc_email": { "description": "Optional CC email address", "type": "string", "example": "cc@my-company.com", "nullable": true }, "bcc_email": { "description": "Optional BCC email address", "type": "string", "example": "bcc@my-company.com", "nullable": true } } }, "EmailMessageDefinition": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "email" ] }, "label": { "description": "The label or name on the message", "type": "string", "example": "My message name", "nullable": true }, "content": { "$ref": "#/components/schemas/EmailContent", "description": "Additional attributes relating to the content of the message", "nullable": true } }, "required": [ "channel" ] }, "EmailSendOptions": { "type": "object", "properties": { "use_smart_sending": { "description": "Use smart sending.", "type": "boolean", "example": true, "default": true, "nullable": true } } }, "FlowEnum": { "type": "string", "enum": [ "flow" ] }, "GetCampaignResponseCollectionCompoundDocument": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CampaignResponseObjectResource" } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" }, "included": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/TagResponseObjectResource" }, { "$ref": "#/components/schemas/CampaignMessageResponseObjectResource" } ] } } }, "required": [ "data" ] }, "ImageEnum": { "type": "string", "enum": [ "image" ] }, "ImmediateSendStrategy": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "immediate" ] } }, "required": [ "method" ] }, "ListEnum": { "type": "string", "enum": [ "list" ] }, "LocalStaticSend": { "type": "object", "properties": { "is_local": { "description": "Whether the campaign should be sent with local recipient timezone send (requires UTC time) or statically sent at the given time.", "type": "boolean", "enum": [ true ] }, "send_past_recipients_immediately": { "description": "Determines if we should send to local recipient timezone if the given time has passed. Only applicable to local sends.", "type": "boolean", "default": false } }, "required": [ "is_local" ] }, "MobilePushBadge": { "type": "object", "properties": { "display": { "description": "Whether to display a badge on the app icon", "type": "boolean", "enum": [ true ] }, "badge_options": { "description": "Badge options", "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/CampaignMessageIncrement" }, { "$ref": "#/components/schemas/CampaignMessageStaticCount" }, { "$ref": "#/components/schemas/CampaignMessageProperty" } ] } }, "required": [ "display" ] }, "MobilePushContent": { "type": "object", "properties": { "title": { "description": "The title of the message", "type": "string", "nullable": true }, "body": { "description": "The message body", "type": "string", "example": "My preview push notification", "nullable": true }, "dynamic_image": { "description": "The dynamic image to be used in the push notification", "type": "string", "nullable": true }, "action_buttons": { "description": "Action buttons for the push notification", "type": "array", "items": { "$ref": "#/components/schemas/PushActionButtonDefinition" }, "nullable": true } } }, "MobilePushMessageSilentDefinition": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "mobile_push" ] }, "notification_type": { "description": "The type of notification to send", "type": "string", "enum": [ "silent" ] }, "kv_pairs": { "description": "The key-value pairs to be sent with the push notification", "type": "object", "nullable": true } }, "required": [ "channel", "notification_type" ] }, "MobilePushMessageStandardDefinition": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "mobile_push" ] }, "notification_type": { "description": "The type of notification to send", "type": "string", "enum": [ "standard" ] }, "content": { "$ref": "#/components/schemas/MobilePushContent", "description": "Additional attributes relating to the content of the message" }, "kv_pairs": { "description": "The key-value pairs to be sent with the push notification", "type": "object", "nullable": true }, "options": { "$ref": "#/components/schemas/MobilePushOptions", "nullable": true } }, "required": [ "channel", "notification_type", "content" ] }, "MobilePushNoBadge": { "type": "object", "properties": { "display": { "description": "Whether to display a badge on the app icon", "type": "boolean", "enum": [ false ] } }, "required": [ "display" ] }, "MobilePushOptions": { "type": "object", "properties": { "on_open": { "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/PushOnOpenApp" }, { "$ref": "#/components/schemas/PushOnOpenDeepLink" }, { "$ref": "#/components/schemas/PushOnOpenWebUrl" } ] }, "badge": { "description": "Only supported on iOS.", "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/MobilePushBadge" }, { "$ref": "#/components/schemas/MobilePushNoBadge" } ] }, "play_sound": { "description": "Only supported on iOS.", "type": "boolean", "default": false, "nullable": true } } }, "NonLocalStaticSend": { "type": "object", "properties": { "is_local": { "description": "Whether the campaign should be sent with local recipient timezone send (requires UTC time) or statically sent at the given time.", "type": "boolean", "enum": [ false ] } }, "required": [ "is_local" ] }, "ObjectLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } }, "required": [ "self" ] }, "PushActionButtonDefinition": { "type": "object", "properties": { "label": { "description": "The button label (max 40 characters)", "type": "string" }, "action_type": { "description": "The action type: open_app, deep_link, open_url, or dismiss", "type": "string" }, "position": { "description": "The display order of the button (0-indexed). If omitted, inferred from the button's order in the list.", "type": "integer", "nullable": true }, "url": { "description": "URL for deep_link or open_url action types (max 2048 characters). Used as a fallback on platforms without a more specific ios_deep_link or android_deep_link.", "type": "string", "nullable": true }, "ios_deep_link": { "description": "iOS-specific URL for deep_link or open_url action types (max 2048 characters). Overrides url on iOS.", "type": "string", "nullable": true }, "android_deep_link": { "description": "Android-specific URL for deep_link or open_url action types (max 2048 characters). Overrides url on Android.", "type": "string", "nullable": true } }, "required": [ "label", "action_type" ] }, "PushOnOpenApp": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "open_app" ] } }, "required": [ "type" ] }, "PushOnOpenDeepLink": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "deep_link" ] }, "ios_deep_link": { "description": "required for all platforms enabled for push", "type": "string", "nullable": true }, "android_deep_link": { "description": "required for all platforms enabled for push", "type": "string", "nullable": true } }, "required": [ "type" ] }, "PushOnOpenWebUrl": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "open_web_url" ] }, "web_url": { "description": "External url to open when push notification is triggered", "type": "string", "nullable": true } }, "required": [ "type" ] }, "PushSendOptions": { "type": "object", "properties": { "use_smart_sending": { "description": "Use smart sending.", "type": "boolean", "example": true, "default": true, "nullable": true } } }, "RelationshipLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" }, "related": { "type": "string", "format": "uri" } }, "required": [ "self", "related" ] }, "RenderOptions": { "type": "object", "properties": { "shorten_links": { "type": "boolean", "example": true, "default": true, "nullable": true }, "add_org_prefix": { "type": "boolean", "example": true, "default": true, "nullable": true }, "add_info_link": { "type": "boolean", "example": true, "default": true, "nullable": true }, "add_opt_out_language": { "type": "boolean", "default": false, "nullable": true } } }, "ResponseMeta": { "description": "Response-level metadata", "type": "object", "properties": { "agent_hints": { "$ref": "#/components/schemas/AgentHints" } } }, "SMSContent": { "type": "object", "properties": { "body": { "description": "The message body", "type": "string", "example": "My preview sms", "nullable": true }, "media_url": { "description": "URL for included media", "type": "string", "nullable": true } } }, "SMSMessageDefinition": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "sms" ] }, "content": { "$ref": "#/components/schemas/SMSContent", "description": "Additional attributes relating to the content of the message", "nullable": true }, "render_options": { "description": "Additional options for rendering the message", "$ref": "#/components/schemas/RenderOptions", "nullable": true } }, "required": [ "channel" ] }, "SMSSendOptions": { "type": "object", "properties": { "use_smart_sending": { "description": "Use smart sending.", "type": "boolean", "example": true, "default": true, "nullable": true } } }, "SegmentEnum": { "type": "string", "enum": [ "segment" ] }, "SendTime": { "type": "object", "properties": { "datetime": { "description": "The datetime that the message is to be sent", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00" }, "is_local": { "description": "Whether that datetime is to be a local datetime for the recipient", "type": "boolean" } }, "required": [ "datetime", "is_local" ] }, "SmartSendTimeStrategy": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "smart_send_time" ] }, "date": { "description": "The day to send on", "type": "string", "format": "date" } }, "required": [ "method", "date" ] }, "StaticSendStrategy": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "static" ] }, "datetime": { "description": "The time to send at", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00" }, "options": { "description": "If the campaign should be sent with local recipient timezone send (requires UTC time) or statically sent at the given time.", "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/LocalStaticSend" }, { "$ref": "#/components/schemas/NonLocalStaticSend" } ] } }, "required": [ "method", "datetime" ] }, "StaticTrackingParam": { "type": "object", "properties": { "type": { "description": "The type of the tracking parameter", "type": "string", "enum": [ "static" ] }, "value": { "description": "The value of the tracking parameter", "type": "string" }, "name": { "description": "Name of the tracking param", "type": "string", "example": "utm_medium" } }, "required": [ "type", "value", "name" ] }, "TagEnum": { "type": "string", "enum": [ "tag" ] }, "TagGroupEnum": { "type": "string", "enum": [ "tag-group" ] }, "TagResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "description": "The Tag ID", "type": "string", "example": "abcd1234-ef56-gh78-ij90-abcdef123456" }, "attributes": { "type": "object", "properties": { "name": { "description": "The Tag name", "type": "string", "example": "My Tag" } }, "required": [ "name" ] }, "relationships": { "type": "object", "properties": { "tag-group": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/TagGroupEnum" }, "id": { "type": "string" } }, "required": [ "type", "id" ] }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "lists": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/ListEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "segments": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "campaigns": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/CampaignEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "flows": { "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" ] }, "TemplateEnum": { "type": "string", "enum": [ "template" ] }, "ThrottledSendStrategy": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "throttled" ] }, "datetime": { "description": "The time to send at", "type": "string", "format": "date-time" }, "throttle_percentage": { "description": "The percentage of recipients per hour to send to.", "type": "integer", "enum": [ 1, 2, 5, 10, 11, 13, 14, 17, 20, 25, 33, 50 ] } }, "required": [ "method", "datetime", "throttle_percentage" ] }, "UnsupportedSendStrategy": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "unsupported" ] } }, "required": [ "method" ] } }, "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-07-15/reference/api-overview#authentication", "x-default": "Klaviyo-API-Key your-private-api-key" } } }, "tags": [ { "name": "Campaigns", "description": "campaigns" } ] }