Using the API: keys and the reference
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.
| Caller | Reads | Writes |
|---|---|---|
| A signed-in person (the browser session) | Yes, with that person's role | Yes, with that person's role |
An auditor API key (Authorization: Bearer cca_...) | Yes, as a viewer | No: every write with a key is refused with 403 |
| An AI assistant connected over MCP | Only through its own MCP connection | No |
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.
- Open Settings and select Auditor API.
- Select Issue a key.
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.
- Optionally set Expires (optional) to a date. Leave it empty for no expiry; an engagement usually has one.
- 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_ORGwith 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 carriesdata:{ "ok": true, "data": ... }. A failure carrieserrorand the matching status code:{ "ok": false, "error": "Risk not found" }. - A paged list answers with
meta(total,page,limitandpages). 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:
| Header | Meaning |
|---|---|
Retry-After | Seconds to wait before the next request |
X-RateLimit-Limit | The ceiling for the current minute |
X-RateLimit-Remaining | Requests left in the current minute (0 on a 429) |
X-RateLimit-Reset | When 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
| Page | What it is |
|---|---|
| app.valystrum.io/api-docs | The interactive API reference: every endpoint, its parameters and its answers |
| app.valystrum.io/reference | The same reference as one readable page |
| app.valystrum.io/api/v1/openapi.json | The OpenAPI document both are built from |
| app.valystrum.io/sdk | How to generate a typed client for TypeScript, Python or Go from that document |
| app.valystrum.io/changelog | The 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.