List audiences
const url = 'https://api.ebitex.io/audience/management/v1/audiences';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ebitex.io/audience/management/v1/audiences \ --header 'Authorization: Bearer <token>'Lists the organization’s audiences by key, each with its rule and, for an audience whose members are stored, how many people are in it.
Key: an Audience management key with audience.management.read (write also needs read; erase needs both).
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”[ { “id”, “externalId”, “name”, “predicate”: { … }, “revision”, “scope”, “storedMembership”, “memberCount”, “membershipCurrent”, “createdAtUtc”, “updatedAtUtc”, “rowVersion”, “behaviours”: [ … ] }. scopeiscontext(reads only the request's own context),individual(reads only what Audience knows about a recognised person) ormixed. ].
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired, or it was not created from the Audience settings page.
payment_required: the organization’s subscription needs attention.
scope_denied: the key lacks this route’s scope. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Audience is not enabled for the organization.
not_found: no such route.
rate_limited: the key spent its requests-per-minute budget; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.