The DocsCI API lets you queue runs, retrieve findings, manage projects, and integrate DocsCI into any CI/CD system — not just GitHub Actions.
https://snippetci.com/apiAll API requests require a bearer token. Generate a token in your Dashboard → Settings → API Tokens. Pass it in the Authorization header:
/api/runs/queueQueue a documentation runTriggers a new DocsCI run against a given repository commit. Returns a run ID you can poll for results.
| Field | Type | Required | Description |
|---|---|---|---|
| repo | string | required | GitHub repository in owner/repo format. |
| sha | string | optional | Git commit SHA to check. Defaults to the HEAD of the default branch. |
| branch | string | optional | Branch name. Used if sha is not provided. |
| pr_number | integer | optional | Pull request number. When provided, DocsCI posts inline PR comments. |
| checks | string[] | optional | Subset of checks to run: snippets, drift, accessibility, copy. Defaults to all. |
{
"id": "run_01HX...",
"status": "queued",
"repo": "owner/repo",
"sha": "abc123",
"created_at": "2026-04-14T10:00:00Z",
"url": "https://snippetci.com/runs/run_01HX..."
}/api/runs/{runId}Get a runRetrieve the current status and findings summary for a run.
{
"id": "run_01HX...",
"status": "completed", // queued | running | completed | failed
"repo": "owner/repo",
"sha": "abc123",
"created_at": "2026-04-14T10:00:00Z",
"completed_at": "2026-04-14T10:02:34Z",
"summary": {
"total": 42,
"passed": 39,
"failed": 3,
"skipped": 0
}
}/api/runsList runsReturns paginated run history for the authenticated user's organization.
| Param | Type | Description |
|---|---|---|
| limit | integer | Max results (1–100, default 20). |
| offset | integer | Pagination offset. |
| repo | string | Filter by repository (owner/repo). |
| status | string | Filter by status: queued | running | completed | failed. |
{
"runs": [ { "id": "...", "status": "completed", ... } ],
"total": 128,
"limit": 20,
"offset": 0
}/api/findingsGet findings for a runReturns detailed findings (failed checks) for a completed run.
| Param | Type | Description |
|---|---|---|
| run_id | string | Required. The run ID to fetch findings for. |
| kind | string | Filter by finding type: snippet | drift | accessibility | copy. |
{
"findings": [
{
"id": "fnd_01HX...",
"kind": "snippet",
"severity": "error",
"file": "docs/quickstart.md",
"line": 42,
"message": "Python snippet exited with code 1: ModuleNotFoundError: No module named 'requests'",
"snippet": "import requests\nrequests.get('https://...')",
"suggested_fix": "import httpx\nhttpx.get('https://...')"
}
]
}/api/tokensCreate an API tokenGenerates a new API token scoped to the authenticated user's organization.
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | required | Human-readable label for this token (e.g. 'GitHub Actions prod'). |
| expires_at | ISO 8601 | optional | Optional expiry date. Tokens without expiry are valid until revoked. |
{
"id": "tok_01HX...",
"name": "GitHub Actions prod",
"token": "dci_live_xxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-04-14T10:00:00Z",
"expires_at": null
}
// Note: the token value is returned only once. Store it securely./api/healthHealth checkReturns service status. No authentication required. Use this for uptime monitoring.
{
"status": "ok",
"db": "ok",
"auth": "ok",
"uptime": 86400,
"version": "0.9.0"
}All errors return JSON with an error field.
400Bad Request — invalid or missing parameters.
401Unauthorized — missing or invalid API token.
403Forbidden — token lacks permission for this resource.
404Not Found — run, finding, or resource doesn't exist.
429Too Many Requests — rate limit exceeded. Retry after the Retry-After header.
500Internal Server Error — something went wrong on our side.
The current API is v1 (implicit — no version prefix required in URLs). When breaking changes are introduced, a new version prefix will be added (e.g. /api/v2/...) and the old version will remain available for 12 months with deprecation notices.
Email us at hello@snippetci.com or open an issue on GitHub.
Back to Getting Started →