Skip to main content
Saves an audience: a group of people described by rules — “added to cart in the last 7 days and didn’t order”. Who is in it is worked out in the background, and from then on people join and leave as they match. It is the same audience the panel builds, and shows under Audiences there.
Needs the cdp.audiences:write scope.

Body

Send an Idempotency-Key header to save it once however often the request is retried.

Rules

match is all (every condition) or any (at least one); all when left out. groups are optional: each is its own match and conditions, and counts as one condition beside the others. Up to 5 groups and 20 conditions in all, and at least one. Each condition has a type: Trait keys are the built-in ones and your own, from GET /v1/cdp/traits. lifetime_value and open_deals_value are compared in rupees.

Request

Response

201 Created — the audience, building while its members are worked out. Follow it with GET /v1/cdp/audiences/{audience_id}, or the audience.entered webhook event.

Errors

Every refusal is {"error": {"code", "message", "field"}}; field is there when one input is at fault. Any request can also be refused for its key, its account or its rate (key_required, invalid_key, account_suspended, plan_excludes_api, address_not_allowed, rate_limited); see the overview.