Create or Update Variant
Create a new variant or update an existing one for a specific channel. Pass the variant content, conditions, locale, and optionally whether the variant needs vendor approval.
The content JSON structure is channel-specific. Refer to the variant content schema for each channel’s structure.
Authorizations
Pass as Authorization: ServiceToken <token>. You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.
Path Parameters
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.
Body
Locale code for the variant (e.g., en, es, fr). Must be a supported locale code.
"en"
Tenant ID this variant is scoped to. null for the default variant.
Conditions for variant selection. Structure follows the expression format.
Channel-specific content. See variant content schema for the structure of each channel.
(SMS only) Whether this variant requires vendor (DLT) approval. Ignored for other channels: WhatsApp variants always require approval, and all other channels never do.
Response
Variant created successfully. Returns the full variant including its 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, discarded, upload_failed 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 (added, updated, unchanged, deleted, or null in draft).
added, updated, unchanged, deleted Timestamp when the variant was created.
Channel-specific content. Structure varies by channel. Returned by the variant detail endpoint, and by the variant list endpoints only when include_content=true is passed.
Vendor approval entries (WhatsApp/SMS only). Returned by the variant detail endpoint, and by the variant list endpoints only when include_content=true is passed.