Cohorts, LTV, Journey, and Attribution
Customer analytics endpoints are workspace-scoped and require revenue-tracking entitlement.Endpoints
GET /api/customers/cohortsGET /api/customers/ltv-cohortsPOST /api/customers/:id/recalculate-ltvGET /api/customers/:id/journeyGET /api/customers/:id/attribution
Auth and permissions
- Feature gate:
revenueTracking links:read: cohorts, journey, attributionanalytics:read: ltv cohortslinks:create: recalculate LTV
Cohorts endpoint
GET /api/customers/cohorts
Query params:
group_by:week | month | campaign | source(defaultweek)start(optional date)end(optional date)
LTV cohorts endpoint
GET /api/customers/ltv-cohorts
Query params:
months: analysis window (default12, max24)
Journey endpoint
GET /api/customers/:id/journey
Query params:
summary=true|false(optional)start(optional)end(optional)
Attribution endpoint
GET /api/customers/:id/attribution
Returns attribution summary for the customer, including first-touch/last-touch and touched entities.
Recalculate LTV
POST /api/customers/:id/recalculate-ltv
For correction/rebuild workflows after historical conversion updates.
Operational behavior
- Customer existence is validated before journey/attribution/LTV recalculation.
- If analytics backend is unavailable, analytics endpoints can return
503orANALYTICS_ERROR. - These customer analytics reads are HTTP snapshot-cached with short TTL.
Common errors
400: invalidgroup_byor malformed params404: customer not found503: analytics backend not configured500: analytics execution failure

