Activity Generation Configs
Lifecycle-only configuration that defines how retention activities are generated.
Overview
An Activity Generation Config (AGC) describes how the platform derives a user's retention lifecycle state from raw activity data. It is a lifecycle-only configuration: base metadata, an optional audience, and exactly three required lifecycle pillars.
Every AGC belongs to one project: the endpoints work on the AGCs of the active project, and an AGC of another project responds 404 as if it did not exist. Its name is unique within the project.
| Pillar | Purpose |
|---|---|
activation | Classifies whether (and how strongly) a user has activated, based on early action moments. |
engagement | Buckets active users into engagement levels (e.g. casual, core, power). |
resurrection | Detects users returning from inactivity and classifies recovery vs. churn. |
The three pillars are 1:1 with the AGC: every AGC always has exactly one activationConfig, one engagementConfig, and one resurrectionConfig. You cannot create an AGC with a missing pillar, and you cannot create a pillar that is not attached to an AGC.
There is no standalone dispatch configuration: an AGC only defines lifecycle classification.
Status
Every AGC has a status:
| Status | Meaning |
|---|---|
draft | Initial status of every new AGC. |
active | The configuration is meant to run. |
paused | Taken out of running. It keeps its id and its definition, and it can be published again. |
The status changes only through two actions, both with the activity-generation-config:update permission:
status is not accepted in any create or update body. Only active configurations are meant to run: list them with GET /api/activity-generation-configs?status=active.
Effective audience
audienceId is the AGC's own audience, and it is optional. Reads — GET /:id and the list — also return effectiveAudienceId, the audience the AGC runs over:
audienceId, when the AGC has its own audience;- otherwise, the project's root audience (see Projects → Root audience).
effectiveAudienceId is never null. It is computed when the AGC is read: it is not stored, and it is not sent in any body.
Config hashes
GET /:id returns a configHashes object — a deterministic per-pillar hash (16 hexadecimal characters) for each of the three pillars:
{
"activation": "9f1c2a3b4d5e6f70",
"engagement": "a1b2c3d4e5f60718",
"resurrection": "0f1e2d3c4b5a6978"
}Callers use these hashes to cheaply detect when a pillar's configuration has changed without diffing the full nested payload. The hash is computed over the pillar's semantic content only: volatile fields (id, timestamps) are stripped, and child collections are hashed order-independently, so reordering children without changing their values does not change the hash.
Authentication
All endpoints require a JWT Bearer token, the x-tenant-id header identifying the tenant whose schema the request operates on, and the x-project-id header identifying the project the request works in (see Authentication → Project Context).
-H "Authorization: Bearer <token>"
-H "x-tenant-id: <tenant-id>"
-H "x-project-id: <project-id>"Permissions
| Permission | Grants |
|---|---|
activity-generation-config:view | List and read AGCs |
activity-generation-config:create | Create an AGC |
activity-generation-config:update | Update metadata, replace lifecycle pillars, publish and pause |
activity-generation-config:delete | Archive (soft delete) an AGC |
Serialization convention: the request bodies of create, update and lifecycle update are snake_case (e.g. source_table, user_retention_status_config_id), while GET responses are camelCase (e.g. sourceTable, userRetentionStatusConfigId).
Endpoints
List Configs
List AGC metadata (no nested config, no config hashes).
Get Config
Read one AGC with all three nested pillars and config hashes.
Create Config
Create an AGC with all three lifecycle pillars (transactional).
Update Lifecycle
In-place replace of one or more lifecycle pillars.
Update Config
Update AGC metadata only (name, description, audience).
Publish Config
Move an AGC from draft or paused to active.
Pause Config
Move an active AGC to paused, keeping its id.
Delete Config
Archive an AGC; its three pillars cascade.