API reference

Errors

Status codes and the error body the API returns.

Errors come back as JSON with a single error field that says what went wrong in plain words.

Response · 400
{
  "error": "type and idempotency_key are required"
}

Two kinds of error come back as plain text instead: a body that isn't valid JSON or an ID in the path that isn't a UUID (both 400), and unexpected server failures (500). Check the Content-Type before parsing.

Status codes

CodeMeaningWhat to do
200Success
201Created: a note, a rule draft or a key
202Event accepted (async mode)Nothing. The event is stored.
400The request doesn't match the schemaFix the request. The error field says what's wrong.
401Missing, invalid or revoked keyCheck the Authorization header and that the key is active
403Four-eyes: you can't approve your own workAsk someone with a different key to approve it
404No such record in your organisationCheck the ID, and that you're using a key from the right organisation
409The record isn't in a state that allows thisFetch it again and check its status
413The request body is over 1 MiBSend smaller requests. An event is a few kilobytes
429Too many requests for this API keyWait the number of seconds in the Retry-After header, then retry. Spread steady traffic across time, or ask for a higher SENTINEL_RATE_LIMIT
503Screening has no list loadedLoad a list. See Screening.
5xxSomething failed on the serverRetry with the same idempotency key. You won't create duplicates.

Messages you might see

EndpointCodeerror
Any /v1 endpoint401missing or invalid API key
POST /v1/entities400id is required
POST /v1/entities400unknown kind
POST /v1/events400type and idempotency_key are required
POST /v1/events400amount needs a non-negative value and a 3-letter currency
GET /v1/decisions/{id}404decision not found
PATCH /v1/alerts/{id}400unknown status
PATCH /v1/alerts/{id}400status can only be open or in_review here; close alerts through /closure
PATCH /v1/alerts/{id}400assigned_to cannot be empty
PATCH /v1/alerts/{id}409alert is pending closure or closed
POST /v1/alerts/{id}/notes400body must be 1 to 5000 characters
POST /v1/alerts/{id}/closure400unknown disposition
POST /v1/alerts/{id}/closure409only open or in_review alerts can be put up for closure
POST /v1/alerts/{id}/closure/approve403the person who requested closure cannot approve it
POST /v1/alerts/{id}/closure/approve, /reject409alert is not pending closure
Any /v1/alerts/{id} route404alert not found
POST /v1/rules400key must be lowercase letters, digits and underscores, starting with a letter
POST /v1/rules400weight must be between 1 and 100
POST /v1/rules400A compile error from the expression, for example rule my_rule: expression must return bool
POST /v1/rules/{id}/activate403the author of a rule cannot approve it
POST /v1/rules/{id}/activate409only a draft can be activated
POST /v1/rules/{id}/backtest400window is capped at 31 days
POST /v1/rules/{id}/...404rule not found
POST /v1/screenings400kind must be person or business
POST /v1/screenings503no screening list is loaded, so nothing can be checked
GET /v1/screenings/{id}404screening not found
POST /v1/keys400name must be 1 to 64 characters
DELETE /v1/keys/{id}409you can't revoke the key you are signed in with
DELETE /v1/keys/{id}409this is the last active key; create another before revoking it
DELETE /v1/keys/{id}409this key is already revoked
DELETE /v1/keys/{id}404key not found

Each endpoint's page lists its full set. Treat the message as something to log and show to developers, not something to parse. Branch on the status code.

Sentinel is a Somu Labs product. © 2026 Somu Labs Ltd.