The routes most integrations use, grouped. Everything below is relative to /api/v1, except the two operational probes in System, which are not. The generated endpoint pages in this API reference list every route a customer can call, including the git host and notification routes this page leaves out. The operator’s staff console (/api/v1/staff/*) is not among them: it takes no customer credential and answers 404 outside the operator’s network (Staff console). The scope column names the permission a machine credential needs. Where it reads human only, the permission is one no API key may hold. See Scopes for why each is withheld. The OpenAPI specification (rendered as the endpoint pages in this API reference, less the staff console) describes exactly the routes the router registers, and a Go test keeps it that way: it enumerates the routes the router actually registers and fails the build if any is missing from the specification, or if the specification names a route that does not exist. Nothing tests that this page lists them all. Stated with its limits, because a guard whose limits are not stated gets trusted beyond them. The test covers routes and methods, not request and response schemas, which are hand-written and can still drift.

Credentials

Managed by a person, used by a machine. Every route here requires apikeys:manage, which no API key may hold, so this whole group is reachable only with a browser session. See Authentication for the credential lifecycle and Rotate an API key for the procedure.

Registry credentials

What a scan presents to a registry that requires authentication. Requires the private_registries entitlement, on Pro and Enterprise. credentials:manage is one no API key may hold. A credential that could store or rotate a registry credential could decide what a tenant’s scans authenticate to, and therefore which images they pull, so this group is reachable only with a browser session, and only by an administrator. credentials:read is grantable, because no route here returns a secret. There is no endpoint that reads a stored secret back, at any role. A secret that can be fetched is one that ends up in a screenshot; if you lose it, rotate it. Rotation and deletion are deliberately not gated on the entitlement. A tenant who has downgraded must always be able to replace or withdraw a secret they gave us. A leaked credential that cannot be revoked until the customer buys a plan is a security outcome no billing decision should produce. A scan whose credential cannot be resolved fails rather than falling back to an anonymous pull, which would risk reporting a public image’s findings as yours. Registry credentials are managed in the dashboard under Settings → Registries, where they can be stored, verified against the registry, rotated, disabled and deleted. The endpoints below are the same surface for automation; neither is a second source of truth.

Scans

Requesting a scan:
202 means work accepted, not work done, because pulling and unpacking an image takes seconds to minutes. 200 means an existing scan was returned, so a client can tell a deduplicated retry from a new scan without guessing. The image reference is untrusted input, validated at the boundary. Private and link-local registries, embedded credentials, URL schemes and traversal segments are refused with a message naming the rule. GET /scans/{id} reports database_state alongside the result: how fresh the advisory data behind it was. A scan run against stale data reports “no vulnerabilities” with exactly the same confidence as a correct one.

Assets and schedules

PUT rather than POST for a schedule, because a schedule is a singleton per asset: sending the same request twice must leave exactly one, which a partial unique index enforces even under a race.
timezone is an IANA name, and a daily or weekly schedule keeps that zone’s clock through daylight saving. It is optional: a new schedule is UTC, and an update that omits it keeps what the schedule has. Digest-pinned assets are refused: they have no tag to re-resolve, so a “rescan” would either re-read identical bytes forever or silently scan :latest, which is a different image from the one you are watching.

Findings

Enumerate with order=recent. It is the order whose keys are immutable and whose traversal is therefore exhaustive; severity is the backlog view and can miss rows that move. See Pagination. status: "resolved" is refused by PATCH. Resolution means a scan that would have found the vulnerability did not: evidence, not opinion. Requesting the state a finding is already in succeeds and writes nothing. The audit trail names its actor structurally: actor_user_id for a person, actor_api_key_id for a machine, scan_id for a scan, and none of them for an unattended system action such as a suppression expiring. No audit row ever claims a person did something a pipeline did. Bulk actions are verbs, not target statuses. The verbs are suppress, unsuppress and triage:
A bulk caller’s 500 findings are in a mix of states, so “set them all to open” means something different to each row. An action says what the caller intends, and the state machine decides per row whether it is reachable. Two actions are deliberately absent. Bulk resolve, because no human may assert resolution. Bulk reopen, because it has no legitimate use and would be an excellent way to undo a colleague’s triage across an entire asset. The response carries batch_id, requested, applied, already_applied, rejected and per-item results. See Errors and limits.

Policies and verdicts

Authoring policy requires policies:manage, which is not grantable to a key: the verdict exists so a build cannot decide its own outcome, and a credential that could both request a verdict and rewrite the policy behind it would make every scan pass. A policy is created disabled and with no rules. One that started enforcing the moment it was created would break a pipeline before its author had read it back. Rules never change in place. A change issues version N+1, which leaves the reasoning behind every existing verdict intact. At most one policy may be enabled per scope, because evaluating several would leave “did this scan pass” with no single answer. The endpoint a CI job calls to learn whether to ship:
201 on create, 200 on replay, because it is idempotent per (scan, policy version), enforced by a unique constraint. The result is in the body, never in the HTTP status. Branch on blocking. Every rule is reported, fired or not, because a pass has to be explainable too. GET /scans/{id}/verdicts returning several is normal and is the point: a scan evaluated under version 1 and again under version 4 has two decisions, and the first remains exactly as it was. Historical verdicts are never recomputed.

Webhooks

Managing webhooks requires webhooks:manage, which is not grantable to a key. An endpoint is a destination every future matching event is copied to, so a machine credential that could add one could stream an organisation’s findings somewhere the organisation never chose. Signing secrets have no read path at all. They are returned once by create and once by rotate, and TRUSTIVAN has no way to show them again, which is what makes “we cannot leak it in a screenshot” a property of the system rather than a policy. Rotation keeps the previous secret working for an overlap window, and deliveries are signed with both until it closes. Receivers accept a delivery if any signature in the header verifies, which is what makes rotation a change a customer can make on their own schedule rather than an outage. Subscribable events are scan.completed, verdict.recorded and finding.state_changed. An endpoint must name the ones it wants: one that received everything would be one whose owner cannot reason about what it will be sent. Disabling is reversible and keeps the delivery history; deleting is not. Re-enabling clears the consecutive-failure count, so an operator who has fixed their receiver is not disabled again by the failures that preceded the fix.

System

/health and /ready are separate on purpose. A liveness probe that consulted the database would restart every instance during a failover, turning a recoverable dependency outage into a total one. /system/status reports the caller’s own organisation’s activity and no cross-tenant figures: a queue depth would tell every customer how much work every other customer is doing. It carries no role requirement, because a viewer who cannot tell a stale database from a clean image is exactly the person the staleness will mislead. Prometheus metrics are a different thing on a different listener and are never on this API. POST /github/webhook verifies the signature, fails closed on a bad one, and acknowledges without processing. It does not scan pull requests. The work it once dispatched belonged to a product TRUSTIVAN is not. GET /github/available-repos lists what a GitHub App installation can see. It is the mechanism a future integration would need; it does not itself scan anything.

Session

Human-facing. Every route here is unauthenticated in the sense that it does not require an existing session, and the four credential endpoints are rate-limited per source address at 10 requests per minute, counted across every API replica (in Redis, falling back to each replica’s own count if Redis is unreachable). Behind a reverse proxy, the source address is the proxy unless TRUSTED_PROXIES names it; the shipped production Compose file and Kubernetes overlay set it. The OAuth callbacks redirect with a single-use code rather than a token in the URL, and the dashboard redeems it over POST /auth/exchange. A token in a redirect URL ends up in browser history, in a referrer header and in every proxy log between here and there. A provider sign-in whose email matches an existing account is linked only when both sides have verified the address: the provider says it verified it (Google verified_email, GitHub’s primary address marked verified, GitLab confirmed_at) and the existing account verified it here. Otherwise the callback answers 409 and nothing is linked. Linking on an unverified address would hand the account to whoever registered that address first. Logout revokes the refresh token as well as clearing the cookies, so a copy captured earlier cannot be replayed after the user believes they have signed out.

Second factor

Two halves that must not be confused. POST /auth/mfa/verify is public: it is the second step of a login, so the caller holds a challenge token and no session, and requiring one would make the challenge unanswerable. Everything under /auth/mfa sits behind an ordinary session and is human only. A machine credential has no second factor, and each of these answers 403 to one rather than failing further down. A correct password alone never produces a session once a factor is confirmed. It produces a challenge, and the response deliberately does not identify the user. Branch on mfa_required, not on the status code: it is 200 either way, and a client that reads 200 as “signed in” lands on an authenticated page with no session. code accepts a six-digit TOTP code or a recovery code, and both are single-use. A step already spent is refused even while still inside its time window. Every failure answers the same 401, because telling them apart would tell an attacker whether a captured token is still live. Enrolment, disable and regeneration each demand a current code in addition to the session. A session alone must not be enough to remove the factor; that is the step that turns a stolen session back into a stolen account. Confirming enrolment revokes every other session and re-issues this browser’s. Two-factor is per-user and opt-in. An organisation cannot yet require it of its members. Enterprise SSO deliberately defers to your own identity provider.

Members and invitations

The two redemption routes are POST rather than GET with the token in the path, deliberately: a token in a URL reaches the access log, the browser history, the Referer header of every asset the page loads, and any proxy in between. A body does not. owner is accepted by PATCH /members/{userId} and refused by POST /members/invitations. Promoting somebody already present is ownership transfer; offering ownership by email could leave a tenant with an owner who never agreed to be one. The invitation is also mailed to the invitee as a link to the dashboard’s accept page. The response carries that link as accept_url and says whether it was mailed (emailed); when no mail is configured it was not, and delivering it is the administrator’s to do.

Notifications

Two events alert: new critical or high findings first seen by a scan, and a FAIL policy verdict.

Organisations

Any request may carry X-Expected-Organization: <id>. If it would act in a different organisation, because you switched in another tab, it is refused with 409 and code: organization_changed before anything happens.

Workloads and authorization

/authz/decide answers about the calling principal only. One that answered about an arbitrary principal would be an oracle for probing what other agents may do. It is a POST because the question carries a resource and attributes, and a refusal is recorded, so it is not a safe method.

Software inventory

Bills of materials

Select the format with ?format=cyclonedx (the default) or ?format=spdx, and add ?download=true for a file rather than an inline body. Export reads, so it is assets:read. Import changes the tenant’s inventory, which is what scans:create already governs, so no new permission was introduced for it. Three properties worth relying on:
  • An import adds; it never removes. It cannot silently shrink an inventory a scan established.
  • Both formats round-trip. They share one neutral document with a single encoder and decoder each, so an export re-imported returns the same inventory rather than losing dependency edges on one of four pairwise paths.
  • Identity is the PURL, from the same function the scanner uses. A document’s own bom-ref or SPDXID is a document-local handle and is never persisted as identity.

Licences

Takes asset_id to narrow to one asset, and allow, deny and allow_categories to evaluate a candidate policy against the inventory. Those parameters are supplied per request rather than stored, so you can ask what a policy would flag before committing to it. The inventory is derived from components on read rather than materialised. A stored copy would go stale the moment a rescan corrected an asset. A licence is modelled as a fact about an asset, not a finding, so it cannot be suppressed; a finding that could be suppressed would let someone hide a copyleft component from their own licence report.

Check catalogue

Attack paths

The security graph and its attack paths. Built by the worker.

Certificates

The certificate inventory.

MCP

Compliance

Frameworks: soc2, iso27001, pci-dss, nist-ssdf, eu-cra, cert-in, rbi-csf, dpdp, hipaa. See Evidence packs. No status is ever “compliant” or “pass.” A control is reported as evidence present, evidence shows open issues, no data, or not covered by TRUSTIVAN. A test enforces that vocabulary against the words “compliant”, “pass”, “certified”, “attested”, “satisfied” and “met”. A control is satisfied by an organisation’s practice, not by a tool’s assertion. Every framework also reports controls_not_covered, beside the total, because a map listing only what a tool covers tells a reader their coverage is complete. Listing the mappings discloses nothing tenant-specific, so it is readable before you have any data.

Audit export

Requires the audit_export entitlement; a plan without it answers 402. Formats are jsonl (the default) and csv, bounded by since, until and max_rows. The response is streamed rather than buffered. A tenant’s trail is unbounded in time, and buffering one export would cost every other tenant the memory. Every row carries where it came from (source_ip, user_agent, request_id) and its chain columns: chain_seq, prev_hash, entry_hash and chain_version. The chain is tamper-evidence within the database: a row changed, deleted or reordered there breaks verification at that position. The export itself is not signed, so someone with full database access could rewrite rows and recompute every later digest; an operator anchors the chains outside the database with a signed auditctl checkpoint. The header’s chain_head records the position and digest at export time. Keep exports, and a later one whose digest at that position differs shows history was rewritten. The chain is verified before the stream opens and the result appears in the header, with any tombstones beside it. A break with a recorded erasure is a lawful deletion, a break without one is somebody removing evidence, and the two are never collapsed into one status.

Agents

There is no POST /agents. An agent is a workload, created by POST /workloads with kind: "agent", the route that already returns the credential exactly once and already refuses a machine caller. A second way to mint a non-human principal would be a second place for the two to disagree about what is grantable. There is no separate kill switch. DELETE /workloads/{id} is it; DELETE /agents/{id} calls the same revocation and additionally closes sessions. POST /agents/{id}/actions answers about the calling agent only, and {id} must match the credential rather than the path. An endpoint answering about an arbitrary agent would be an oracle for probing what other agents may do. It returns 200 for every outcome including deny and quarantine, so the reasoning survives an intermediary that treats a non-2xx as a transport failure. Disabling a tool is deliberately not available to the agent itself, and an agent may declare only a tool whose required permission its delegation grants. A tool declared irreversible answers step_up until a human approves the specific action: POST /agents/{id}/approvals with the tool, resource type and resource ID (and a current authenticator code, if the approver has one) returns a token the agent sends as approval_token. It is single-use, lapses after five minutes, and fits only that agent, tool and resource. The agent cannot vouch for a human itself: human_present is no longer read here, and POST /authz/decide honours it only from a human caller.

Scanner selection

Organization settings

Setting a target, an override or the validity opt-in changes how every finding in the organization is graded or what TRUSTIVAN does with your repository’s contents, so each needs a permission no API key can hold. See Risk scoring, IaC scanning and Secret scanning.

Plan and entitlements

Read-mostly by design. checkout and portal are the two exceptions and they still write nothing: each returns a short-lived URL at the payment provider, and a plan changes only when that provider reports the purchase back over /billing/webhook with a verified signature. Both are ungrantable to an API key, and with BILLING_PROVIDER=manual (the default) they report that the deployment does not sell.

Enterprise identity

A directory group grants nothing until an owner maps it: a group appears with a null role and stays inert. owner is unmappable, enforced by a database constraint. Ownership must not be reachable from a change in somebody else’s directory.

Routes that do not exist

Worth stating, because their absence is a design decision rather than an omission:
  • No general-purpose API client. The CI story is curl against a scoped key, or the trustivan gate that wraps exactly that loop. trustivan mcp offers an AI assistant 16 tools over existing routes. None of them adds a route.
  • No cluster scan target. Misconfiguration scanning reads the files in a repository target (IaC scanning); a cluster is connected instead: POST /api/v1/kubernetes/clusters records what runs there and each collection checks its workloads, namespaces and RBAC (Kubernetes posture), and POST /api/v1/cloud/accounts reads an AWS, Azure or Google Cloud account read-only.
  • No mail without a relay. With SMTP configured, invitations, verification, password reset and alerts are mailed; without it, an invitation issues a token and delivering it is yours to do. See Send mail through your SMTP relay.
  • No push-triggered scanning. POST /github/webhook verifies a push delivery’s signature, acknowledges and stops. A pull_request delivery is different once the installation is linked and checks are on for the repository: it records a pull request check.
  • No price is published. Checkout and the billing portal exist, but a plan’s price lives in the payment provider’s catalogue and none has been set up for this service; with BILLING_PROVIDER=manual, the default, nothing in the product can charge anyone at all.
An unrecognised path returns 404 with the standard envelope.