Skip to content

Per-tenant customer health

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

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.

Authorizations

Parameters

Path Parameters

tenant_id
required
string format: uuid

Query Parameters

tenant_age_days
Any of:
integer

Responses

200

Successful Response

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
string
Allowed values: thriving healthy needs_attention at_risk critical
cold_start
required
boolean
computed_at
required
string format: date-time
dimensions
required
Array<object>

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
string
score
required
number
<= 100
signals
required
object
key
additional properties
number
weight
required
number
<= 1
score
required
integer
<= 100
tenant_id
required
string format: uuid
trend_30d
required
Any of:
number
trend_7d
required
Any of:
number
trend_90d
required
Any of:
number

422

Validation Error

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