UtilitayDevelopers
Get an API key
API reference

Segments

/groups

A segment is who a group-scoped event is about. A static segment keeps a list you add to; a dynamic segment holds whoever's attributes contain its filter, so nobody keeps it up. Beside the segments somebody keeps are temporary lists, picked by a person for one send: you can see them, but a key cannot change one and an event cannot name one. In the Subscription business pack a segment is, for example, “Annual plans”.

POSTBuild segments from a subscription attribute

Requires groups:write. Makes one dynamic segment per value the subscriptions hold for the attribute you name — or one per combination, for up to four — and returns them. Safe after every import: what exists is left exactly as it is, and nothing is tidied away.

Body parameters
attributesstring[] · required · max 4
Keys on the subscription, checked against the pack's subject_schema.
Query parameters
limitinteger · default 50 · max 200
offsetinteger · default 0
Returns

200 with the segments those attributes keep up, made now or before. 400 for a key no subscription can carry.

Response body

A bare JSON array. Each item is one segment: the same fields in every pack. Press Response on the sample to see one whole.

FieldTypeDescription
iduuidWhat an event's group_id names.
namestringUnique in the instance.
kindstatic | dynamicstatic keeps a list; dynamic holds whoever matches its filter.
member_kindsubject | contactWhether it holds subscriptions or customers. Fixed when it is made.
filterobject | nullA dynamic group's filter: the subscription or customer attributes a member's must contain.Varies by pack
derived_fromstring | nullThe subject attribute a group the records keep up was built from. null on a group somebody keeps.
attributesobjectShaped by the Subscription business pack's group_schema.Varies by pack
temporarybooleantrue on a list somebody picked for a send. It cannot be named on an event, and a key cannot change it.
external_refstring | nullYour own id, as you sent it.
statusactive | inactive
created_atdatetime
updated_atdatetime

On failure the body is { error, code } instead.