{ "openapi": "3.0.2", "info": { "title": "Klaviyo API (Beta)", "version": "2026-07-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/brand-email-defaults/{id}": { "patch": { "operationId": "update_brand_email_default_beta", "summary": "Update Brand Email Default", "description": "\n > \ud83d\udea7 This endpoint is in beta and subject to change.\n >\n > A beta revision header (2026-07-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\nPartial update of the brand email defaults for the authenticated account.

*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`brands:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/beta/apis/update_brand_email_default_beta.json)", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the brand email defaults (must equal the account ID).", "required": true, "schema": { "description": "The ID of the brand email defaults (must equal the account ID).", "type": "string", "example": "abc123" } }, { "name": "fields[brand-email-default]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15.pre/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "body", "body.background_color", "body.body_background_color", "body.h1_text", "body.h1_text.color", "body.h1_text.font_family", "body.h1_text.font_size", "body.h1_text.font_style", "body.h1_text.font_weight", "body.h1_text.letter_spacing", "body.h1_text.text_decoration", "body.h2_text", "body.h2_text.color", "body.h2_text.font_family", "body.h2_text.font_size", "body.h2_text.font_style", "body.h2_text.font_weight", "body.h2_text.letter_spacing", "body.h2_text.text_decoration", "body.h3_text", "body.h3_text.color", "body.h3_text.font_family", "body.h3_text.font_size", "body.h3_text.font_style", "body.h3_text.font_weight", "body.h3_text.letter_spacing", "body.h3_text.text_decoration", "body.h4_text", "body.h4_text.color", "body.h4_text.font_family", "body.h4_text.font_size", "body.h4_text.font_style", "body.h4_text.font_weight", "body.h4_text.letter_spacing", "body.h4_text.text_decoration", "body.link_text", "body.link_text.color", "body.link_text.font_family", "body.link_text.font_size", "body.link_text.font_style", "body.link_text.font_weight", "body.link_text.letter_spacing", "body.link_text.text_decoration", "body.text", "body.text.color", "body.text.font_family", "body.text.font_size", "body.text.font_style", "body.text.font_weight", "body.text.letter_spacing", "body.text.text_decoration", "footer", "footer.background_color", "footer.link_text", "footer.link_text.color", "footer.link_text.font_family", "footer.link_text.font_size", "footer.link_text.font_style", "footer.link_text.font_weight", "footer.link_text.letter_spacing", "footer.link_text.text_decoration", "footer.social_group_color", "footer.text", "footer.text.color", "footer.text.font_family", "footer.text.font_size", "footer.text.font_style", "footer.text.font_weight", "footer.text.letter_spacing", "footer.text.text_decoration", "header", "header.background_color", "header.link_text", "header.link_text.color", "header.link_text.font_family", "header.link_text.font_size", "header.link_text.font_style", "header.link_text.font_weight", "header.link_text.letter_spacing", "header.link_text.text_decoration", "header.links", "header.logo_max_width", "id" ] } }, "explode": false }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15.pre" } } ], "requestBody": { "description": "PATCH /api/brand-email-defaults/{id}: JSON:API field-level partial update.", "required": true, "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/BrandEmailDefaultPartialUpdateQuery" } } } }, "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/PatchBrandEmailDefaultResponse" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Beta APIs" ], "x-klaviyo-pre-release": "BETA", "x-klaviyo-ratelimit": { "burst": "3/s", "steady": "60/m" }, "x-klaviyo-scopes": [ "brands:write" ], "x-klaviyo-subtag": "Brands" } } }, "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": { "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" } } } }, "BrandButtonEnum": { "type": "string", "enum": [ "brand-button" ] }, "BrandEmailBodyAttributes": { "type": "object", "properties": { "background_color": { "description": "Hex color for the body section background.", "type": "string", "example": "#ffffff" }, "body_background_color": { "description": "Hex color for the canvas behind the body content. Visible as a frame around the body when the email is wider than the body.", "type": "string", "example": "#f5f5f5" }, "text": { "description": "Default text styles for paragraph copy in the body.", "$ref": "#/components/schemas/TextStyles" }, "h1_text": { "description": "H1 heading styles.", "$ref": "#/components/schemas/TextStyles" }, "h2_text": { "description": "H2 heading styles.", "$ref": "#/components/schemas/TextStyles" }, "h3_text": { "description": "H3 heading styles.", "$ref": "#/components/schemas/TextStyles" }, "h4_text": { "description": "H4 heading styles.", "$ref": "#/components/schemas/TextStyles" }, "link_text": { "description": "Default styles for inline body links.", "$ref": "#/components/schemas/LinkTextStyles" } }, "required": [ "background_color", "body_background_color", "text", "h1_text", "h2_text", "h3_text", "h4_text", "link_text" ] }, "BrandEmailBodyPatchAttributes": { "type": "object", "properties": { "background_color": { "description": "Hex color for the body section background.", "type": "string", "example": "#ffffff", "nullable": true }, "body_background_color": { "description": "Hex color for the canvas behind the body content. Visible as a frame around the body when the email is wider than the body.", "type": "string", "example": "#f5f5f5", "nullable": true }, "text": { "description": "Default text styles for paragraph copy in the body.", "$ref": "#/components/schemas/TextStyles", "nullable": true }, "h1_text": { "description": "H1 heading styles.", "$ref": "#/components/schemas/TextStyles", "nullable": true }, "h2_text": { "description": "H2 heading styles.", "$ref": "#/components/schemas/TextStyles", "nullable": true }, "h3_text": { "description": "H3 heading styles.", "$ref": "#/components/schemas/TextStyles", "nullable": true }, "h4_text": { "description": "H4 heading styles.", "$ref": "#/components/schemas/TextStyles", "nullable": true }, "link_text": { "description": "Default styles for inline body links.", "$ref": "#/components/schemas/LinkTextStyles", "nullable": true } } }, "BrandEmailDefaultEnum": { "type": "string", "enum": [ "brand-email-default" ] }, "BrandEmailDefaultPartialUpdateQuery": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/BrandEmailDefaultPartialUpdateQueryResourceObject" } }, "required": [ "data" ] }, "BrandEmailDefaultPartialUpdateQueryResourceObject": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BrandEmailDefaultEnum" }, "id": { "description": "The ID of the brand email defaults (must equal the account ID).", "type": "string", "example": "abc123" }, "attributes": { "type": "object", "properties": { "body": { "description": "Patch the body styling block (per-field merge).", "$ref": "#/components/schemas/BrandEmailBodyPatchAttributes", "nullable": true }, "header": { "description": "Patch the header styling block (per-field merge).", "$ref": "#/components/schemas/BrandEmailHeaderPatchAttributes", "nullable": true }, "footer": { "description": "Patch the footer styling block (per-field merge).", "$ref": "#/components/schemas/BrandEmailFooterPatchAttributes", "nullable": true } } }, "relationships": { "type": "object", "properties": { "brand-button": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BrandButtonEnum" }, "id": { "type": "string" } }, "required": [ "type", "id" ] } } }, "brand-logo": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BrandLogoEnum" }, "id": { "type": "string" } }, "required": [ "type", "id" ] } } }, "brand-social-group": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BrandSocialGroupEnum" }, "id": { "type": "string" } }, "required": [ "type", "id" ] } } } } } }, "required": [ "type", "id", "attributes" ] }, "BrandEmailFooterAttributes": { "type": "object", "properties": { "background_color": { "description": "Hex color for the footer background.", "type": "string", "example": "#ffffff" }, "text": { "description": "Footer body text styles.", "$ref": "#/components/schemas/TextStyles" }, "link_text": { "description": "Footer link text styles.", "$ref": "#/components/schemas/LinkTextStyles" }, "social_group_color": { "description": "Color treatment to apply to social-group icons in the footer (`black`, `default`, `grey`, or `white`).", "type": "string", "example": "default", "enum": [ "black", "default", "grey", "white" ] } }, "required": [ "background_color", "text", "link_text", "social_group_color" ] }, "BrandEmailFooterPatchAttributes": { "type": "object", "properties": { "background_color": { "description": "Hex color for the footer background.", "type": "string", "example": "#ffffff", "nullable": true }, "text": { "description": "Footer body text styles.", "$ref": "#/components/schemas/TextStyles", "nullable": true }, "link_text": { "description": "Footer link text styles.", "$ref": "#/components/schemas/LinkTextStyles", "nullable": true }, "social_group_color": { "description": "Color treatment to apply to social-group icons in the footer (`black`, `default`, `grey`, or `white`).", "type": "string", "example": "default", "enum": [ "black", "default", "grey", "white" ], "nullable": true } } }, "BrandEmailHeaderAttributes": { "type": "object", "properties": { "background_color": { "description": "Hex color for the header background.", "type": "string", "example": "#000000" }, "links": { "description": "Header navigation links rendered above the body.", "type": "array", "items": { "$ref": "#/components/schemas/EmailHeaderLink" } }, "link_text": { "description": "Header link text styles.", "$ref": "#/components/schemas/LinkTextStyles" }, "logo_max_width": { "description": "Maximum rendered width of the header logo, in pixels. `null` lets the logo render at its natural width.", "type": "integer", "example": 160, "default": 160, "nullable": true } }, "required": [ "background_color", "links", "link_text" ] }, "BrandEmailHeaderPatchAttributes": { "type": "object", "properties": { "background_color": { "description": "Hex color for the header background.", "type": "string", "example": "#000000", "nullable": true }, "links": { "description": "Header navigation links rendered above the body.", "type": "array", "items": { "$ref": "#/components/schemas/EmailHeaderLink" }, "nullable": true }, "link_text": { "description": "Header link text styles.", "$ref": "#/components/schemas/LinkTextStyles", "nullable": true }, "logo_max_width": { "description": "Maximum rendered width of the header logo, in pixels. Omit to preserve the currently stored value; send `null` to clear it (the logo will render at its natural width).", "type": "integer", "example": 160, "nullable": true } } }, "BrandLogoEnum": { "type": "string", "enum": [ "brand-logo" ] }, "BrandSocialGroupEnum": { "type": "string", "enum": [ "brand-social-group" ] }, "EmailHeaderLink": { "type": "object", "properties": { "text": { "type": "string" }, "url": { "type": "string" } }, "required": [ "text", "url" ] }, "LinkTextStyles": { "type": "object", "properties": { "color": { "type": "string" }, "font_size": { "type": "integer", "nullable": true }, "font_style": { "description": "Font style.", "type": "string", "enum": [ "italic", "normal" ] }, "font_weight": { "description": "Font weight.", "type": "integer", "enum": [ 100, 200, 300, 400, 500, 600, 700, 800, 900 ], "nullable": true }, "font_family": { "type": "string", "nullable": true }, "letter_spacing": { "nullable": true, "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "text_decoration": { "description": "Text decoration.", "type": "string", "enum": [ "", "line-through", "line-through underline", "none", "underline", "underline line-through" ] } }, "required": [ "color", "font_style", "text_decoration" ] }, "ObjectLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } }, "required": [ "self" ] }, "PatchBrandEmailDefaultResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BrandEmailDefaultEnum" }, "id": { "description": "The ID of the brand email defaults (equal to the company ID).", "type": "string", "example": "abc123" }, "attributes": { "type": "object", "properties": { "body": { "description": "Default styling for the email body.", "$ref": "#/components/schemas/BrandEmailBodyAttributes" }, "header": { "description": "Default styling for the email header.", "$ref": "#/components/schemas/BrandEmailHeaderAttributes" }, "footer": { "description": "Default styling for the email footer.", "$ref": "#/components/schemas/BrandEmailFooterAttributes" } }, "required": [ "body", "header", "footer" ] }, "relationships": { "type": "object", "properties": { "brand-button": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BrandButtonEnum" }, "id": { "type": "string" } }, "required": [ "type", "id" ] }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "brand-logo": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BrandLogoEnum" }, "id": { "type": "string" } }, "required": [ "type", "id" ] }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "brand-social-group": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BrandSocialGroupEnum" }, "id": { "type": "string" } }, "required": [ "type", "id" ] }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "links": { "$ref": "#/components/schemas/ObjectLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "RelationshipLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" }, "related": { "type": "string", "format": "uri" } }, "required": [ "self", "related" ] }, "ResponseMeta": { "description": "Response-level metadata", "type": "object", "properties": { "agent_hints": { "$ref": "#/components/schemas/AgentHints" } } }, "TextStyles": { "type": "object", "properties": { "color": { "type": "string" }, "font_size": { "type": "integer" }, "font_style": { "description": "Font style.", "type": "string", "enum": [ "italic", "normal" ] }, "font_family": { "type": "string" }, "font_weight": { "description": "Font weight.", "type": "integer", "enum": [ 100, 200, 300, 400, 500, 600, 700, 800, 900 ] }, "letter_spacing": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "text_decoration": { "description": "Text decoration.", "type": "string", "enum": [ "", "line-through", "line-through underline", "none", "underline", "underline line-through" ] } }, "required": [ "color", "font_size", "font_style", "font_family", "font_weight", "letter_spacing", "text_decoration" ] } }, "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.pre/reference/api-overview#authentication", "x-default": "Klaviyo-API-Key your-private-api-key" } } }, "tags": [ { "name": "Beta APIs", "description": "beta apis" } ] }