Audiences
info
Read more in the API documentation for the audiences
endpoint.
The audiences
endpoint has full support, including query validation.
Endpoint | Function | Client method | Filters class |
---|---|---|---|
"audiences" | audiences | Client.audiences | AudiencesFilters |
Usage
- Sync
- Async
Using top-level functions
import bavapi
result = bavapi.audiences("TOKEN", name="All Adults")
Using Client asynchronously
import bavapi
async with bavapi.Client("TOKEN") as bav:
result = await bav.audiences(name="All Adults")
Available filters in function calls
These filters are available directly within the function/method:
- Positional filters:
name
,active
,public
- Keyword filters:
audience_id
,private
,groups
For other filters, passing an AudiencesFilters
instance to the filters
parameter is required.