Skip to main content
A Group is a named set of Profiles you target for messaging, personalisation, and integration. You create a Group Definition once, choose its type, then manage membership according to that type. This guide covers creating a definition, running a static group end to end, and reading members for any group. For the model behind groups, see the Groups concept. All endpoints are bearer authenticated and live under https://api.[tenant].getomneo.com/api/v3.

Choose a group type

Every Group Definition has one of three types. The type sets how membership is determined and which endpoints you use to manage it.
TypeMembers determined byUse when
staticExplicit add and remove callsYou maintain the list yourself: hand-curated segments, imported lists, or membership another system owns.
dynamicRules evaluated on a refresh scheduleMembership should follow Profile data automatically, for example “profiles that spent over $500 in the last 12 months”. See Building dynamic groups.
favouriteResolved from the owner Profile’s connectionsEach Profile has its own set, for example a customer’s favourite stores or preferred stylists. See Favourite groups.

Create a Group Definition

Create a definition with POST /groups/definitions. Only name, handle, and type are required.
The response is 201 with the created definition, including its id, which you use in the membership endpoints below.
FieldRequiredDescription
nameYesHuman-readable name.
handleYesHandle for the definition.
typeYesstatic, dynamic, or favourite.
short_description / descriptionNoDescriptive copy shown alongside the group.
metaNoFree-form metadata object.
is_published / is_active / is_archivedNoPublication and lifecycle flags.
Dynamic groups add query and rule fields; favourite groups add source_type and source_id. Those are covered on the sibling pages.
The type is set when the definition is created and cannot be changed afterwards. To move membership to a different mechanism, create a new definition of the type you want.

Read, update, and delete a definition

Read a single definition with GET /groups/definitions/{group}, change it with PUT, and remove it with DELETE. PUT accepts the same fields as create, except type, which is fixed once set. DELETE returns 204 and removes the definition together with its membership records.
A read returns the full definition. Every definition returns the same field set regardless of type; fields that do not apply to the group’s type are null or empty. The response below is the static group created above.
FieldApplies toDescription
idAllDefinition id used in the membership, rule, and snapshot endpoints.
nameAllHuman-readable name.
handleAllHandle for the definition.
typeAllstatic, dynamic, or favourite. Fixed once set.
source_type / source_idFavouriteMember source. Currently connection_definition and the Connection Definition id. null otherwise.
query / query_type / argumentsDynamicCandidate query name, its type, and its [{name,value}] arguments. null otherwise.
period / period_type / absolute_expiryStaticMembership expiry: a period counted in period_type units, or a fixed absolute_expiry date.
refresh_period / refresh_period_type / refresh_absolute_expiryDynamicRe-evaluation cadence.
last_refreshed_at / next_refresh_atDynamicWhen the group last re-evaluated and when it is next due.
refresh_statusDynamicEvaluation state: fresh, stale, refreshing, or failed.
refresh_errorDynamicMessage from the last failed run, otherwise null.
short_description / descriptionAllDescriptive copy shown alongside the group.
owner_profile_idFavouriteThe owning Profile on a profile-owned instance. null on a shared definition.
metaAllFree-form metadata object.
is_published / is_active / is_archivedAllPublication and lifecycle flags.
current_member_countStaticCount of active static members. Always 0 for dynamic and favourite.
rulesDynamicThe attached inclusion and exclusion rules. See Building dynamic groups.
created_at / updated_atAllTimestamps.

Run a static group

A static group is a list you manage directly. Create a static definition, then add and remove Profiles.
1

Add a Profile

The add is idempotent. A Profile that is already an active member returns 200; a newly added Profile returns 201.
FieldRequiredDescription
profile_idYesThe Profile to add.
source_type / source_idNoWhere the membership came from, for your own tracking.
added_by_profile_idNoThe Profile that performed the add.
metaNoFree-form metadata stored on the membership.
2

Remove a Profile

Removal returns 404 when the Profile has no active membership in the group, so a 404 here means there was nothing to remove.
Direct add and remove apply to static groups only. Dynamic membership is computed from rules, and favourite membership is managed per Profile through the profile-scoped endpoints.

Expire memberships

