/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Get Content Health

Get Content Health

Aggregate documentation health: overall score, weekly history, stale pages, gaps, and API coverage.

GET/v1/projects/{projectId}/analytics/content-healthTry it
Session token

Returns an aggregate view of documentation health: an overall score and how it has moved week by week, pages that haven't been updated in 90+ days, documentation gaps detected from AI chat, and API coverage.

Note

Session JWT and org membership required. Any role can read it — an API key gets 401, a non-member 403. Any plan.

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.

Response Fields

NameDescription
data.score:integer
Overall content health, 0–100. The average of per-page health scores (freshness, feedback, broken links, completeness). 0 when no page has been scored yet.
data.stalePages:array
Pages not updated in more than 90 days.
data.gaps:array
The 20 most frequent open gaps — questions the docs don't cover well. source is inferred for a question the assistant answered with low confidence, or reported for one a reader reported from the assistant. The full, paginated list is at List Gaps.
data.coveragePercent:integer
Percentage of public API symbols that have documentation.
data.history:integer[]
The site-wide score at the end of each ISO week (Monday–Sunday, UTC), oldest first, for up to the last 12 weeks. Weeks with no snapshot are skipped. [] until the first snapshot is taken.
data.change:integer | null
Last week's score minus the first week's, in points. null with fewer than two weeks of history.
data.since:string | null
English month name of the first week shown, e.g. "October", for labels such as "+8 since October". null without history.
data.sinceDate:string | null
Monday of the first week shown, YYYY-MM-DD. null without history.

history, change, since and sinceDate are optional — if the history cannot be read, all four are left out. See trend fields.

How the history is recorded

A snapshot is the average of the project's per-page scores on one day. Syntext rescores pages and takes a snapshot:

•
after every build that deploys, preview builds included, except versioned and export builds — in the background, so it never fails or delays the build

There is one snapshot per project per day; a later one that day replaces it. A project with no scored pages gets no snapshot, so it never shows a 0 it did not earn.

Note

Per-page scores are available at GET /v1/projects/{projectId}/analytics/health.

Recompute content health

POST/v1/projects/{projectId}/analytics/health/compute

Rescores every page now and records today's snapshot. Same access as above: any member, any plan. No request body.

bash
curl -X POST https://api.syntext.dev/v1/projects/3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c/analytics/health/compute \
-H "Authorization: Bearer $SYNTEXT_JWT"
json
{
"data": {
"computed": true,
"snapshot": {
"score": 82,
"pageCount": 64,
"stalePages": 3,
"snapshotDate": "2026-11-08"
}
}
}

snapshot is null when the project has no scored pages yet, or when the snapshot could not be written. A recompute updates existing per-page scores rather than keeping the first score a page ever got.

If scoring fails, the endpoint returns 500 with code COMPUTE_FAILED.

Error Responses

401 Unauthorized

Missing, invalid or expired session JWT, or an API key.

403 Forbidden

You are not a member of the organization that owns the project.

404 Not Found

The project does not exist or has been deleted.

Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl https://api.syntext.dev/v1/projects/3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c/analytics/content-health \
-H "Authorization: Bearer $SYNTEXT_JWT"
Responseapplication/json
200OK
{
"data": {
"score": 82,
"stalePages": [
{
"path": "/guides/legacy-setup",
"lastUpdated": "2026-02-10T08:00:00Z"
}
],
"gaps": [
{
"topic": "webhook retry behavior",
"source": "inferred",
"frequency": 14
}
],
"coveragePercent": 76,
"history": [74, 76, 75, 79, 82],
"change": 8,
"since": "October",
"sinceDate": "2026-10-05"
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext