Update Audience
Changed onUpdates an audience's enabled status, description, targeting rule, variant optimization, or variants. Provide a structured rule_conditions rule to update targeting: it is compiled into the audience's expression and drives expression_cel for modern SDKs, and the audience is switched to the rule editor so it stays in sync with the dashboard. The legacy raw expression field is no longer accepted. When variants are provided they replace the existing set. Requires campaigns:write scope.
Request
- Base URLhttps://api.superwall.com
- URLhttps://api.superwall.com/v2/campaigns/{id}/audiences/{audience_id}
- Auth
- HTTP bearer
- or API key in cookie accounts_superwall_token
- or HTTP bearer
Path parameters
Request body
Example request
{
"rule_conditions": {
"operator": "and",
"conditions": [
{
"type": "condition",
"lhs": {
"type": "property",
"value": "device.appVersion"
},
"operator": "gte",
"rhs": {
"type": "string",
"value": "1.2.3"
}
}
]
}
}Response
Success
Changes
- warning
added the new
credentials_missingenum value to the/response property for the response status - warning
added the new
credentials_missingenum value to the/response property for the response status - warning
added the new
credentials_missingenum value to the/response property for the response status - warning
added the new
credentials_missingenum value to the/response property for the response status - info
added
subschema #1subschema #2to the response bodyanyOflist for the response status - info
added
subschema #1subschema #2subschema #3subschema #4subschema #5to the response bodyanyOflist for the response status - info
added
subschema #2subschema #3subschema #4to the response bodyanyOflist for the response status - info
removed
subschema #1subschema #2from the response bodyanyOflist for the response status - info
removed
subschema #1subschema #2subschema #3subschema #4subschema #5from the response bodyanyOflist for the response status - info
removed
subschema #2subschema #3subschema #4from the response bodyanyOflist for the response status
- warning
- breaking
request property
///list-of-types was narrowed by removing typesnumberfrom media typeapplication/json - breaking
the
////request property type changed fromnumbertointeger
- breaking