Documentation

API reference

Use the version-one API to inspect capabilities, manage policies, check text, audit logs and read usage. Configure the service origin for your installation.

Contract

The application-mode OpenAPI contract defines exact request, response and error schemas. Every operation is under /v1. Breaking changes require a new major path; additive fields can appear in v1.

Authentication and scope

Use Authorization: Bearer YOUR_SCOPED_KEY. Organization owners create keys in the application workspace's Integration keys area. Keys are revealed once and can be revoked. Never put a key in a URL. Browser sessions additionally require CSRF protection for POSTs.

Implemented endpoints

Method and pathPurposeRequired scope
GET /v1/auth/testValidate credentials and organizationauth:test
GET /v1/scan-policiesList authorized policiesscan_policies:read
GET /v1/scan-policies/{id}Read a policy versionscan_policies:read
POST /v1/scan-policies/{id}/estimateQuote the request without scanningscan_policies:estimate
POST /v1/checkRun a complete checkscan:check
GET /v1/scans/{id}Read authorized metadata, without textscan_policies:read
GET /v1/capabilitiesRead the current versioned capability catalog and operational availabilitycatalog:read
GET /v1/checksList check availabilitycatalog:read
GET /v1/scan-policy-templatesList templatescatalog:read
GET /v1/scan-policy-templates/{slug}Read a templatecatalog:read
POST /v1/scan-policy-templates/{slug}/copyCreate a policy from a templatescan_policies:write
POST /v1/scan-policies/{id}/versionsPublish an immutable policy versionscan_policies:write
POST /v1/audit-sourcesUpload a bounded CSV or JSONL sourceaudits:write
POST /v1/auditsMap, validate and quote an auditaudits:write
POST /v1/audits/{id}/runQueue the quoted auditaudits:write
POST /v1/audits/{id}/cancelCancel an auditaudits:write
GET /v1/audits/{id}Read audit progress and usageaudits:read
GET /v1/audits/{id}/findingsPage content-free findingsaudits:read
GET /v1/usageRead balance and page usageusage:read

Capability and policy versions

GET /v1/capabilities returns capabilities-v1, with readable limits, exact check/runtime versions, review constraints and current availability. The legacy /v1/checks representation keeps its historical status strings for existing clients; those strings are not a product release label or execution authority.

Existing policy versions keep their behavior. To use the newer deterministic checks, explicitly publish a new version with runtime_choice: "rules_v2". This selects deterministic-rules-v2, including suspicious Unicode; it does not add models. The default retain preserves the previous version. Review the changed checks and quote before running them.

Check text

Replace the policy ID and key with values from your organization. This synthetic request shows the supported shape; it is not a live response or executable credential.

POST /v1/check
Authorization: Bearer YOUR_SCOPED_KEY
Idempotency-Key: synthetic-ticket-42
Content-Type: application/json

{
  "content": "Please contact sam@example.test.",
  "scan_policy_id": "YOUR_POLICY_UUID",
  "scan_policy_version": 1,
  "direction": "input",
  "return_redacted_content": true
}

A successful classification returns HTTP 200 with status, decision, safe_to_continue, findings, coverage, policy/runtime identifiers, and usage. An explicitly requested redacted_content is returned in memory only. A review or block result is a successful, billable classification.

Audit uploads and progress

Send one file, source_format and retention as multipart data to /v1/audit-sources. Audit sources allow up to 5 MiB; text fields remain limited to 128 KiB. The service stores a private signed reference internally and returns a source ID with an authoritative expiry time, not a cloud signed-upload URL.

Create an audit with the source ID, Scan Policy and column mapping to receive a quote. Confirm it with the run endpoint. Processing requires an available audit worker; poll with a deadline and use the returned opaque cursor to page content-free findings. Source content becomes unavailable when retention expires.

Input and retry limits

Target plus optional context is limited to 20,000 Unicode code points; scan HTTP bodies to 128 KiB (the multipart audit-source exception is described above). Policies can require smaller model windows. Structured fields are at most 16 named scalar values and 2,000 serialized code points, and must match the policy’s declared types.

Keep the same request key and complete payload for a retry within seven days. A different request using that key returns 409. Replays do not create another debit. Once the retry window expires, the key can represent new work. An omitted policy version is resolved on the first accepted request and retained for that retry window.

Handle errors explicitly

400 / 413 / 422
Correct malformed, oversized, or unsupported input.
401 / 403 / 404
Check credentials, policy scope, and organization access.
402
Insufficient available credits; do not silently bypass checks.
409
Request conflict or work in progress. Reuse an identical request only when retryable.
410
The retained source has expired or is no longer available; upload a new source when needed.
429 / 503 / 504
Respect Retry-After and the response’s retryable flag. Retry the same request; never substitute an allow result.

Error envelopes include schema_version, code, and retryable. Do not log raw text, context, keys, or redacted output as debugging metadata.