Create a new variant or update an existing one for a specific channel. Pass the variant content, conditions, locale, and optionally vendor approval details.
The content JSON structure is channel-specific. Refer to the variant content schema for each channel’s structure.
You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.
email, sms, whatsapp, inbox, androidpush, iospush, webpush, slack, ms_teams Variant identifier. If a variant with this ID doesn't exist, a new one is created.
Locale code for the variant (e.g., en, es, fr).
"en"
Channel-specific content. See variant content schema for the structure of each channel.
Tenant ID this variant is scoped to. null for the default variant.
Conditions for variant selection. Structure follows the expression format.
(SMS only) Whether this variant requires vendor (DLT) approval.
Ordering of the variant within the same channel + tenant + locale combination.
Vendor approval entries for WhatsApp/SMS variants. See approval schema.
Variant created or updated successfully. Returns the full variant including rendered content.
Schema URL for variant validation.
"https://schema.suprsend.com/template/v2/variant_schema.json"
Channel this variant belongs to.
"email"
Variant identifier.
"default"
Tenant this variant is scoped to, or null for default.
Locale code.
"en"
Conditions for variant selection at send time.
Content hash for change detection.
Whether this variant requires vendor approval (SMS DLT, WhatsApp).
System-generated template name for vendor approval.
Current approval status of the variant.
auto_approved, pending, sent_for_approval, approved, rejected Reason provided when a variant is discarded.
Timestamp when the variant was approved.
Whether the variant has validation errors.
Ordering within the channel + tenant + locale combination.
Action taken in the latest commit (Updated, Added, Unchanged, or null).
Timestamp when the variant was created.
Channel-specific content. Structure varies by channel. Only returned in variant detail endpoint.
Vendor approval entries (WhatsApp/SMS only). Only returned in variant detail endpoint.