Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Your API key, sent as Authorization: Bearer <key>. A key is nrk_live_ or nrk_test_, a 26-character key id, _ and a 43-character secret. A key sees only its own environment's data.

Each key has one or more scopes: assess creates and reads assessments, records outcomes and reports key usage; history reads assessments, an account's current risk and an account's history, and erases an account; detailed adds the detailed view; webhooks registers, tests, rotates and deletes webhook endpoints; integrations registers and manages hosted provider integrations. A missing, unknown, revoked or expired key answers 401. A valid key without the scope an operation needs answers 403.

Body

application/json

POST /v1/assessments/query body. account_id travels in the body rather than the URL path so a provider value that turns out to hold personal data is not written to access logs, proxies or browser history. Read-only: no Idempotency-Key. An account with no unexpired assessments answers 200 with empty items.

account_id
string
required

The provider's own opaque identifier for the account being checked, scoped to the calling workspace. It must be provider-opaque and must not contain a direct identifier (email, phone, name, national id): that is a provider obligation the schema can only partly check. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9][A-Za-z0-9._:|-]{0,127}$
limit
integer
default:20
Required range: 1 <= x <= 50
cursor
string

next_cursor from the previous page, unchanged. Opaque, MAC'd and bound to the workspace and account_id.

Required string length: 1 - 256
Pattern: ^[A-Za-z0-9_-]+$
response_mode
enum<string>
default:standard

standard returns the consolidated risk response; detailed adds merged provider-neutral facts when the key has detailed scope. raw is never available to a workspace.

Available options:
standard,
detailed

Response

One page of the account's unexpired assessments.

Body of the 200 answer to POST /v1/assessments/query: one page of the calling workspace's unexpired assessments for one account, newest first, each at its latest assessment_version, as its detail (the assessment detail schema); the account's current risk is GET /v1/accounts/{account_id}. Every item's account_id equals the page's. An assessment past its expires_at is not listed. next_cursor is present only when another page exists.

schema_version
any
required

Version of the body shape.

account_id
string
required

The provider's own opaque identifier for the account being checked, scoped to the calling workspace. It must be provider-opaque and must not contain a direct identifier (email, phone, name, national id): that is a provider obligation the schema can only partly check. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9][A-Za-z0-9._:|-]{0,127}$
items
Assessment detail · object[]
required
Maximum array length: 50
retention_days
integer
default:365
required

The workspace's current retention period, so a consumer knows how far back history reaches. Every item expires no later than its created_at plus this many days.

Required range: 1 <= x <= 365
next_cursor
string

Opaque cursor for the next page: server-generated, integrity-protected with a server-held MAC key, and bound to the workspace principal and the account_id it was issued for. Pass it back unchanged in the next query; a cursor that fails the MAC, belongs to another workspace or account, or has expired answers 400 invalid_cursor. Consumers must not parse it.

Required string length: 1 - 256
Pattern: ^[A-Za-z0-9_-]+$