Skip to content

Per-tenant customer health

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

Return the current customer health score for a tenant (admin/owner).

503s when no health signals can be read. Returning a score computed from an empty signal dict would be a fabricated 32/100 “at_risk” for a tenant nobody observed – see HealthSignalsUnavailable. Caught here rather than propagated because an unhandled exception is served by ServerErrorMiddleware, which bypasses the CORS middleware.

tenant_id
required
Tenant Id
string format: uuid
tenant_age_days
Any of:
integer

Successful Response

Media typeapplication/json
CustomerHealthResult

Complete customer health assessment.

Attributes: tenant_id: Tenant this health score is for. score: Composite health score, 0 to 100. category: Health classification. dimensions: Individual dimension scores. trend_7d: Score change over last 7 days. trend_30d: Score change over last 30 days. trend_90d: Score change over last 90 days. cold_start: True if tenant has < 14 days of data. computed_at: When this score was computed.

object
category
required
Category
string
Allowed values: thriving healthy needs_attention at_risk critical
cold_start
required
Cold Start
boolean
computed_at
required
Computed At
string format: date-time
dimensions
required
Dimensions
Array<object>
HealthDimension

A single dimension of the customer health score.

Attributes: name: Dimension name (e.g. product_usage, engagement). score: Dimension score, 0.0 to 100.0. weight: Weight of this dimension in the composite, 0.0 to 1.0. signals: Raw signal values that contributed to this dimension.

object
name
required
Name
string
score
required
Score
number
<= 100
signals
required
Signals
object
key
additional properties
number
weight
required
Weight
number
<= 1
score
required
Score
integer
<= 100
tenant_id
required
Tenant Id
string format: uuid
trend_30d
required
Any of:
number
trend_7d
required
Any of:
number
trend_90d
required
Any of:
number
Example
{
"category": "thriving"
}

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"
}
]
}