Hanzo
OpenapiMarketing

Saves a cohort filter for the caller's org.

Saves a cohort filter for the caller's org. Name is required.

POST /v1/marketing/audiences

Addresshttps://api.hanzo.ai/v1/marketing/audiences
MethodPOST
Operationpost_marketing_audiences
AuthAuthorization: Bearer $HANZO_API_KEY

Saves a cohort filter for the caller's org. Name is required. Omitting event saves the WHOLE-ORG audience — every mailable customer — which needs no analytics warehouse; naming one narrows that roster to the customers who fired it within windowDays.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
createdAtbodyintegerCreatedAt is unix seconds when the filter was saved, server-assigned.
eventbodystringEvent is the analytics event a member must have fired.
idbodystringID is the server-assigned audience id ("aud_" + 128 random bits).
namebodystringName is the audience's label.
updatedAtbodyintegerUpdatedAt is unix seconds of the last write, server-assigned, and the key the audience list is ordered by (newest first).
windowDaysbodyintegerWindowDays is how far back the event counts, ending now.

Response

StatusBodyMeaning
200Audienceok

200 body — 6 fields.

FieldInTypeAlwaysDescription
createdAtbodyintegerCreatedAt is unix seconds when the filter was saved, server-assigned.
eventbodystringEvent is the analytics event a member must have fired.
idbodystringID is the server-assigned audience id ("aud_" + 128 random bits).
namebodystringName is the audience's label.
updatedAtbodyintegerUpdatedAt is unix seconds of the last write, server-assigned, and the key the audience list is ordered by (newest first).
windowDaysbodyintegerWindowDays is how far back the event counts, ending now.

Failure carries the platform error shape — see Errors.

Examples

hanzo marketing audiences create

Marketing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page