Errors use a different envelope. See Error codes.
data in POST /analyze
risk_score and risk_level are top-level fields of data. So is flags. There’s no nested
risk object, and flags doesn’t live inside decision.recommendation
It’s a prose string, in the language configured for your company. It summarizes the decision and,
when there are signals, may cite public codes from flags.
It isn’t a programmable contract:
- Don’t
switchon the text. - Don’t parse codes out of the sentence: they’re already in
flagsand indecision.reason. - The wording can change without notice;
decision.typedoesn’t.
decision.type.
About flags
Each entry is a signal that fired, with four fields. flags is [] if there are no
signals. Entries are deduplicated by code.
They never include the signal’s internal name or a numeric weight.
The full catalog of code values —in one place, not duplicated on other pages— is in
Flags catalog.
About decision.reason
A list of strings, not objects. A short read so you can branch without walking flags:
If you get a
BLOCK with entity_block:user_id:user-4471, the cause is in your list.