Skip to Content
Volatilis GRC Docs
Developers

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

Whatever the endpoint needs. The token inherits the access of its owner. See Authentication.

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 lifecycle field, 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

ParameterEffect
status=openEquality filter on a stored field. Repeat the parameter to match any of several values.
due_date_gte, _gt, _lte, _ltRange filter on a number or date field.
lifecycle=activeThe shared lifecycle, on resources with a status.
qText search in title, code and description.
sort=-updated_atSort 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.
limit1 to 200, default 50.
cursorThe next_cursor of the previous page.
updated_sinceOnly records changed at or after this time, oldest change first. For incremental sync.
include=totalAdds 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

  • POST creates, PATCH changes and DELETE removes. A PATCH is 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=true to 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 GET of one record answers with an ETag header, for example ETag: "1795012345678000". Every item of a list carries the same value as etag, so you can change a record without an extra GET. A PATCH answers with the new ETag.
  • PATCH, PUT and DELETE of one record require If-Match with that ETag. Without it the answer is 428 precondition_required and nothing is saved.
  • If the record changed since you read it, the answer is 412 precondition_failed. Nothing is saved, and the answer carries the current version as the ETag header and as current_etag in 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) accept If-Match optionally 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" }'
RequestAnswer
PATCH or DELETE without If-Match428 precondition_required
If-Match equals the current ETag200, with the new ETag
If-Match is an older ETag412 precondition_failed, with the current ETag
If-Match: *200, whatever is stored is replaced
If-Match is not an ETag of this API400 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.

CaseAnswer
Same key, same requestThe stored answer again, with the header Idempotent-Replayed: true
Same key, different request422 idempotency_key_reused
Same key, first request still running409 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.

StatuscodeMeaning
400invalid_json, invalid_if_match, invalid_limit, invalid_filter, invalid_sort, cursor_mismatch, invalid_cursor, idempotency_key_required, invalid_idempotency_keyThe request itself is wrong
401unauthenticatedToken missing, invalid, revoked or expired
402limitA plan limit is reached. See limit_key
403forbidden, scopeYour access or the token scope does not allow it
404not_foundUnknown endpoint, or a record you may not see
405method_not_allowedThe Allow header lists the methods
409conflict, idempotency_in_progressThe record state or a running request blocks it
412precondition_failedIf-Match no longer matches: the record changed since you read it. The ETag header carries the current version
413payload_too_large, too_largeThe request body is over 20 MB, or an uploaded file is over 20 MB
428precondition_requiredA change or delete needs If-Match with the ETag of the record
422invalid, idempotency_key_reusedA field is not valid. See errors
429rate_limitedSlow down. See Retry-After
500internal_errorTry 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-Remaining and RateLimit-Reset (seconds). A 429 adds Retry-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".

LimitFoundationIntelligenceTailored
MembersUnlimitedUnlimitedUnlimited
RisksUnlimitedUnlimitedUnlimited
ContractsUnlimitedUnlimitedUnlimited
Knowledge base documentsUnlimitedUnlimitedUnlimited
Active automations and agents10UnlimitedUnlimited
Simulation runs this month10UnlimitedUnlimited
Copilot chat requests this month1030 per member, pooledUnlimited
AI contract checks this month13 per member, pooledUnlimited
AI table cells this month0100 per member, pooledUnlimited
MCP access tokens3UnlimitedUnlimited
Emails sent this month1,000UnlimitedUnlimited
AI drafts this month315 per member, pooledUnlimited
Active AI agents0UnlimitedUnlimited
Document Intelligence pages this month2050 per member, pooledUnlimited
File storage2 GB100 GBUnlimited
Automation runs this month1,000UnlimitedUnlimited
REST API calls this month1,00050,0001,000,000
MCP tool calls this month1,000UnlimitedUnlimited

At the allowance, calls answer 402 until the month ends or the plan changes. Reading openapi.json is free.

On this page