Reference / API
API overview
Authenticating with API keys, the shape of responses and errors, pagination and what an API key cannot do.
Base URL
The REST API lives under /api/v1 on the same origin as the app: https://attest.redassay.com/api/v1. Requests and responses are JSON, apart from file uploads (multipart) and file or PDF downloads. The admin app and the employee portal use this same API, so anything you can do in the UI with a given permission you can do with a key holding that permission, apart from the session-only operations listed below.
API keys
Create a key under Settings, then API keys (owners and admins). A key has a name, an expiry (never, 30 days, 90 days or 1 year) and one or more scopes. Scopes are the same resource:action permissions that roles use (see the permission matrix), and you can only grant scopes you hold yourself. A key is created from a signed-in session; a key cannot create another key.
The key is shown once, when it is created. RedAssay stores a salted scrypt hash and a short lookup prefix, not the key, so a lost key cannot be recovered: revoke it and create another.
Send the key in either header:
curl https://attest.redassay.com/api/v1/frameworks \
-H "x-api-key: ra_0123abcd..."
curl https://attest.redassay.com/api/v1/frameworks \
-H "Authorization: Bearer ra_0123abcd..."- A key belongs to one organization and acts only inside it. There is no organization parameter on any route.
- A key can use a permission only if it is one of the key's scopes and the person who created the key still holds it. If their roles are reduced, the key is reduced with them, at once.
- A key stops working when it is revoked, when it expires, or when the member who created it is deactivated.
- Each use updates the key's last-used time, and changes made with a key are recorded in the audit log under the key's name and id.
Responses
List endpoints return the items and how many there are:
{
"data": [ { "id": "risk_...", "title": "..." } ],
"count": 1
}Endpoints that return one record return the object itself, including its id. Identifiers are strings with a prefix for the kind of record, such as risk_, tsk_, ctl_, pol_ or evd_. Dates are ISO 8601 strings in UTC.
Records that have a computed state include it as status together with reasons, the same values the UI shows. See reason codes.
{
"id": "tsk_...",
"title": "Review user access",
"frequency": "quarterly",
"status": "at_risk",
"reasons": [ { "code": "overdue", "detail": "Evidence was due by 2026-04-29" } ],
"dueAt": "2026-04-29T00:00:00.000Z",
"lastCollectedAt": "2026-01-15T00:00:00.000Z",
"controlIds": [ "ctl_..." ]
}Pagination and filters
Two lists are paginated, 50 per page, with a page query parameter starting at 1: risks and the activity log. Their responses add page and pageSize, and count is the total across all pages. Every other list returns everything in one response.
Filters are query parameters and are listed per endpoint in the API reference.
Errors
Errors use the HTTP status and a JSON body with a human-readable message:
{ "error": "Task has evidence history and can't be deleted" }| Status | Meaning |
|---|---|
400 | The input is invalid. For schema failures the body also has issues, the list of validation problems, and error is the first one, prefixed with the field it concerns. |
401 | No session and no valid API key, or the key is expired, revoked or orphaned. |
403 | Authenticated, but the role or key lacks the permission, or the action is not allowed for this caller (for example approving your own policy version). |
404 | The record does not exist in your organization. Records that belong to another organization also return 404. |
409 | The request conflicts with the record's current state, for example publishing a version that is not approved. |
413 | A JSON body larger than 1 MB. |
429 | A rate limit was reached: too many invitations, sign-in emails, signing requests, trust center requests or AI requests. Most of these carry a Retry-After header with the seconds to wait. See Rate limits. |
500 | An unexpected error. The body is { "error": "Internal error" }; the detail stays in RedAssay's own logs. |
502, 503, 504 | Returned by the AI tailoring endpoint when the AI provider fails, is unavailable or times out. An AI evidence review that fails is returned as a review with status error instead. |
Writes
- Send JSON with
Content-Type: application/json.PATCHupdates only the fields you send. - Every successful write is recorded in the audit log with the request body, secrets redacted.
- Requests authenticated by a browser session cookie are refused with 403 if their
Originheader names a different host. API key requests are not subject to this check.
What an API key cannot do
- Create an organization or switch the active organization. Both are done by a signed-in person in the app.
- Delete the organization, or transfer its ownership.
- Create an API key.
- Use the employee portal endpoints under
/api/v1/portal: accepting a policy, completing training or signing a document must be done by the person, signed in.
Endpoints under /api/v1/public take no key at all: each checks a token of its own (a trust center access link, a signing link) or, for the signed document check, a file's fingerprint.
Sign-in itself is handled under /api/auth and is not part of the versioned API.