Authenticating
Create a key under Settings. It is shown once. Send it as X-Api-Key on every request.
curl https://api.a11ysignal.com/v1/sites \ -H "X-Api-Key: a11y_xxxxxxxxxxxxxxxxxxxxxxxx"
A key is scoped to one workspace and has admin rights within it. Revoking a key takes effect immediately.
Endpoints
?siteId= narrows it.history?impact=critical&ruleId=color-contrastpagedFailing a build on a regression
Two ways. The simplest needs no API key at all — run the scanner directly in CI against a preview deployment:
npx @a11ysignal/scan https://preview.example.com \ --max-pages 25 --fail-on serious
The other triggers a hosted scan after deploy and waits for the verdict, so the result lands in your dashboard history too:
SCAN=$(curl -sX POST https://api.a11ysignal.com/v1/sites/$SITE_ID/scan \ -H "X-Api-Key: $A11YSIGNAL_KEY" | jq -r .id) # Poll until it finishes, then read the verdict. until [ "$(curl -s https://api.a11ysignal.com/v1/scans/$SCAN \ -H "X-Api-Key: $A11YSIGNAL_KEY" | jq -r .status)" != "running" ]; do sleep 5; done curl -s https://api.a11ysignal.com/v1/scans/$SCAN -H "X-Api-Key: $A11YSIGNAL_KEY" \ | jq -e '.counts.critical == 0 and .counts.serious == 0'
Shapes you will get back
A scan detail, trimmed to the fields most people use:
{
"id": "cm...",
"status": "completed",
"startUrl": "https://example.com/",
"score": 87.4,
"counts": { "critical": 0, "serious": 9, "moderate": 2, "minor": 0 },
"pagesScanned": 24,
"pagesFailed": 0,
"axeVersion": "4.13.0",
"diff": {
"newIssues": [{ "url": "…/checkout", "ruleId": "label", "impact": "critical", "count": 2 }],
"fixedIssues": [{ "url": "…/", "ruleId": "image-alt", "impact": "critical", "count": 5 }],
"scoreDelta": -3.5
},
"ruleSummary": [
{ "ruleId": "color-contrast", "impact": "serious", "elements": 9, "pages": 4 }
]
}score is null when a crawl read no pages at all — a start URL that 404s, or a robots.txt that disallows everything. Treat that as a failure, not a pass; the scan itself is marked failed with a reason.