Admin - Campaigns

Update a variant; images optional (admin only)

patch/api/admin/campaigns/{id}/variants/{variantId}

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/admin/campaigns/{id}/variants/{variantId}
  • Auth
    HTTP bearer

Path parameters

idnumber required
variantIdnumber required

Request body multipart/form-data

namestring

Internal label, never shown

prioritynumber

Highest matching variant wins

is_activeboolean
audience_allstring[]
audience_anystring[]
audience_nonestring[]
pill_textobject
headlinestring
bodyobject
primary_cta_labelobject
primary_cta_action_type'deeplink' | 'url' | 'in_app_route' | 'checkout' | 'dismiss' | 'none'
primary_cta_action_valueobject
secondary_cta_labelobject
secondary_cta_action_type'deeplink' | 'url' | 'in_app_route' | 'checkout' | 'dismiss' | 'none'
secondary_cta_action_valueobject
footnoteobject
terms_labelobject
terms_urlobject
extraobject

Template-specific passthrough, as JSON. Sent to the client verbatim.

remove_heroboolean

Delete the current hero image

remove_badgeboolean

Delete the current badge image

Example request

{
  "name": "Annual Stripe — extend",
  "audience_all": [
    "subscribed",
    "interval:year"
  ],
  "audience_any": [
    "free",
    "no_subscription"
  ],
  "audience_none": [
    "claimed:smart-scale-giveaway"
  ],
  "headline": "Get a free smart scale, on us.",
  "extra_media": [
    {
      "role": "background",
      "s3_key": "campaigns/1/1757000000000-123.png"
    }
  ]
}

Changes

No recorded changes to this operation across all 34 revisions of this API.