{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Create a campaign variation.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`\n\n**Scopes:**\n`campaigns:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_campaign_variation.json)","properties":{"query":{"type":"object","properties":{"fields[campaign-variation]":{"type":"array","items":{"type":"string","enum":["created","definition","definition.details","definition.details.action_buttons","definition.details.add_info_link","definition.details.add_opt_out_language","definition.details.add_org_prefix","definition.details.android_deep_link","definition.details.badge","definition.details.badge_config","definition.details.badge_value","definition.details.bcc_email","definition.details.body","definition.details.cc_email","definition.details.channel","definition.details.content_available","definition.details.cost","definition.details.dynamic_media_template","definition.details.from_email","definition.details.from_label","definition.details.include_contact_card","definition.details.ios_deep_link","definition.details.kv_pairs","definition.details.message_hierarchy","definition.details.mms_dynamic_image_template","definition.details.mms_static_image_asset_id","definition.details.mutable_content","definition.details.open_action","definition.details.preview_text","definition.details.push_platform_target","definition.details.push_type","definition.details.reply_to_email","definition.details.send_to_inbox","definition.details.send_to_primary","definition.details.shorten_links","definition.details.sound","definition.details.sound_file_name","definition.details.static_asset_id","definition.details.subject","definition.details.template_id","definition.details.text_message_type","definition.details.title","definition.details.video_asset_id","definition.details.web_url","definition.name","id","updated"]},"description":"For more information please visit https://developers.klaviyo.com/en/v2026-10-15/reference/api-overview#sparse-fieldsets"}},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"revision":{"type":"string","default":"2026-10-15","enum":["2026-10-15"],"description":"API endpoint revision (format: YYYY-MM-DD[.suffix])"}},"required":["revision"],"additionalProperties":false},"body":{"$ref":"#/definitions/VariationCreateQuery"}},"required":["headers","body"],"additionalProperties":false,"definitions":{"VariationCreateQuery":{"type":"object","properties":{"data":{"$ref":"#/definitions/VariationCreateQueryResourceObject"}},"required":["data"]},"VariationCreateQueryResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/CampaignVariationEnum"},"attributes":{"type":"object","properties":{"definition":{"$ref":"#/definitions/VariationDefinition"}},"required":["definition"]},"relationships":{"type":"object","properties":{"campaign-message":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"$ref":"#/definitions/CampaignMessageEnum"},"id":{"description":"Related Campaign Message","type":"string"}},"required":["type","id"]}}}},"required":["campaign-message"]}},"required":["type","attributes","relationships"]},"CampaignVariationEnum":{"type":"string","enum":["campaign-variation"]},"VariationDefinition":{"type":"object","properties":{"name":{"description":"The name of the variation","type":["string","null"]},"details":{"description":"The channel-specific content details for this variation","oneOf":[{"$ref":"#/definitions/EmailChannelDetails"},{"$ref":"#/definitions/SMSChannelDetails"},{"$ref":"#/definitions/PushChannelDetails"},{"$ref":"#/definitions/WhatsappChannelDetails"}]}}},"CampaignMessageEnum":{"type":"string","enum":["campaign-message"]},"EmailChannelDetails":{"type":"object","properties":{"channel":{"type":"string","default":"email","enum":["email"],"examples":["email"]},"template_id":{"type":["string","null"]},"from_label":{"type":"string","default":""},"from_email":{"type":"string","default":""},"reply_to_email":{"type":"string","default":""},"cc_email":{"type":"string","default":""},"bcc_email":{"type":"string","default":""},"subject":{"type":"string","default":""},"preview_text":{"type":"string","default":""}}},"SMSChannelDetails":{"type":"object","properties":{"channel":{"type":"string","default":"sms","enum":["sms"],"examples":["sms"]},"template_id":{"type":["string","null"]},"cost":{"description":"Not allowed on create.","type":["number","null"]},"mms_static_image_asset_id":{"type":["integer","null"]},"shorten_links":{"type":["boolean","null"]},"include_contact_card":{"type":["boolean","null"]},"body":{"type":"string","default":""},"add_org_prefix":{"type":["boolean","null"]},"add_info_link":{"type":["boolean","null"]},"add_opt_out_language":{"type":["boolean","null"]},"mms_dynamic_image_template":{"type":["string","null"]},"text_message_type":{"description":"A sms message variation's text message type.\n\nValues match the Django OmniSMSTextMessageType (MESSAGE_FORMAT_*)\n    constants.","type":"string","default":"SMS","enum":["MMS","RCS","SMS"],"examples":["SMS"]},"message_hierarchy":{"type":["array","null"],"items":{"oneOf":[{"$ref":"#/definitions/MessageHierarchyRcsItem"},{"$ref":"#/definitions/MessageHierarchySmsItem"}]}}}},"PushChannelDetails":{"type":"object","properties":{"channel":{"type":"string","default":"push","enum":["push"],"examples":["push"]},"title":{"type":"string","default":""},"body":{"type":"string","default":""},"badge":{"type":"boolean","default":false},"badge_config":{"description":"A push message variation's badge config.","type":"string","default":"increment-one","enum":["increment-one","set-count","set-property"],"examples":["increment-one"]},"badge_value":{"type":"string","default":"1","examples":["1"]},"sound_file_name":{"type":"string","default":""},"static_asset_id":{"type":["integer","null"]},"sound":{"type":"boolean","default":false},"open_action":{"type":"integer","default":0},"dynamic_media_template":{"type":"string","default":""},"kv_pairs":{"type":["object","null"]},"push_type":{"description":"A push message variation's push type.","type":"string","default":"standard","enum":["silent","standard"],"examples":["standard"]},"ios_deep_link":{"type":["string","null"]},"android_deep_link":{"type":["string","null"]},"web_url":{"type":["string","null"]},"content_available":{"type":["boolean","null"]},"send_to_inbox":{"type":["boolean","null"]},"mutable_content":{"type":["boolean","null"]},"video_asset_id":{"type":["string","null"]},"action_buttons":{"type":["array","null"],"items":{"$ref":"#/definitions/PushActionButtonV0"}},"push_platform_target":{"type":["integer","null"]},"send_to_primary":{"type":["boolean","null"]}}},"WhatsappChannelDetails":{"type":"object","properties":{"channel":{"type":"string","default":"whatsapp","enum":["whatsapp"],"examples":["whatsapp"]},"template_id":{"type":["string","null"]},"shorten_links":{"type":"boolean","default":true,"examples":[true]}}},"MessageHierarchyRcsItem":{"type":"object","properties":{"message":{"description":"The plain text message content. Often empty for RCS when rich_content is used.","type":"string","default":""},"message_format":{"description":"The format of this message (always 'RCS' for RCS entries).","type":"string","default":"RCS","enum":["RCS"],"examples":["RCS"]},"rich_content":{"$ref":"#/definitions/RCSRichContent"},"extra":{"description":"Additional metadata for RCS messages. Legacy placement. This is typically used in rich_content.cards.extra.","type":["object","null"]},"image":{"$ref":"#/definitions/SlimImageReference"}}},"MessageHierarchySmsItem":{"type":"object","properties":{"message":{"description":"The plain text SMS message content.","type":"string","examples":["Check out our latest deals: https://example.com"]},"message_format":{"description":"The format of this message (always 'SMS' for SMS entries).","type":"string","default":"SMS","enum":["SMS"],"examples":["SMS"]},"extra":{"description":"Additional metadata for SMS messages (e.g., should_use_same_content flag).","type":["object","null"]},"image":{"description":"Image reference for MMS messages. Mutually exclusive with media.","oneOf":[{"$ref":"#/definitions/StaticSMSImage"},{"$ref":"#/definitions/DynamicSMSImage"}]},"media":{"description":"Video media for MMS messages as either a hydrated MediaAsset or a reference-style payload. Mutually exclusive with image.","oneOf":[{"$ref":"#/definitions/MediaAsset"},{"$ref":"#/definitions/MediaAssetReference"}]}},"required":["message"]},"PushActionButtonV0":{"type":"object","properties":{"label":{"type":"string"},"action_type":{"description":"The action type for a push notification action button.","type":"string","enum":["deep_link","dismiss","open_app","open_url"]},"url":{"type":["string","null"]},"icon":{"type":["string","null"]},"custom_action_id":{"type":["string","null"]},"ios_deep_link":{"type":["string","null"]},"android_deep_link":{"type":["string","null"]}},"required":["label","action_type"]},"RCSRichContent":{"type":"object","properties":{"cards":{"description":"List of cards in this rich content. At most 10.","type":["array","null"],"items":{"$ref":"#/definitions/RCSCard"}},"suggestions":{"description":"List of suggestion buttons for user interaction. At most 11.","type":["array","null"],"items":{"$ref":"#/definitions/RCSSuggestion"}},"file":{"$ref":"#/definitions/MediaAssetReference"}}},"SlimImageReference":{"type":"object","properties":{"static_image_asset_id":{"description":"ID of the static image asset when the card uses a library image.","type":["integer","null"]},"dynamic_image_template":{"description":"Dynamic image template (e.g. Django tags) for the card image.","type":["string","null"]},"rendered_asset_url":{"description":"Pre-rendered image URL when available.","type":["string","null"]}}},"StaticSMSImage":{"type":"object","properties":{"dynamic":{"type":["boolean","null"],"default":false,"enum":[false]},"static_image_asset_id":{"description":"The ID of the static image asset to include.","type":"integer"}},"required":["static_image_asset_id"]},"DynamicSMSImage":{"type":"object","properties":{"dynamic":{"type":"boolean","default":true,"enum":[true],"examples":[true]},"dynamic_image_template":{"description":"Dynamic image template URL (e.g., {{product.image_url}}).","type":"string"}},"required":["dynamic_image_template"]},"MediaAsset":{"type":"object","properties":{"id":{"description":"The unique identifier for this media asset. Not allowed on update.","type":"string"},"company_id":{"description":"The company ID that owns this media.","type":"string","examples":["RyGRiN"]},"url":{"description":"The full URL to access the media.","type":"string","examples":["https://d3k81ch9hvuctc.cloudfront.net/company/RyGRiN/videos/01KG5BPQBSY8F12ZWTGYHPPRXC.mp4"]},"media_type":{"description":"The media type (e.g., 'video' for video assets).","type":"string","default":"video","examples":["video"]},"name":{"description":"The human-readable name of the media.","type":"string","examples":["demo video.1"]},"file_size":{"description":"The size of the media file in bytes.","type":"integer"},"thumbnail_url":{"description":"Optional thumbnail URL for video previews in RCS cards.","type":["string","null"]},"l10n_key":{"description":"Localization key for this media asset, if applicable.","type":["string","null"]}},"required":["id","company_id","url","name","file_size"]},"MediaAssetReference":{"type":"object","properties":{"static_asset_id":{"description":"Reference to a static media asset.","type":["string","null"]},"dynamic_template":{"description":"Dynamic template (e.g. Django tags) resolving to the media URL.","type":["string","null"]},"thumbnail":{"$ref":"#/definitions/SlimImageReference"}}},"RCSCard":{"type":"object","properties":{"id":{"description":"Unique identifier for this card.","type":"string","examples":["44214e8f-a2fb-43b1-a8e1-1170715ffcfa"]},"title":{"description":"Optional title for the card. 200 characters is the rendered-length budget; the stored value may be longer because it is template-evaluated before it reaches the carrier.","type":["string","null"],"examples":["Special Offer"]},"text":{"description":"The text content/description of the card. 2000 characters is the rendered-length budget; the stored value may be longer because it is template-evaluated before it reaches the carrier.","type":["string","null"],"examples":["Check out our new collection!"]},"extra":{"description":"Additional card-specific metadata (e.g., product info). Optional.","type":["object","null"]},"image":{"description":"Optional image for this card.","oneOf":[{"$ref":"#/definitions/ImageAsset"},{"$ref":"#/definitions/SlimImageReference"}]},"video":{"description":"Optional video for this card. May be a hydrated MediaAsset or a reference-style payload (e.g. static_asset_id), matching MMS ``MessageHierarchySmsItem.media`` behavior.","oneOf":[{"$ref":"#/definitions/MediaAsset"},{"$ref":"#/definitions/MediaAssetReference"}]},"buttons":{"description":"Optional action buttons for this card. At most 4.","type":["array","null"],"items":{"$ref":"#/definitions/RCSSuggestion"}}},"required":["id"]},"RCSSuggestion":{"type":"object","properties":{"id":{"description":"Unique identifier for this suggestion/button.","type":"string","examples":["quick-action-1767105662671"]},"text":{"description":"The display text for the suggestion button. 25 characters is the rendered-length budget; the stored value may be longer because it is template-evaluated before it reaches the carrier.","type":"string","examples":["Shop Now"]},"type":{"description":"The type of action this suggestion performs.","type":"string","enum":["OPEN_URL","REPLY"]},"url":{"description":"The URL to open (required for OPEN_URL type).","type":["string","null"],"examples":["https://www.example.com/shop"]},"open_mode":{"description":"How the URL opens on the device for OPEN_URL suggestions (browser vs webview size). Emitted to Infobip as openIn. Absent means browser.","type":["string","null"],"enum":["BROWSER","WEBVIEW_FULL","WEBVIEW_HALF","WEBVIEW_TALL"],"examples":["WEBVIEW_FULL"]}},"required":["id","text","type"]},"ImageAsset":{"type":"object","properties":{"id":{"description":"The unique identifier for this image asset. Not allowed on update.","type":"integer"},"file_path":{"description":"The file path of the image in Klaviyo's storage.","type":"string","examples":["images/aa1ee5c1-039e-4d20-9e98-345755214556.jpeg"]},"name":{"description":"The human-readable name of the image.","type":"string","examples":["product-image"]},"format":{"description":"The image file format.","type":"string","enum":["gif","jpeg","jpg","png","webp"]},"file_size":{"description":"The size of the image file in bytes.","type":"integer"},"updated":{"description":"Timestamp when the image was last updated.","type":"string","format":"date-time","examples":["2022-11-08T00:00:00+00:00"]},"origin":{"description":"The origin/source of the image (e.g., UI, API, AI, etc.).","type":["string","null"],"enum":["ADOPTION_SMS_FORM_FROM_EMAIL_FORM","ADOPTION_SMS_MULTI_STEP_FORM_FROM_EMAIL_FORM","AI","API","APPLICATION","CLONED","COMPOSER","COMPOSER_AI_EDITED","COMPOSER_AI_GENERATED","COMPOSER_USED_IN_KLAVIYO_OBJECT","COMPOSER_USER_UPLOADED","COMPOSER_WEB_SCRAPED","INTEGRATION","KLAVIYO","LIBRARY","MARKETING_AGENT","SANDBOX","SOCIAL_INSTAGRAM","SOCIAL_INSTAGRAM_OVERLAID","UI","WEB_SCRAPE"]},"url":{"description":"The full URL to access the image.","type":"string","examples":["https://d3k81ch9hvuctc.cloudfront.net/company/RyGRiN/images/aa1ee5c1-039e-4d20-9e98-345755214556.jpeg"]},"image_type":{"description":"The type of image (static or dynamic).","type":"string","enum":["dynamic","static"]},"l10n_key":{"description":"Localization key for this image asset, if applicable.","type":["string","null"],"examples":["sms::01KAPBZTQBAJFD5RG9NYXBWHMR::mms_static_image_asset_id"]}},"required":["id","file_path","name","format","file_size","updated","url","image_type"]}}},"name":"Create Campaign Variation","id":"klaviyo.create_campaign_variation","example":{"headers":{"revision":"2026-10-15"},"body":{"data":{"type":"campaign-variation","attributes":{"definition":{}},"relationships":{"campaign-message":{}}}}},"maxRequests":1,"summary":false}}