Skip to main content
GET
Get analytics insights

Authorizations

Authorization
string
header
required

Bearer authentication using the project Secret Key (prefixed with sk_, or test_sk_ for sandbox). All v4 public endpoints require the Secret Key — see Authentication. Never expose the Secret Key in client-side code.

Query Parameters

period
integer
default:30

Look-back window in days. Must be between 1 and 365.

Required range: 1 <= x <= 365
force
boolean
default:false

Bypass the server-side cache and regenerate insights. Expensive — avoid polling.

cached_only
boolean
default:false

Return only already-cached results; never trigger a fresh generation. Use for fast UI reads.

environment
enum<integer>
default:1

Environment: 0 = sandbox, 1 = production.

Available options:
0,
1

Response

Insights payload.

object
enum<string>
required
Available options:
analytics_insights
url
string
required
generated_at
string<date-time> | null
required

ISO 8601 timestamp of when the insights were generated.

period_days
integer
required

Window the insights cover, echoed from the period query param.

Required range: 1 <= x <= 365
health
enum<string> | null
required

One-word project health label.

Available options:
healthy,
watch,
critical,
null
summary
string
required

One-paragraph plain-English synthesis.

insights
object[]
required
health_score
integer

Integer score — lower is worse.

Required range: 0 <= x <= 10
is_cached
boolean

True when the payload came from the upstream cache.

is_stale
boolean

True when a background refresh is in progress and the returned data is an older snapshot.

is_empty
boolean

True when the project has insufficient data to generate insights.