Sdk

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET

Retrieve sdk doctor report

Returns a pre-digested health assessment of the PostHog SDKs the project is using. Covers which SDKs are current vs outdated (smart-semver rules with grace periods and traffic-percentage thresholds), per-version breakdown, and a human-readable reason for each assessment. Use this to diagnose SDK version issues, surface upgrade recommendations, or check overall SDK health.

Required API key scopes

project:read

Query parameters

  • force_refresh
    boolean

Response


Example request

GET /api/projects/:project_id/sdk_doctor/report
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/sdk_doctor/report/

Example response

Status 200
RESPONSE
{
"overall_health": "healthy",
"health": "success",
"needs_updating_count": 0,
"team_sdk_count": 0,
"sdks": [
{
"lib": "string",
"readable_name": "string",
"latest_version": "string",
"needs_updating": true,
"is_outdated": true,
"is_old": true,
"severity": "none",
"reason": "string",
"banners": [
"string"
],
"releases": [
{
"version": "string",
"count": 0,
"max_timestamp": "string",
"release_date": "string",
"days_since_release": 0,
"released_ago": "string",
"is_outdated": true,
"is_old": true,
"needs_updating": true,
"is_current_or_newer": true,
"status_reason": "string",
"sql_query": "string",
"activity_page_url": "string"
}
],
"outdated_traffic_alerts": [
{
"version": "string",
"threshold_percent": 0.1
}
]
}
]
}

Retrieve sdk doctor report

Returns a pre-digested health assessment of the PostHog SDKs the project is using. Covers which SDKs are current vs outdated (smart-semver rules with grace periods and traffic-percentage thresholds), per-version breakdown, and a human-readable reason for each assessment. Use this to diagnose SDK version issues, surface upgrade recommendations, or check overall SDK health.

Required API key scopes

project:read

Query parameters

  • force_refresh
    boolean

Response


Example request

GET /api/projects/:project_id/sdk_doctor/report
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/sdk_doctor/report/

Example response

Status 200
RESPONSE
{
"overall_health": "healthy",
"health": "success",
"needs_updating_count": 0,
"team_sdk_count": 0,
"sdks": [
{
"lib": "string",
"readable_name": "string",
"latest_version": "string",
"needs_updating": true,
"is_outdated": true,
"is_old": true,
"severity": "none",
"reason": "string",
"banners": [
"string"
],
"releases": [
{
"version": "string",
"count": 0,
"max_timestamp": "string",
"release_date": "string",
"days_since_release": 0,
"released_ago": "string",
"is_outdated": true,
"is_old": true,
"needs_updating": true,
"is_current_or_newer": true,
"status_reason": "string",
"sql_query": "string",
"activity_page_url": "string"
}
],
"outdated_traffic_alerts": [
{
"version": "string",
"threshold_percent": 0.1
}
]
}
]
}

Community questions

Questions about this page? or post a community question.