ValystrumHelp
Sign in

Using the API: keys and the reference

Plans
Every plan
Where
Settings
Updated

The Valystrum REST API lives at https://app.valystrum.io/api/v1/{org}/, and a script or an auditor reads it with a key an owner or admin issues under Settings, Auditor API.

Who can call it

The modules you see in the app have read endpoints there, and most have write endpoints too.

CallerReadsWrites
A signed-in person (the browser session)Yes, with that person's roleYes, with that person's role
An auditor API key (Authorization: Bearer cca_...)Yes, as a viewerNo: every write with a key is refused with 403
An AI assistant connected over MCPOnly through its own MCP connectionNo

A key or session works only for its own organisation. Asking for another organisation's slug answers 403 Forbidden when you are signed in, and 401 Unauthorized when you are not, whether that organisation exists or not.

Issue a key

Owners and admins issue keys. Everyone else sees the list of keys without the buttons.

  1. Open Settings and select Auditor API.
  2. Select Issue a key.
  3. Fill in Label (for example the auditor and the engagement), and choose a Scope:

    • read: reads evidence and reports. This is the key for an auditor or a script.
    • scim: provisions users from your identity provider. It can create and remove users.
  4. Optionally set Expires (optional) to a date. Leave it empty for no expiry; an engagement usually has one.
  5. Select Issue a key to confirm, and copy the secret.

A key starts with cca_. Valystrum keeps only a hash of it. The list shows each key's first characters, its label and scope, when it was issued, when it was last used (or never used) and when it expires. Issue an auditor API key has the details.

To stop a key, select Revoke on its row and confirm with Yes, revoke. A read key also stops working when the person who issued it is no longer an owner or admin.

Call the API

Send the key in the Authorization header as a bearer token. The path starts with your organisation:

curl -H "Authorization: Bearer cca_YOUR_KEY" \
  https://app.valystrum.io/api/v1/YOUR_ORG/controls
  • Replace YOUR_ORG with your organisation's short name in Valystrum (its slug). If you do not know it: Help, then Contact support, opens a mail whose subject shows it in brackets, before the version.
  • Every answer is JSON with ok. A success carries data: { "ok": true, "data": ... }. A failure carries error and the matching status code: { "ok": false, "error": "Risk not found" }.
  • A paged list answers with meta (total, page, limit and pages). See Page, filter and sort API lists.
  • A few endpoints answer a file instead of JSON, such as a CSV export or a PDF report; the reference names the media type.

What a key can do

  • A key only reads. It acts as a viewer. Every change through the API needs a person signed in, so an API key is refused on any write.
  • A key follows your plan. An endpoint for a module your plan does not include answers 403, as the module's page says it is not on your plan. For example, the findings endpoints need Silver or above; the controls endpoint above works on every plan.
  • A key follows your organisation's rules. It obeys the organisation's IP allow-list, when one is set, and stops working while the organisation's access is suspended.

Rate limits

Each key, and the organisation as a whole, has a per-minute ceiling that rises with the plan. The API reference lists the ceilings under the 429 answer. Every answer that hits one has the status 429 and says when to try again:

HeaderMeaning
Retry-AfterSeconds to wait before the next request
X-RateLimit-LimitThe ceiling for the current minute
X-RateLimit-RemainingRequests left in the current minute (0 on a 429)
X-RateLimit-ResetWhen the window resets, in Unix seconds

Wait for Retry-After before you try again; a script that retries at once only stays limited.

The API reference

PageWhat it is
app.valystrum.io/api-docsThe interactive API reference: every endpoint, its parameters and its answers
app.valystrum.io/referenceThe same reference as one readable page
app.valystrum.io/api/v1/openapi.jsonThe OpenAPI document both are built from
app.valystrum.io/sdkHow to generate a typed client for TypeScript, Python or Go from that document
app.valystrum.io/changelogThe changelog, with its own section for the API's versions

Find endpoints in the API reference shows how to read it.

Webhooks

Webhooks send Valystrum's events to your own HTTPS endpoint, on every plan, each delivery signed with a secret you set. See Send events to your own endpoint with webhooks and Check a webhook delivery's signature.

Provisioning users with SCIM

Your identity provider can create and remove members through SCIM at https://app.valystrum.io/api/scim/v2, with a key of the scim scope. Only an owner or admin who is a direct member of the organisation can issue one.