Skip to content

Per-tenant churn prediction

GET
/api/v1/ml/churn/{tenant_id}

Return the latest churn prediction for a single tenant.

Platform-internal analytics over a customer tenant: admin/owner only, matching the bulk /churn/scores sibling. Requires an active churn model; if none has been trained yet, a 404 is returned so callers can display a friendly ‘not yet trained’ message.

Authorizations

Parameters

Path Parameters

tenant_id
required
string format: uuid

Responses

200

Successful Response

Output of the ML churn prediction model.

Attributes: tenant_id: Tenant this prediction is for. churn_probability: Probability of churn, 0.0 to 1.0. risk_level: Classification string (low/medium/high/critical). top_factors: Top contributing features with their weights. recommended_actions: Suggested retention actions. model_version: Version of the model that produced this prediction. confidence: Model confidence in this prediction, 0.0 to 1.0. cold_start: True if tenant has < 14 days of data. computed_at: When this prediction was computed.

object
churn_probability
required
number
<= 1
cold_start
required
boolean
computed_at
required
string format: date-time
confidence
required
number
<= 1
model_version
required
integer
recommended_actions
required
Array<string>
risk_level
required
string
tenant_id
required
string format: uuid
top_factors
required
Array<object>

A single feature’s contribution to a churn prediction.

object
contribution
required
number
feature
required
string

422

Validation Error

object
detail
Array<object>
object
ctx
object
input
loc
required
Array
msg
required
string
type
required
string