Skip to content

Per-tenant churn prediction

GET
/api/v1/ml/churn/{tenant_id}
curl --request GET \
--url https://api.ultimateteam.ai/api/v1/ml/churn/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'X-API-Key: <X-API-Key>'

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.

tenant_id
required
Tenant Id
string format: uuid

Successful Response

Media typeapplication/json
ChurnPrediction

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
Churn Probability
number
<= 1
cold_start
required
Cold Start
boolean
computed_at
required
Computed At
string format: date-time
confidence
required
Confidence
number
<= 1
model_version
required
Model Version
integer
recommended_actions
required
Recommended Actions
Array<string>
risk_level
required
Risk Level
string
tenant_id
required
Tenant Id
string format: uuid
top_factors
required
Top Factors
Array<object>
ChurnFactor

A single feature’s contribution to a churn prediction.

object
contribution
required
Contribution
number
feature
required
Feature
string
Examplegenerated
{
"churn_probability": 1,
"cold_start": true,
"computed_at": "2026-04-15T12:00:00Z",
"confidence": 1,
"model_version": 1,
"recommended_actions": [
"example"
],
"risk_level": "example",
"tenant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"top_factors": [
{
"contribution": 1,
"feature": "example"
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}