Skip to main content
PATCH
/
v1
/
settings
/
risk
Update risk configuration
curl --request PATCH \
  --url https://api.ledger.so/v1/settings/risk \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dryRun": true,
  "duplicateDetection": {
    "enabled": true,
    "windowMinutes": 2,
    "action": "alert"
  },
  "velocityLimit": {
    "enabled": true,
    "maxPerHour": 2,
    "maxPerDay": 2,
    "action": "alert"
  },
  "spendSpike": {
    "enabled": true,
    "multiplier": 2,
    "windowMinutes": 2,
    "baselineDays": 2,
    "action": "alert"
  },
  "unattestedSpend": {
    "enabled": true,
    "action": "alert"
  },
  "intentMismatch": {
    "enabled": true,
    "action": "alert"
  },
  "cooldownViolation": {
    "enabled": true,
    "action": "alert"
  },
  "merchantDrift": {
    "enabled": true,
    "action": "alert"
  }
}
'
{
  "object": "riskConfig",
  "preset": "permissive",
  "dryRun": true,
  "duplicateDetection": {
    "enabled": true,
    "windowMinutes": 123,
    "action": "alert"
  },
  "velocityLimit": {
    "enabled": true,
    "maxPerHour": 123,
    "maxPerDay": 123,
    "action": "alert"
  },
  "spendSpike": {
    "enabled": true,
    "multiplier": 123,
    "windowMinutes": 123,
    "baselineDays": 123,
    "action": "alert"
  },
  "unattestedSpend": {
    "enabled": true,
    "action": "alert"
  },
  "intentMismatch": {
    "enabled": true,
    "action": "alert"
  },
  "cooldownViolation": {
    "enabled": true,
    "action": "alert"
  },
  "merchantDrift": {
    "enabled": true,
    "action": "alert"
  }
}

Authorizations

Api-Key
string
header
required

API key for authentication. Get your key from the Dashboard.

Body

application/json
dryRun
boolean

If true, detect anomalies but don't take action

duplicateDetection
object
velocityLimit
object
spendSpike
object
unattestedSpend
object
intentMismatch
object
cooldownViolation
object
merchantDrift
object

Response

Updated risk configuration

object
enum<string>
Available options:
riskConfig
preset
enum<string>

Risk policy preset

Available options:
permissive,
moderate,
strict,
paranoid,
custom
dryRun
boolean

If true, detect anomalies but don't take action

duplicateDetection
object
velocityLimit
object
spendSpike
object
unattestedSpend
object
intentMismatch
object
cooldownViolation
object
merchantDrift
object