Preview an audience
POST
/api/v1/audience/preview
const url = 'https://renotify.app/api/v1/audience/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"filter_criteria":[{"field":"marketing_consent","operator":"=","value":true}],"include_contact_ids":[5,6],"exclude_contact_ids":[9],"limit":5}'};
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/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "filter_criteria": [ { "field": "marketing_consent", "operator": "=", "value": true } ], "include_contact_ids": [ 5, 6 ], "exclude_contact_ids": [ 9 ], "limit": 5 }'Estimate the size of a segment and return sample matching contacts.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
filter_criteria
The filter criteria to preview.
Array<string>
Example
[ { "field": "marketing_consent", "operator": "=", "value": true }]include_contact_ids
Contact IDs to always include.
Array<string>
Example
[ 5, 6]exclude_contact_ids
Contact IDs to always exclude.
Array<string>
Example
[ 9]limit
The number of sample contacts to return.
integer
Example
5