To make static memberships expire, set period and period_type on the definition, or set an absolute_expiry date. Each membership’s expiry is calculated once, at the moment the Profile is added.
period_type accepts days, weeks, months, years, absolute_date, absolute_week, or absolute_month. Use absolute_expiry when every membership should end on the same fixed date rather than a period counted from when each Profile joined.

Read members

List a group’s members with GET /groups/definitions/{group}/profiles. One endpoint returns members for every group type in the same shape, so consumers do not branch on type.
TypeWhat the listing returns
staticThe Profiles currently on the list.
dynamicThe members from the most recent completed snapshot.
favouriteThe connected Profiles across all owners of the definition.
Each row has the same wrapper for every type: a profile_id, a record_type that tells you which membership mechanism produced the row, and a record holding the underlying membership object. The example below is a static group, so every row is a group_profile.
The record_type depends on the group’s type, and record carries the corresponding resource.
record_typeGroup typeWhat record contains
group_profilestaticThe static membership record.
group_snapshot_profiledynamicThe Profile’s row from the most recent completed snapshot. See Building dynamic groups.
connectionfavouriteThe connection linking the owner Profile to the member. See Favourite groups.
The listing is paginated. Page through meta.pagination as with every Omneo list endpoint.
The current_member_count on a definition counts static members only. It is always 0 for dynamic and favourite groups. To size a dynamic group, read its latest snapshot; to size a favourite group, page the member listing.

Worked example: a static VIP list

This walks a static group from creation to a running, expiring list.
1

Create the definition

POST /groups/definitions with type: "static", period: 30, and period_type: "days". The response is 201 and includes the new id, for example 17. Every membership added from now on expires 30 days after it is added.
2

Add members

POST /groups/definitions/17/profiles with a profile_id for each customer. A first add returns 201; re-adding the same Profile returns 200 without creating a duplicate. Pass source_type and source_id to record the import or system the membership came from.
3

Read the current list

GET /groups/definitions/17/profiles returns group_profile rows and meta.pagination. GET /groups/definitions/17 shows current_member_count for a quick size.
4

Remove a member

POST /groups/definitions/17/profiles/{profile}/remove ends the membership. If that Profile is not an active member, the call returns 404, so a 404 here means there was nothing to remove.
5

Act on changes

Subscribe to group.profile.add and group.profile.remove through a Reaction to message customers as they join or leave, including when a membership expires.

Errors

StatusWhen
200Add succeeded for a Profile that was already an active member (idempotent, no duplicate created).
201Add created a new membership, or a definition was created.
204A definition was deleted.
401Missing or invalid bearer token.
403The token lacks the scope or permission for this group.
404The Group Definition does not exist, or (on remove) the Profile has no active membership in it.
422Validation failed. For example, manual add or remove against a dynamic or favourite group, or sending query, rule, or source fields that do not apply to a static group.

Edge cases and gotchas

  • type is immutable. You cannot convert a group between static, dynamic, and favourite. Create a new definition instead.
  • Manual membership is static only. Add and remove calls are rejected with 422 on dynamic and favourite groups. Dynamic membership is computed from rules; favourite membership is managed per Profile.
  • Expiry is fixed at add time. A membership’s expiry is calculated once, when the Profile is added. Changing period or absolute_expiry later does not reschedule memberships already created.
  • current_member_count is static only. It stays 0 for dynamic and favourite groups even when they have members. Size those from the member listing or the latest snapshot.
  • Instances are favourite only. Creating a profile-owned instance of a static or dynamic definition returns 422. See Favourite groups.

Subscribe to group events

Membership and definition changes emit events you can act on through Reactions and webhook Targets.
EventFires when
group.profile.addA Profile joins a group (static add, dynamic match, or favourite connection).
group.profile.removeA Profile leaves a group (static removal or expiry, dynamic departure, or favourite disconnect).
group_definition.createdA Group Definition is created.
group_definition.updatedA Group Definition is changed.
group_definition.deletedA Group Definition is deleted.
For example, subscribe to group.profile.add to send a welcome message when a customer enters a VIP group, or to group.profile.remove to revoke access when they leave.

Next steps

Building dynamic groups

Compute membership from a candidate query and reusable inclusion and exclusion rules.

Favourite groups

Give each Profile its own set, resolved from that Profile’s connections.