Segmentation and funnels use the same base as every other page:
https://apis.cativalab.digital/tenant/api/v2. They are admin routes (/admin/marketing/...), so they require an API Key with admin scope. Authentication is the same: Authorization: Bearer cativa_live_....Segmentation: a dynamic audience
A segmentation is an audience defined by criteria (badges, activity, sign-up, etc.), not a static list of IDs. You describe the rule once and the platform resolves it in real time to decide who falls into the segment. When a user earns a badge or becomes active again, they enter or leave the segment without you touching anything. This is useful to:- Targeted communication — send an email or push to only the people who match.
- Export to your CRM — materialize the segment’s user list and sync it to HubSpot, RD Station, etc.
- Size before you act — know how many people a criterion reaches before saving or sending.
Segmentation routes
The
{id} is a ULID (e.g. 01HQ7Z3X4Y8N2K5P6R7T8V9W0X).
From a criterion to an exportable list
1
Preview the criterion
POST /admin/marketing/segmentations/preview (or users-count) sends the criterion in the body and returns the audience size and sample, without persisting anything.2
Adjust and re-count
Refine the criterion (one more badge, a different activity window) and repeat the preview until the audience matches what you expect.
3
Save the segmentation
POST /admin/marketing/segmentations persists the rule and returns the id.4
Materialize and export
GET /admin/marketing/segmentations/{id}/users resolves the full list in real time, to paginate and sync to your CRM or feed a blast.Size before you save
Usepreview and users-count to test a criterion without creating anything. Send the criterion in the body and read the audience size and sample before you commit. Once validated, POST /segmentations persists the rule and {id}/users materializes the full list (for example, to paginate and export it to your CRM or feed a communication blast).
Create a segmentation
Count users for a criterion
count is the size of the audience matching the criterion right now:
The exact field names and types of each response (count, user sample, criteria shape) live in the API Reference, under the Segmentation tag. Don’t assume the body shape from the examples above: check the per-endpoint published contract.
Funnel: the step-by-step journey
A funnel models the user journey across ordered steps (for example: visited, signed up, purchased, engaged). Unlike a segmentation, which answers “who matches this criterion right now”, a funnel answers “how many people are at each step” and where the journey loses people. Usestep-count to get the per-step user count and see conversion from one step to the next.
Funnel routes
The contract for each funnel response (step definition, per-step count) lives in the API Reference, under the Funnel tag. Check the published endpoint instead of inferring the fields.
Segmentation vs funnel
The two complement each other: you can size an audience with
users-count, materialize it with {id}/users, and track how that audience advances through the funnel’s steps over time.
Common errors and questions
I hit a /tenant/api/v2 route and got 404
I hit a /tenant/api/v2 route and got 404
Segmentation and funnels use the same base as every other page:
https://apis.cativalab.digital/tenant/api/v2.The count changed between preview and materialize
The count changed between preview and materialize
That’s expected. A segmentation is resolved in real time: between one step and the next, someone may have earned a badge or become active again and entered (or left) the segment.
count is a snapshot at call time, not a frozen number.Do preview and users-count create a segmentation?
Do preview and users-count create a segmentation?
No. Both only size a criterion sent in the body, without persisting anything.
POST /segmentations is what creates the rule. Use preview freely to calibrate before saving.When do I use a segmentation and when a funnel?
When do I use a segmentation and when a funnel?
A segmentation answers “who matches this criterion right now” (output: a user list). A funnel answers “which journey step is each person at” (output: a per-step count via
step-count). One measures audience, the other measures conversion.I got 403 on the marketing routes
I got 403 on the marketing routes
The
/admin/marketing/... routes require an API Key with admin scope. Check the Authorization: Bearer cativa_live_... header and the key’s scope. Never expose the key in the frontend.Next steps
Identity and Users
The
User model that segmentations resolve against and the canonical endpoint to validate credentials.Sync members from your CRM
Materialize a segment’s list and keep your CRM in sync with the community.
