Settings
Thresholds, reasons you don't want, and captcha verification for an environment.
Each environment has its own risk settings, in the dashboard (Risk → Settings) or through the API.
await ...({
: 0.4,
: 0.9,
: ["email.role_account"],
});Thresholds
A score at or above review_threshold is review, at or above block_threshold is block
(defaults 0.5 and 0.85). Lists and rules decide
before the thresholds. review_threshold can't be above block_threshold; setting them equal skips
review.
Disabled reasons
Reasons you list in disabled_reasons never fire: they don't appear in assessments or count in the
score. Rules still see the facts behind them. Decision reasons (list.*,
rule.matched) can't be disabled, and content.* reasons are controlled by their thresholds.
Reason weights
Every reason weighs what the reason catalog says, unless you give it another
weight (0 to 0.99) in reason_weights; null goes back to the default. Weights are what
calibration suggests from your feedback, and the dashboard's
Calibration page applies them in one click.
await ...({
: { "ip.hosting_provider": 0.1, "checkout.prepaid_card": null },
});Content thresholds
Content scores fire content.<category> only at the thresholds you set; a
category without one never fires (rules can still test its score). null removes a threshold.
await ...({
: { : 0.8, : 0.8, : null },
});Captcha
Pass the token of your captcha widget with assessments and coss.com verifies it with the provider:
captcha.failed when the provider refuses it. Set the provider and your secret key first; the
secret is stored encrypted and never returned.
await ...({
: { : "turnstile", : "0x4AAAAAAA…", : true },
});
const { } = await ..({
: "signup",
: { : "ada@acme.com" },
: { : },
});- Providers: Cloudflare Turnstile (
turnstile) and hCaptcha (hcaptcha). coss.com sends them the token, your secret and the client's IP address. - With
required: true, assessments without a token getcaptcha.missing. - Tokens are single-use: verify each one once. A retried assessment (same
Idempotency-Key) returns the first result without verifying again. - If the provider can't be reached, the assessment goes on without the captcha and lists
captchaindegraded. captcha: nullturns verification off and deletes the secret.
Last updated