REST conventions
Base URL, response shape, filters, paging, idempotency, errors and rate limits of the REST API.
The REST API lives at https://grc.volatilis.org/api/v1. It speaks JSON only. The API reference lists every endpoint. This page explains what they have in common.
Role needed
Basics
- Field names are
snake_case. Dates are ISO 8601. - Money is always an object with its currency:
{ "amount": 1200000, "currency": "EUR" }. There is no currency conversion. - Resources with a status also carry a
lifecyclefield, the shared lifecycle of Volatilis GRC. - The machine-readable description is
GET /api/v1/openapi.json. It needs no token. - Every response carries
X-Request-Id. Quote it when you ask for help.
One record answers { "data": { ... } }. Creating answers 201. A list answers:
{ "data": [ { "id": "..." } ], "next_cursor": "eyJ..." }next_cursor is null on the last page.
Try it
curl "https://grc.volatilis.org/api/v1/risks?status=open&sort=-updated_at&limit=2" \
-H "Authorization: Bearer vgrc_YOUR_TOKEN"Filters, sorting and paging
| Parameter | Effect |
|---|---|
status=open | Equality filter on a stored field. Repeat the parameter to match any of several values. |
due_date_gte, _gt, _lte, _lt | Range filter on a number or date field. |
lifecycle=active | The shared lifecycle, on resources with a status. |
q | Text search in title, code and description. |
sort=-updated_at | Sort key. A leading minus sorts descending. The default is -updated_at. Lists allow updated_at, created_at, code (where the resource has a code) and the name: title, or name for key risk indicators and counterparties, and vendor for contracts. Names sort without regard to case. The reference lists the keys per endpoint. |
limit | 1 to 200, default 50. |
cursor | The next_cursor of the previous page. |
updated_since | Only records changed at or after this time, oldest change first. For incremental sync. |
include=total | Adds total. Counts as two calls. |
Some endpoints also take their own filters, such as owner or band on risks. The reference lists them per endpoint.
While there is a next page, the answer also carries a Link header with rel="next", the same request with the next cursor.
Use the same filters and sort on every page; limit may change. A cursor that was issued for other filters or another sort answers 400 cursor_mismatch, and a damaged one 400 invalid_cursor. An unknown filter answers 400 invalid_filter and an unknown sort key 400 invalid_sort.
To read every record while others keep editing, sort by created_at or code: each record that existed for the whole walk comes exactly once. With -updated_at a record that changes during the walk moves to the front and can be missed.
Incremental sync
Remember the newest updated_at you received. Next time, ask for updated_since=<that time>, a few seconds earlier to be safe, and update your copy by id: a record can come again. Deleted records are not in the list. Read them from GET /deleted?resource=contract&since=<time>: the deletes since that time, oldest first, in pages like any list, each with record_id (the id of the deleted record) and deleted_at. Remember the newest deleted_at as you do updated_at, and remove record_id from your copy. Every delete also sends the webhook <resource>.deleted, for example control.deleted, with the record's id. Deleting a contract also deletes its obligations, and deleting a framework its requirements; those deletes are listed too. resource is one of control, kri, action, incident, contract, obligation, matter, counterparty, policy, committee, framework, requirement, org_unit, clause, contract_table, paper and automation. You need the right to view the whole module: if you see only your department or your own records, the call answers 403 and your webhooks get no .deleted events, because a deleted record can no longer be matched to a department.
Changing records
POSTcreates,PATCHchanges andDELETEremoves. APATCHis a JSON Merge Patch (RFC 7396): only the fields in the body change, and the fields you leave out keep the value stored at the moment of saving, not the one you read earlier.- Add
?dry_run=trueto a write on a record endpoint to run all checks without saving. The answer carries"dry_run": true.
Changing a record: If-Match and ETag
Two clients that read the same record and save one after the other must not overwrite each other. Every single record therefore has a version, and a change has to name the version it is based on.
- A
GETof one record answers with anETagheader, for exampleETag: "1795012345678000". Every item of a list carries the same value asetag, so you can change a record without an extraGET. APATCHanswers with the newETag. PATCH,PUTandDELETEof one record requireIf-Matchwith that ETag. Without it the answer is428precondition_requiredand nothing is saved.- If the record changed since you read it, the answer is
412precondition_failed. Nothing is saved, and the answer carries the current version as theETagheader and ascurrent_etagin the body. Read the record again, apply your change to the new state and repeat. If-Match: *overwrites whatever is stored. Use it only when overwriting is what you want.- Action endpoints (
POST /contracts/{id}/move,POST /obligations/{id}/status) acceptIf-Matchoptionally and then behave the same. They are guarded status changes, so they also work without it. - Bulk endpoints and the import write only the fields they name, one record at a time under the same lock, and take no versions.
# read: the ETag comes back in the header
curl -i "https://grc.volatilis.org/api/v1/risks/RISK_ID" -H "Authorization: Bearer vgrc_YOUR_TOKEN"
# ETag: "1795012345678000"
# change one field, based on that version
curl -X PATCH "https://grc.volatilis.org/api/v1/risks/RISK_ID" \
-H "Authorization: Bearer vgrc_YOUR_TOKEN" -H "Content-Type: application/json" \
-H 'If-Match: "1795012345678000"' \
-d '{ "status": "monitoring" }'| Request | Answer |
|---|---|
PATCH or DELETE without If-Match | 428 precondition_required |
If-Match equals the current ETag | 200, with the new ETag |
If-Match is an older ETag | 412 precondition_failed, with the current ETag |
If-Match: * | 200, whatever is stored is replaced |
If-Match is not an ETag of this API | 400 invalid_if_match |
Idempotency
Send an Idempotency-Key header (1 to 255 printable characters) with any write you may need to repeat, for example after a timeout.
| Case | Answer |
|---|---|
| Same key, same request | The stored answer again, with the header Idempotent-Replayed: true |
| Same key, different request | 422 idempotency_key_reused |
| Same key, first request still running | 409 idempotency_in_progress, with Retry-After |
Keys are kept for 24 hours and belong to one token. The key is required on POST /imports and POST /webhooks/{id}/test. Server errors, rate limits and plan limits are not stored, so you can retry with the same key.
Errors
Errors use application/problem+json (RFC 9457):
{
"type": "https://docs.volatilis.org/api/errors/forbidden",
"title": "Forbidden",
"status": 403,
"code": "forbidden",
"detail": "Your access does not include edit on matters.",
"request_id": "0015799b-58f5-4ade-a02a-7ee25406cb88"
}Validation errors (422) add errors, a list of { field, message }. Plan limits (402) add limit_key.
| Status | code | Meaning |
|---|---|---|
| 400 | invalid_json, invalid_if_match, invalid_limit, invalid_filter, invalid_sort, cursor_mismatch, invalid_cursor, idempotency_key_required, invalid_idempotency_key | The request itself is wrong |
| 401 | unauthenticated | Token missing, invalid, revoked or expired |
| 402 | limit | A plan limit is reached. See limit_key |
| 403 | forbidden, scope | Your access or the token scope does not allow it |
| 404 | not_found | Unknown endpoint, or a record you may not see |
| 405 | method_not_allowed | The Allow header lists the methods |
| 409 | conflict, idempotency_in_progress | The record state or a running request blocks it |
| 412 | precondition_failed | If-Match no longer matches: the record changed since you read it. The ETag header carries the current version |
| 413 | payload_too_large, too_large | The request body is over 20 MB, or an uploaded file is over 20 MB |
| 428 | precondition_required | A change or delete needs If-Match with the ETag of the record |
| 422 | invalid, idempotency_key_reused | A field is not valid. See errors |
| 429 | rate_limited | Slow down. See Retry-After |
| 500 | internal_error | Try again and quote the request id |
Rate limits and plan allowance
- Each token may make 600 read requests and 120 write requests a minute.
- The whole organization may make 3,000 requests a minute.
- Every response carries
RateLimit-Limit,RateLimit-RemainingandRateLimit-Reset(seconds). A 429 addsRetry-After.
Every request also counts as one call against the monthly allowance of the plan. The allowance is the row "REST API calls this month".
| Limit | Foundation | Intelligence | Tailored |
|---|---|---|---|
| Members | Unlimited | Unlimited | Unlimited |
| Risks | Unlimited | Unlimited | Unlimited |
| Contracts | Unlimited | Unlimited | Unlimited |
| Knowledge base documents | Unlimited | Unlimited | Unlimited |
| Active automations and agents | 10 | Unlimited | Unlimited |
| Simulation runs this month | 10 | Unlimited | Unlimited |
| Copilot chat requests this month | 10 | 30 per member, pooled | Unlimited |
| AI contract checks this month | 1 | 3 per member, pooled | Unlimited |
| AI table cells this month | 0 | 100 per member, pooled | Unlimited |
| MCP access tokens | 3 | Unlimited | Unlimited |
| Emails sent this month | 1,000 | Unlimited | Unlimited |
| AI drafts this month | 3 | 15 per member, pooled | Unlimited |
| Active AI agents | 0 | Unlimited | Unlimited |
| Document Intelligence pages this month | 20 | 50 per member, pooled | Unlimited |
| File storage | 2 GB | 100 GB | Unlimited |
| Automation runs this month | 1,000 | Unlimited | Unlimited |
| REST API calls this month | 1,000 | 50,000 | 1,000,000 |
| MCP tool calls this month | 1,000 | Unlimited | Unlimited |
At the allowance, calls answer 402 until the month ends or the plan changes. Reading openapi.json is free.