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,
"activeHoursStart": 11,
"activeHoursEnd": 11,
"maxUsageCount": 2,
"amountTolerancePercent": 1
}
'import requests
url = "https://api.getovra.com/policies/agent/{agentId}"
payload = {
"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,
"activeHoursStart": 11,
"activeHoursEnd": 11,
"maxUsageCount": 2,
"amountTolerancePercent": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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,
activeHoursStart: 11,
activeHoursEnd: 11,
maxUsageCount: 2,
amountTolerancePercent: 1
})
};
fetch('https://api.getovra.com/policies/agent/{agentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getovra.com/policies/agent/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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,
'activeHoursStart' => 11,
'activeHoursEnd' => 11,
'maxUsageCount' => 2,
'amountTolerancePercent' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getovra.com/policies/agent/{agentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"maxTransactionEuros\": 1,\n \"dailyLimitEuros\": 1,\n \"monthlyLimitEuros\": 1,\n \"autoApproveLimitEuros\": 1,\n \"merchantAllowlist\": [\n \"<string>\"\n ],\n \"merchantBlocklist\": [\n \"<string>\"\n ],\n \"mccCategories\": [\n \"<string>\"\n ],\n \"allowedCountries\": [\n \"<string>\"\n ],\n \"lockToFirstMerchant\": true,\n \"cooldownMinutes\": 1,\n \"allowedMccs\": [\n \"<string>\"\n ],\n \"blockedMccs\": [\n \"<string>\"\n ],\n \"requireIntent\": true,\n \"requireAttestation\": true,\n \"attestationWindowMinutes\": 2,\n \"expiresAfterMinutes\": 2,\n \"activeHoursStart\": 11,\n \"activeHoursEnd\": 11,\n \"maxUsageCount\": 2,\n \"amountTolerancePercent\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.getovra.com/policies/agent/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"maxTransactionEuros\": 1,\n \"dailyLimitEuros\": 1,\n \"monthlyLimitEuros\": 1,\n \"autoApproveLimitEuros\": 1,\n \"merchantAllowlist\": [\n \"<string>\"\n ],\n \"merchantBlocklist\": [\n \"<string>\"\n ],\n \"mccCategories\": [\n \"<string>\"\n ],\n \"allowedCountries\": [\n \"<string>\"\n ],\n \"lockToFirstMerchant\": true,\n \"cooldownMinutes\": 1,\n \"allowedMccs\": [\n \"<string>\"\n ],\n \"blockedMccs\": [\n \"<string>\"\n ],\n \"requireIntent\": true,\n \"requireAttestation\": true,\n \"attestationWindowMinutes\": 2,\n \"expiresAfterMinutes\": 2,\n \"activeHoursStart\": 11,\n \"activeHoursEnd\": 11,\n \"maxUsageCount\": 2,\n \"amountTolerancePercent\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getovra.com/policies/agent/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"maxTransactionEuros\": 1,\n \"dailyLimitEuros\": 1,\n \"monthlyLimitEuros\": 1,\n \"autoApproveLimitEuros\": 1,\n \"merchantAllowlist\": [\n \"<string>\"\n ],\n \"merchantBlocklist\": [\n \"<string>\"\n ],\n \"mccCategories\": [\n \"<string>\"\n ],\n \"allowedCountries\": [\n \"<string>\"\n ],\n \"lockToFirstMerchant\": true,\n \"cooldownMinutes\": 1,\n \"allowedMccs\": [\n \"<string>\"\n ],\n \"blockedMccs\": [\n \"<string>\"\n ],\n \"requireIntent\": true,\n \"requireAttestation\": true,\n \"attestationWindowMinutes\": 2,\n \"expiresAfterMinutes\": 2,\n \"activeHoursStart\": 11,\n \"activeHoursEnd\": 11,\n \"maxUsageCount\": 2,\n \"amountTolerancePercent\": 1\n}"
response = http.request(request)
puts response.read_body{
"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"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Policies
Update agent policy (API key or dashboard only)
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,
"activeHoursStart": 11,
"activeHoursEnd": 11,
"maxUsageCount": 2,
"amountTolerancePercent": 1
}
'import requests
url = "https://api.getovra.com/policies/agent/{agentId}"
payload = {
"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,
"activeHoursStart": 11,
"activeHoursEnd": 11,
"maxUsageCount": 2,
"amountTolerancePercent": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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,
activeHoursStart: 11,
activeHoursEnd: 11,
maxUsageCount: 2,
amountTolerancePercent: 1
})
};
fetch('https://api.getovra.com/policies/agent/{agentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getovra.com/policies/agent/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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,
'activeHoursStart' => 11,
'activeHoursEnd' => 11,
'maxUsageCount' => 2,
'amountTolerancePercent' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getovra.com/policies/agent/{agentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"maxTransactionEuros\": 1,\n \"dailyLimitEuros\": 1,\n \"monthlyLimitEuros\": 1,\n \"autoApproveLimitEuros\": 1,\n \"merchantAllowlist\": [\n \"<string>\"\n ],\n \"merchantBlocklist\": [\n \"<string>\"\n ],\n \"mccCategories\": [\n \"<string>\"\n ],\n \"allowedCountries\": [\n \"<string>\"\n ],\n \"lockToFirstMerchant\": true,\n \"cooldownMinutes\": 1,\n \"allowedMccs\": [\n \"<string>\"\n ],\n \"blockedMccs\": [\n \"<string>\"\n ],\n \"requireIntent\": true,\n \"requireAttestation\": true,\n \"attestationWindowMinutes\": 2,\n \"expiresAfterMinutes\": 2,\n \"activeHoursStart\": 11,\n \"activeHoursEnd\": 11,\n \"maxUsageCount\": 2,\n \"amountTolerancePercent\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.getovra.com/policies/agent/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"maxTransactionEuros\": 1,\n \"dailyLimitEuros\": 1,\n \"monthlyLimitEuros\": 1,\n \"autoApproveLimitEuros\": 1,\n \"merchantAllowlist\": [\n \"<string>\"\n ],\n \"merchantBlocklist\": [\n \"<string>\"\n ],\n \"mccCategories\": [\n \"<string>\"\n ],\n \"allowedCountries\": [\n \"<string>\"\n ],\n \"lockToFirstMerchant\": true,\n \"cooldownMinutes\": 1,\n \"allowedMccs\": [\n \"<string>\"\n ],\n \"blockedMccs\": [\n \"<string>\"\n ],\n \"requireIntent\": true,\n \"requireAttestation\": true,\n \"attestationWindowMinutes\": 2,\n \"expiresAfterMinutes\": 2,\n \"activeHoursStart\": 11,\n \"activeHoursEnd\": 11,\n \"maxUsageCount\": 2,\n \"amountTolerancePercent\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getovra.com/policies/agent/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"maxTransactionEuros\": 1,\n \"dailyLimitEuros\": 1,\n \"monthlyLimitEuros\": 1,\n \"autoApproveLimitEuros\": 1,\n \"merchantAllowlist\": [\n \"<string>\"\n ],\n \"merchantBlocklist\": [\n \"<string>\"\n ],\n \"mccCategories\": [\n \"<string>\"\n ],\n \"allowedCountries\": [\n \"<string>\"\n ],\n \"lockToFirstMerchant\": true,\n \"cooldownMinutes\": 1,\n \"allowedMccs\": [\n \"<string>\"\n ],\n \"blockedMccs\": [\n \"<string>\"\n ],\n \"requireIntent\": true,\n \"requireAttestation\": true,\n \"attestationWindowMinutes\": 2,\n \"expiresAfterMinutes\": 2,\n \"activeHoursStart\": 11,\n \"activeHoursEnd\": 11,\n \"maxUsageCount\": 2,\n \"amountTolerancePercent\": 1\n}"
response = http.request(request)
puts response.read_body{
"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"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key (sk_sandbox_* / sk_test_* / sk_live_*) or Agent token (at_* / at_dlg_*)
Path Parameters
Body
application/json
All fields from PolicyCreateRequest, but every field is optional.
Minimum string length:
1Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 1Required range:
x >= 1Available options:
freeze, close, notify Required range:
0 <= x <= 23Required range:
0 <= x <= 23Required range:
x >= 1Required range:
x >= 0Response
Updated policy
⌘I
