Authentication
Bearer token (content:read): A workspace API key: ud_live_…
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
bot_id | query | string | Only for a key that covers several bots (see GET /bots). Or send the Usedocs-Bot header. |
Responses
| Status | Description |
|---|---|
200 | Doc health payload. |
400 | The request is missing something or has a bad value. |
401 | No API key, or the key is revoked. |
403 | A read key on a write, or a key for another bot. |
404 | Not found. |
429 | Rate limited: 120 requests a minute per key, 30 tasks an hour. See Retry-After. |
Response fields
| Field | Type | Description |
|---|---|---|
lastSync | `string \ | null` |
syncing | boolean | true while a sync is in progress. |
autoSyncScheduled | boolean | Whether automatic syncs are scheduled. |
urlSourceCount | number | Number of URL‑based sources. |
fileSourceCount | number | Number of file‑based sources. |
totalPages | number | Total pages across all sources. |
totalChunks | number | Total chunks across all sources. |
totalUrls | number | Total URLs discovered. |
failedUrls | number | Number of URLs that failed to crawl. |
failureRate | number (0–1) | Ratio of failedUrls to totalUrls (0 when totalUrls is 0). |
degraded | boolean | Whether the overall health is degraded. |
degradeReasons | string[] | Human‑readable reasons for degradation. |
staleFileCount | number | Number of file sources older than the stale threshold (30 days). |
sourcesNeedingAttention | number | Count of sources that need attention (failed URLs or stale files). |
sources | HealthSourceRow[] | Full list of health source rows (see below). |
worstSources | HealthSourceRow[] | Sub‑set of sources with the most severe issues. |
HealthSourceRow fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier of the source. |
kind | string | Source kind (url, file, …). |
url | string | URL of the source (if applicable). |
pages | number | Number of pages in the source. |
chunks | number | Number of chunks in the source. |
last_crawled | `string \ | null` |
crawl_status | string | Current crawl status (pending, discovering, indexing, ready, failed, …). |
total_urls | number | Total URLs discovered for this source. |
indexed_urls | number | URLs successfully indexed. |
failed_urls | number | URLs that failed to crawl. |
last_error | `string \ | null` |
stale | boolean | true if the source’s file is older than 30 days. |
age_ms | `number \ | null` |
needs_attention | boolean | true if the source has a failed crawl status or any failed URLs. |
All timestamps are ISO‑8601 strings in UTC.
The endpoint aggregates crawl results and file‑freshness information to give you a single view of your documentation health.