Campaigns V2
Update Variant
Changed onUpdates a variant's paywall and/or percentage while preserving its identity where possible. Swapping a paywall soft-deletes the existing variant and inserts a new row (matching the legacy replaceVariantPaywall flow) so live assignments are re-randomised. Requires campaigns:write scope.
patch/v2/campaigns/{id}/audiences/{audience_id}/variants/{variant_id}
Request
- Base URLhttps://api.superwall.com
- Auth
- HTTP bearer
- or API key in cookie accounts_superwall_token
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
idstring required
audience_idstring required
variant_idstring required
Request body
Response
Success
Changes
- info
added
subschema #4to the response bodyanyOflist for the response status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info
- breaking
removed
subschema #1from therequest propertyanyOflist - warning
the
/request property's max was set to9007199254740991.00 - warning
the
/request property's min was set to-9007199254740991.00 - info
added
subschema #1subschema #2to therequest propertyanyOflist
- breaking