---
title: "Update a variant; images optional (admin only)"
method: PATCH
path: "/api/admin/campaigns/{id}/variants/{variantId}"
tags: ["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

- `id` number, required
- `variantId` number, required

## Request body `multipart/form-data`

- UpdateCampaignVariantDto
  - `name` string: Internal label, never shown
  - `priority` number: Highest matching variant wins
  - `is_active` boolean
  - `audience_all` string[]
  - `audience_any` string[]
  - `audience_none` string[]
  - `pill_text` object
  - `headline` string
  - `body` object
  - `primary_cta_label` object
  - `primary_cta_action_type` 'deeplink' | 'url' | 'in_app_route' | 'checkout' | 'dismiss' | 'none'
  - `primary_cta_action_value` object
  - `secondary_cta_label` object
  - `secondary_cta_action_type` 'deeplink' | 'url' | 'in_app_route' | 'checkout' | 'dismiss' | 'none'
  - `secondary_cta_action_value` object
  - `footnote` object
  - `terms_label` object
  - `terms_url` object
  - `extra_media` CampaignExtraMediaDto[]: Extra images beyond hero/badge, as JSON. Keys must already be uploaded.
    - `role` string, required
    - `s3_key` string, required
    - `alt` object
  - `extra` object: Template-specific passthrough, as JSON. Sent to the client verbatim.
  - `remove_hero` boolean: Delete the current hero image
  - `remove_badge` boolean: Delete the current badge image

## Response `200`

---

[API](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api.md) - [All operations](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/revisions/28695827f27a?raw)
