API reference

Base URL, authentication, the routes an agent uses, the error envelope and rate limits. The complete machine-readable description is /openapi.json.

Basics

  • Base URL: https://sibearsecurity.com/v1
  • OpenAPI description of the agent routes: /openapi.json
  • Send JSON with Content-Type: application/json, and a descriptive User-Agent such as sibear-client/1.0 (+https://sibearsecurity.com/docs). See Limits and errors for the Cloudflare 1010 note.
  • Prepare and lookup need no account. Status, credential and result routes need Authorization: Bearer <owner_token>, the secret the scan gave when it was queued.
  • A second security scheme, agentToken, is a bearer token sb_agent_... from Agent access. It works on the Review routes under /v1/account/reviews and on the free scan's status and result routes, for its own agent host only.
  • The ownership routes are keyed by the request id.
  • Never send tokens in a URL.

Routes for agents

RouteWhat it does
GET /v1/intake/formThe form's wording and versions.
POST /v1/prefilled-scan-requestsPrepare a scan for a person: returns link, token, expires_at. Nothing is emailed.
POST /v1/prefilled-scan-requests/lookupWith the token: pending, or submitted with request_id and scan.
GET /v1/scan-requests/{request_id}State of the request, for example whether the email is confirmed.
POST /v1/scan-requests/{request_id}/ownershipThe ownership proof to publish (dns and file; attestation for platform agents).
POST /v1/scan-requests/{request_id}/ownership/checkCheck the proof: verified, reason, method, scan, owner_token, refusal, token_expires_at.
GET /v1/scans/{request_id}/statusScan state; ?wait=0..25 holds the request until it settles. Bearer owner token.
POST /v1/scans/{request_id}/credentialGive a fresh test key when status says awaiting_credential. Bearer owner token.
GET /v1/results/{result_id}The result as JSON. Bearer owner token.
GET /v1/results/{result_id}/export.jsonThe result as a JSON download. Bearer owner token.
GET /v1/results/{result_id}/export.pdfThe result as a PDF. Bearer owner token.

Agent access

RouteWhat it does
POST /v1/agent-access/requestsAsk for access with email and agent_url: returns code, poll_token, expires_at, poll_interval_s. One approval email is sent.
POST /v1/agent-access/requests/pollWith the poll token: pending, approved (carries token once), delivered or revoked.
RouteWhat it does
POST /v1/prefilled-review-ordersPrepare a Review set-up for the person with two fields, email and agent_url; SiBear reads the rest from their code. Optional: the test key, repositories, brand_rules and business_facts (SiBear reads both from the code), a plain on or off for each optional check (checks) and for the destructive test (destructive.on), and coupon_code. Deprecated but still accepted: api_preset, custom_json, api_sample, checklist, markers and packs. Never a consent or a signature. Returns link, token, expires_at, ownership, paid_by_code and test_key_provided. Nothing is emailed. See Prepare it for the person to approve.
POST /v1/prefilled-review-orders/keyWith the token: the test key you did not send with the set-up (test_key with credential_kind), or no_key. Until the Review starts. Returns test_key_provided, no_key and delete_by. See Send the key later.
POST /v1/prefilled-review-orders/lookupWith the token: pending with the set-up (never the key: only test_key_provided), or used.

The person then authorizes the test and connects GitHub (POST /v1/account/reviews/{order_id}/authorize) and starts the Review (POST /v1/account/reviews/{order_id}/approve) on one page. Both are theirs alone: a token gets 403 person_only.

Review routes (bearer `agentToken`)

RouteWhat it does
GET /v1/account/reviewsList orders. Scope review:read.
GET /v1/account/reviews/{order_id}The order view, with needs_person links and, once the person connected GitHub, setup_reading (what SiBear read in their code). Scope review:read.
GET /v1/account/reviews/{order_id}/statusRun status. Scope review:read.
PUT /v1/account/reviews/{order_id}/agentThe agent address, on the token's host, and optionally mcp_url (the MCP server on the same registrable domain the Review reads at run time, tool list only) with mcp_manifest (the approved tools/list result). SiBear reads how the agent is called from the person's code. Scope review:prepare.
POST /v1/account/reviews/{order_id}/repository-linkThe link the person opens to connect GitHub. Scope review:prepare.
PUT /v1/account/reviews/{order_id}/contextBrand rules and business facts (optional), without the person's consents. Scope review:prepare.
PUT /v1/account/reviews/{order_id}/test-markersThe person's test markers and their "in place" ticks; our AI suggests the kinds from the code. Scope review:prepare.
PUT /v1/account/reviews/{order_id}/checklistThe person's own answers, or a partial change to some; our AI answers each question from the code. Scope review:prepare.
POST /v1/account/reviews/{order_id}/startStart with test_key (and credential_kind), or no_key. Scope review:run.
POST /v1/account/reviews/{order_id}/stopCancel a queued or running Review: no report, no free re-run. Scope review:run.
POST /v1/account/reviews/{order_id}/retryRe-run a Review that failed on SiBear's side. Scope review:run.
POST /v1/account/reviews/{order_id}/credentialGive a fresh test key. Scope review:run.
GET /v1/account/reviews/{order_id}/reportThe report, and its other forms: report.json, report.sarif, report.pdf, summary.pdf, ml-bom, ml-bom.cdx.json, threat-model, system-map, compliance. Scope review:read.

The free scan's GET /v1/scans/{request_id}/status and GET /v1/results/{result_id} (and its exports) also accept the token, with scope scan:read. Payment, consents and the other person-only steps answer 403 person_only; see Agent access.

The step-by-step order, with examples: For AI agents for the free scan, Run a paid Review for the Review.

Errors

Every error has the same body:

{"error": {"code": "validation_failed", "message": "...", "fields": [{"field": "...", "code": "...", "message": "..."}], "request_id": "..."}}

code is stable and meant for programs; message is for people; fields lists each field that was wrong, with its own code; request_id identifies the request if you contact support. Codes are listed in Limits and errors.

Rate limits

Every limit is listed in Limits and errors. Every 429 has a Retry-After header in seconds.