Audits

Create an audit run

Start a new cloud audit run. With trigger: "api" the run is dispatched to the cloud crawler immediately and progresses asynchronously; poll GET /v1/agent-runs/{id} for status. Cloud features are credit-gated. If the requested page count exceeds the org's plan ceiling, the run still starts at the plan's max (clamp, never a hard error) and the response carries a notice field (type: "page_limit_clamped") saying so.

post/v1/agent-runs

Request

  • Base URL: https://api.squirrelscan.com
  • URL: https://api.squirrelscan.com/v1/agent-runs
  • Auth: HTTP bearer

Request body

urlstring uri required

Site URL to audit.

trigger'api' required

Run origin. Public API callers must send api, which dispatches the cloud crawler. (cli/github/scheduled are internal-origin values that skip cloud dispatch and are not accepted here.)

mode'audit' | 'audit-fix' | 'fix' | 'recommend'
modelstring
configstring

Optional run config as a JSON-encoded string (not a nested object — the field is parsed server-side). Keys: coverageMode, maxPages, disabledRulePatterns, externalLinksEnabled. NOTE the round-trip asymmetry: you send a string here, but AuditRun.config is returned as a parsed object.

websiteIdstring
auditIdstring

Example request

{
  "config": "{\"coverageMode\":\"quick\",\"maxPages\":50,\"externalLinksEnabled\":true}"
}

Response

Run created (status pending).

idstring required
status'pending' required
createdAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.