Skip to main content
Documentation menu

The CARL API

The /api/v1 HTTP API on carl.wentzel.ai to start a scan, read its findings, issue and verify badges, and comment on criteria.

The CARL API exposes the hosted assessor over HTTP. Every route lives under /api/v1 and the contract is published as openapi.v1.json.

What you can do

  • Scan a public repository. POST /api/v1/scans starts a scan. Read it back with GET /api/v1/scans/{scanId} and list its findings with GET /api/v1/scans/{scanId}/findings. DELETE /api/v1/scans/{scanId} cancels a scan that is still running.
  • Get a level in one call. POST /api/v1/assess runs the deterministic engine and returns the report identifier and achieved level in the same request (HTTP 201). The full persisted report body is not returned.
  • Issue and verify badges. POST /api/v1/badges issues an Open Badge for a certified level. GET /api/v1/badges and GET /api/v1/badges/verify read and verify stored badges.
  • Discuss a criterion. GET and POST /api/v1/comments.
  • Read the scorecard. GET /api/v1/scorecard needs a scoped API key.

Synchronous assess response

POST /api/v1/assess responds with HTTP 201. The success body is the stored report id and the level the assessment reached, and nothing else. The full persisted report body is not returned. For example, a run that reaches level 3:

{
  "reportId": "3f2a9c14-6b70-4e1d-9a55-0c8e7b21d4f6",
  "levelAchieved": 3
}

reportId is the identifier stored for that report. levelAchieved is an integer from 0 through 6.

TypeScript SDK

@wentzel-ai/carl is workspace-only and not published. For external integrations, call the HTTP API directly.

Access

No account or sign-up is needed to scan. The first scan sets an HttpOnly owner cookie, and only that browser or client can read, list or cancel its own scans. Send the cookie back on later calls. A signed-in user owns scans by user id instead. Only the scorecard takes an API key.

Rate limits

Starting a scan is limited to 5 scans per IP per rolling hour. Past that, the API answers 429 and sets a Retry-After header with the seconds to wait. Self-hosted runs of the CLI have no limit.

When to prefer the API vs other tools

  • Dashboards and custom integrations. API.
  • CI gating. CLI: deterministic, no external dependency.
  • One-off human-readable reports. Web app.

Reference

Every endpoint, parameter and response is listed in the API reference.