Create an audience
POST
/api/v1/audience
const url = 'https://renotify.app/api/v1/audience';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"VIP Customers","filter_criteria":[{"field":"marketing_consent","operator":"=","value":true}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://renotify.app/api/v1/audience \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "VIP Customers", "filter_criteria": [ { "field": "marketing_consent", "operator": "=", "value": true } ] }'Create a saved segment for the current team.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
The segment name.
string
Example
VIP Customersfilter_criteria
The filter criteria to save with the audience.
Array<string>
Example
[ { "field": "marketing_consent", "operator": "=", "value": true }]