Skip to main content
PATCH
/
v1
/
policies
/
{policyId}
Update policy
curl --request PATCH \
  --url https://api.ledger.so/v1/policies/{policyId} \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "ttlMinutes": 123,
  "onExpiry": "freeze",
  "activeHoursStart": 123,
  "activeHoursEnd": 123,
  "activeTimezone": "<string>",
  "activeDays": [
    123
  ],
  "maxAmount": 123,
  "cumulativeMax": 123,
  "maxAuthCount": 123,
  "cooldownMinutes": 123,
  "limitPerAuth": 123,
  "limitPerDay": 123,
  "limitPerMonth": 123,
  "allowedMccs": [
    "<string>"
  ],
  "blockedMccs": [
    "<string>"
  ],
  "merchantHint": "<string>",
  "onDrift": "freeze",
  "requireAttestation": true,
  "intentTolerance": 123,
  "credentialExposure": "never"
}
'
{
  "object": "policy",
  "id": "<string>",
  "name": "<string>",
  "createdAt": 123,
  "updatedAt": 123,
  "description": "<string>",
  "timeRestrictions": {
    "ttlMinutes": 123,
    "onExpiry": "freeze",
    "activeHoursStart": 11,
    "activeHoursEnd": 11,
    "activeTimezone": "<string>",
    "activeDays": [
      3
    ]
  },
  "spendingRestrictions": {
    "maxAmount": 123,
    "cumulativeMax": 123,
    "maxAuthCount": 123,
    "cooldownMinutes": 123,
    "limitPerAuth": 123,
    "limitPerDay": 123,
    "limitPerMonth": 123
  },
  "merchantRestrictions": {
    "allowedMccs": [
      "<string>"
    ],
    "blockedMccs": [
      "<string>"
    ],
    "merchantHint": "<string>",
    "onDrift": "freeze"
  },
  "attestation": {
    "requireAttestation": true,
    "intentTolerance": 0.5,
    "credentialExposure": "never"
  }
}

Authorizations

Api-Key
string
header
required

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

Path Parameters

policyId
string
required

The policy ID

Body

application/json
name
string
description
string | null
ttlMinutes
integer | null
onExpiry
enum<string> | null
Available options:
freeze,
close
activeHoursStart
integer | null
activeHoursEnd
integer | null
activeTimezone
string | null
activeDays
integer[] | null
maxAmount
integer | null
cumulativeMax
integer | null
maxAuthCount
integer | null
cooldownMinutes
integer | null
limitPerAuth
integer | null
limitPerDay
integer | null
limitPerMonth
integer | null
allowedMccs
string[] | null
blockedMccs
string[] | null
merchantHint
string | null
onDrift
enum<string> | null
Available options:
freeze,
alert
requireAttestation
boolean | null
intentTolerance
number | null
credentialExposure
enum<string> | null
Available options:
never,
extensionOnly,
rawPan

Response

Policy updated

object
enum<string>
required
Available options:
policy
id
string
required
name
string
required

Unique name for this policy within the organization

createdAt
integer
required
updatedAt
integer
required
description
string
timeRestrictions
object
spendingRestrictions
object
merchantRestrictions
object
attestation
object