API governance

Failure semantics are part of the contract.

A production client must preserve admission failures, partial coverage and terminal job state instead of flattening them into success or absence.

Machine errors

Branch on code, not message text.

This table is generated from the stable machine-code extension in the current v2 OpenAPI document.

Public API v2 stable machine error codes
CodeHTTPMeaningRetryableRetry-After
active_authorization_required403Advanced or active work needs explicit request authorization.No automatic retryNot defined
active_permission_required403The workspace has not granted the required active capability.No automatic retryNot defined
approved_target_scope_required403The active target is outside the approved workspace scope.No automatic retryNot defined
authentication_required401A valid application Bearer key is required.No automatic retryNot defined
capability_rate_limit_exceeded429The product-specific minute or hour limit was reached.Yes, after the condition changesUse header when present
capability_unavailable503A required public product lane is not currently available.Yes, after the condition changesNot defined
idempotency_key_conflict409The key was already bound to a different normalized request.No automatic retryNot defined
idempotency_key_required400A bounded visible Idempotency-Key is required for this write.No automatic retryNot defined
idempotency_request_in_progress409An identical idempotent request is still processing.Yes, after the condition changesUse header when present
insufficient_credits402The account has insufficient available execution credits.No automatic retryNot defined
insufficient_scope403The application key lacks the required operation scope.No automatic retryNot defined
job_not_found404The job does not exist in the authorized tenant scope.No automatic retryNot defined
monthly_credit_limit_exceeded402The application key monthly credit ceiling would be exceeded.No automatic retryNot defined
object_not_found404The retained object does not exist in this job scope.No automatic retryNot defined
rate_limit_exceeded429The application request rate limit was reached.Yes, after the condition changesUse header when present
responsible_use_required403Current responsible-use acceptance is required.No automatic retryNot defined
scan_credit_budget_invalid400The requested maxCredits is invalid for the selected profile.No automatic retryNot defined
scan_profile_unavailable503The selected public profile is unavailable.Yes, after the condition changesNot defined
service_unavailable503The public execution dependency is unavailable.Yes, after the condition changesNot defined

Rate limits

Application and capability minute/hour limits are independent. On 429, honor Retry-After when present and use bounded backoff. Changing keys or idempotency values to evade a limit is not a retry strategy.

Credits

Paid writes reserve before dispatch, then capture measured work and release unused reservation once. A 402 denial dispatches no paid operation. Job status can include the terminal ledger summary.

Idempotency

A write key binds normalized method, path and intent. Retry an uncertain identical request with the same key. Reusing it for different input returns idempotency_key_conflict.

Coverage

Keep partial and unavailable visible.

Availability and completeness are observable states. They are not interchangeable with a clean assessment.

Partial lookup

A required projection may complete while an optional lane is unavailable. Preserve lane status, source summary and limitations with the useful retained fields.

Partial job

Results and findings can be paged before or after terminal completion. Their status, coverage, page cursor and limitations disclose whether the loaded view is partial.

No all-clear

No matched finding, a timeout, an unconfigured provider or an unavailable lane does not prove absence, safety, ownership or complete coverage.

Downstream reports and alerts must retain coverage and limitation fields. Do not convert partial or unavailable into a successful negative conclusion.

Cancellation

A request, not a rewrite of history.

POST /v2/jobs/{job_ref}/cancel is an idempotent, tenant-scoped request. It asks the existing orchestrator to stop future scheduling and cancel queued work.

Already terminal jobs remain terminal. In-flight work reaches a durable state according to the existing cancellation boundary. Poll the job route for the resulting cancelled, partial or other terminal outcome.

Evidence and provenance

Read references without exposing backend custody.

The public lifecycle exposes allowlisted canonical result, finding and object projections with evidence summaries and source references.

Use results and object detail to follow retained canonical IDs and public evidence references. Findings require finding:read. There is no v2 raw-evidence-bytes route; service tokens, provider credentials, raw internal events and database identifiers remain private.