policy_version. NoResponse keeps each version as an immutable snapshot. These routes help you change the risk policy without surprises:
environment is live or test. A key reaches only its own workspace and environment.
Who can call them
A key without these scopes answers 403
workspace_forbidden. A member of the workspace needs a role that grants the action. Otherwise the answer is 403 role_forbidden.
A safe change, step by step
1
Read the settings in force
GET /v1/workspaces/{workspace_id}/settings/{environment} answers the settings and their policy_version. Keep that number.2
Preview the new thresholds
Send the thresholds you want to the preview route. Check which decisions would change.
3
Publish with the version you read
Send the change with
expected_policy_version and a change_reason.4
Check the history
Read the history to check the new version. If outcomes regress, restore the previous version.
Preview new thresholds
The preview applies proposed thresholds to the first answers that NoResponse still retains, at their exact recorded scores. It uses the same threshold and hold rules as production. It changes no account, outcome or evidence, and it does not publish anything.POST /v1/workspaces/{workspace_id}/settings/live/preview
The
policy_version that you read. When the settings changed since then, the preview answers 409 policy_version_conflict.For each flow, the
step_up, review and block to try, or inherits_account_creation: true for login or purchase. Send "block": null to try with blocking off.200 preview
How many eligible answers the proposed thresholds decide differently, and how many they decide the same.
Each change of decision,
from and to one of allow, step_up, review, block or held, with its count. At most 25 entries.What the preview could see.
scanned counts the answers that NoResponse read, and eligible the answers that it compared. missing_score had no recorded score. unsupported are older answers without the snapshot that the comparison needs. truncated is true when limit stopped the scan before the end of the window. complete_retained_window is true when the preview compared every retained answer in the window, with no truncation, no unsupported answer and no missing score.historical_population_known is always false. Deleted, expired and uncaptured answers cannot be reconstructed. The counts describe the answers that NoResponse still retains. They are not an estimate of the fraud that a change would prevent.
Publish a change
Addexpected_policy_version and change_reason to a PATCH of the settings:
PATCH /v1/workspaces/{workspace_id}/settings/live
Optional. The
policy_version that you read. When it is no longer current, the change answers 409 policy_version_conflict and changes nothing. Read the settings again and review the newer version before you retry.Why you made the change, up to 500 characters without control characters. NoResponse keeps it with the version in the history.
policy_version, including a change of retention_days alone.
Read the history
GET /v1/workspaces/{workspace_id}/settings/{environment}/history lists the versions of the settings, newest first.
200 history
When you published the version from a policy evaluation: the
evaluation_id, the evaluator version, and the hashes of its manifest, input, cohort and result. It stays in the history after the evaluation expires.Restore an earlier version
A restore publishes the settings of an earlier version as a new version. It never rewrites the history. Send all three fields:POST /v1/workspaces/{workspace_id}/settings/live/restore
retention_days, flows and refused_sources to the values of that version. It answers the settings in force, with a new policy_version. The history shows the new version with restored_from: 7.
- A stale
expected_policy_versionanswers 409policy_version_conflict. - A
versionthat the history does not hold answers 404not_found.
Policy evaluations
A policy evaluation compares candidate thresholds for account creation against a snapshot of retained evidence and your labeled outcomes. It returns a report that you review. Only a completedproposal_requires_review result can be published, and only after you send its exact candidate and hashes.
Start an evaluation
Send anIdempotency-Key header with every request. A retry with the same key and body answers the same job. The same key with a different body answers 409 idempotency_key_reused.
POST /v1/workspaces/{workspace_id}/evaluations/live
The
policy_version in force. The evaluation compares the candidates with the account_creation thresholds of this version. When the settings changed since you read them, the answer is 409 policy_version_conflict.The window of the account cohort, at most 31 days and in the past. The cohort is the accounts whose first
account_creation assessment in the window NoResponse served and still retains.The cost of each decision,
allow, step_up, review and block, for a legitimate account and for an abuse account. These are your business assumptions, not measurements.The budgets that a candidate must stay within:
review_rate, server_error_rate and unavailable_result_rate from 0 to 1, and p95_ms latency.A seed, 16 to 128 characters, that fixes which accounts the evaluation holds out. Choose it before you look at results.
Retry-After header. Wait that many seconds between each get of the job. Its status moves from queued and running to completed, failed or cancelled.
Limits
- An environment retains at most five jobs. A sixth answers 409
evaluation_limit_reached. A cancelled job counts until it expires. - A job covers at most 1,000 accounts, 50,000 request attempts and 64 MiB of evidence. A larger cohort answers 413
evaluation_evidence_limit. Choose a smaller window. - A job expires 24 hours after you create it, or earlier when retained evidence in it expires first. An expired job answers 404
not_found. - When you delete source data of the cohort or shorten retention, NoResponse cancels the job. Its
error_codenames the reason.
Read the report and publish
Whenstatus is completed, the result route answers the job and its report. The report has a status of no_change or proposal_requires_review, the chosen candidate, and the hashes of its input and cohort. Before completion, the result route answers 409 evaluation_conflict.
To publish a proposal_requires_review result, send its exact candidate and hashes, with the baseline version and a reason:
POST /v1/workspaces/{workspace_id}/evaluations/live/pev_01JB0000000000000000000000/publish
account_creation thresholds, answers the new settings and records the evaluation in the history. These answer 409:
Cancelling an evaluation does not undo a version that you already published from it. To go back, restore the earlier version.