Skip to content

Preview an audience

POST
/api/v1/audience/preview
curl --request POST \
--url https://renotify.app/api/v1/audience/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "filter_criteria": { "logic": "and", "conditions": [ { "field": "marketing_consent", "operator": "=", "value": true } ], "groups": [] }, "include_contact_ids": [ 5, 6 ], "exclude_contact_ids": [ 9 ], "limit": 5 }'

Estimate the size of a segment and return sample matching contacts.

Media typeapplication/json
object
filter_criteria

The filter to preview: a group of conditions, which may hold further groups.

object
logic

How the group’s conditions and groups combine: and or or.

string
Example
and
conditions

The conditions, each with a field, an operator and a value.

Array<object>
object
Example
[
{
"field": "marketing_consent",
"operator": "=",
"value": true
}
]
groups

Groups inside this one, with the same shape.

Array<object>
object
Example
[]
Example
{
"logic": "and",
"conditions": [
{
"field": "marketing_consent",
"operator": "=",
"value": true
}
],
"groups": []
}
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
nullable
Example
5