Skip to main content
PATCH
/
policies
/
agent
/
{agentId}
Update agent policy (API key or dashboard only)
curl --request PATCH \
  --url https://api.getovra.com/policies/agent/{agentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "maxTransactionEuros": 1,
  "dailyLimitEuros": 1,
  "monthlyLimitEuros": 1,
  "autoApproveLimitEuros": 1,
  "merchantAllowlist": [
    "<string>"
  ],
  "merchantBlocklist": [
    "<string>"
  ],
  "mccCategories": [
    "<string>"
  ],
  "allowedCountries": [
    "<string>"
  ],
  "lockToFirstMerchant": true,
  "cooldownMinutes": 1,
  "allowedMccs": [
    "<string>"
  ],
  "blockedMccs": [
    "<string>"
  ],
  "requireIntent": true,
  "requireAttestation": true,
  "attestationWindowMinutes": 2,
  "expiresAfterMinutes": 2,
  "expirationAction": "freeze",
  "activeHoursStart": 11,
  "activeHoursEnd": 11,
  "maxUsageCount": 2,
  "amountTolerancePercent": 1
}
'
{
  "id": "<string>",
  "agentId": "<string>",
  "ownerId": "<string>",
  "name": "<string>",
  "maxTransactionEuros": 123,
  "dailyLimitEuros": 123,
  "monthlyLimitEuros": 123,
  "autoApproveLimitEuros": 123,
  "merchantAllowlist": [
    "<string>"
  ],
  "merchantBlocklist": [
    "<string>"
  ],
  "mccCategories": [
    "<string>"
  ],
  "allowedCountries": [
    "<string>"
  ],
  "lockToFirstMerchant": true,
  "cooldownMinutes": 123,
  "requireIntent": true,
  "requireAttestation": true,
  "expiresAfterMinutes": 123,
  "expirationAction": "<string>",
  "activeHoursStart": 123,
  "activeHoursEnd": 123,
  "maxUsageCount": 123,
  "amountTolerancePercent": 123,
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key (sk_...) or Agent token (at_...)

Path Parameters

agentId
string
required

Body

application/json

All fields from PolicyCreateRequest, but every field is optional.

name
string
required
Minimum string length: 1
maxTransactionEuros
number | null
Required range: x >= 0
dailyLimitEuros
number | null
Required range: x >= 0
monthlyLimitEuros
number | null
Required range: x >= 0
autoApproveLimitEuros
number | null
Required range: x >= 0
merchantAllowlist
string[]
merchantBlocklist
string[]
mccCategories
string[]
allowedCountries
string[]
lockToFirstMerchant
boolean
cooldownMinutes
integer | null
Required range: x >= 0
allowedMccs
string[]
blockedMccs
string[]
requireIntent
boolean
requireAttestation
boolean
attestationWindowMinutes
integer | null
Required range: x >= 1
expiresAfterMinutes
integer | null
Required range: x >= 1
expirationAction
enum<string>
Available options:
freeze,
close,
notify
activeHoursStart
integer | null
Required range: 0 <= x <= 23
activeHoursEnd
integer | null
Required range: 0 <= x <= 23
maxUsageCount
integer | null
Required range: x >= 1
amountTolerancePercent
number | null
Required range: x >= 0

Response

Updated policy

id
string
agentId
string
ownerId
string
name
string
maxTransactionEuros
number | null
dailyLimitEuros
number | null
monthlyLimitEuros
number | null
autoApproveLimitEuros
number | null
merchantAllowlist
string[]
merchantBlocklist
string[]
mccCategories
string[]
allowedCountries
string[]
lockToFirstMerchant
boolean
cooldownMinutes
integer | null
requireIntent
boolean
requireAttestation
boolean
expiresAfterMinutes
integer | null
expirationAction
string
activeHoursStart
integer | null
activeHoursEnd
integer | null
maxUsageCount
integer | null
amountTolerancePercent
number | null
updatedAt
string<date-time>