curl --request PATCH \
--url https://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"priority": 2,
"match": {
"auth0_managed": [
"<string>"
],
"geo_country_codes": [
"<string>"
]
},
"action": {
"simple_captcha": {},
"auth_challenge": {
"fail_open": true
},
"recaptcha_v2": {
"site_key": "<string>",
"secret": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>",
"api_key": "<string>"
},
"hcaptcha": {
"site_key": "<string>",
"secret": "<string>"
},
"friendly_captcha": {
"site_key": "<string>",
"secret": "<string>"
},
"arkose": {
"site_key": "<string>",
"secret": "<string>",
"client_subdomain": "<string>",
"verify_subdomain": "<string>",
"fail_open": true
}
}
}
'import requests
url = "https://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"priority": 2,
"match": {
"auth0_managed": ["<string>"],
"geo_country_codes": ["<string>"]
},
"action": {
"simple_captcha": {},
"auth_challenge": { "fail_open": True },
"recaptcha_v2": {
"site_key": "<string>",
"secret": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>",
"api_key": "<string>"
},
"hcaptcha": {
"site_key": "<string>",
"secret": "<string>"
},
"friendly_captcha": {
"site_key": "<string>",
"secret": "<string>"
},
"arkose": {
"site_key": "<string>",
"secret": "<string>",
"client_subdomain": "<string>",
"verify_subdomain": "<string>",
"fail_open": True
}
}
}
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>',
description: '<string>',
priority: 2,
match: {auth0_managed: ['<string>'], geo_country_codes: ['<string>']},
action: {
simple_captcha: {},
auth_challenge: {fail_open: true},
recaptcha_v2: {site_key: '<string>', secret: '<string>'},
recaptcha_enterprise: {site_key: '<string>', project_id: '<string>', api_key: '<string>'},
hcaptcha: {site_key: '<string>', secret: '<string>'},
friendly_captcha: {site_key: '<string>', secret: '<string>'},
arkose: {
site_key: '<string>',
secret: '<string>',
client_subdomain: '<string>',
verify_subdomain: '<string>',
fail_open: true
}
}
})
};
fetch('https://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}', 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://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}",
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>',
'description' => '<string>',
'priority' => 2,
'match' => [
'auth0_managed' => [
'<string>'
],
'geo_country_codes' => [
'<string>'
]
],
'action' => [
'simple_captcha' => [
],
'auth_challenge' => [
'fail_open' => true
],
'recaptcha_v2' => [
'site_key' => '<string>',
'secret' => '<string>'
],
'recaptcha_enterprise' => [
'site_key' => '<string>',
'project_id' => '<string>',
'api_key' => '<string>'
],
'hcaptcha' => [
'site_key' => '<string>',
'secret' => '<string>'
],
'friendly_captcha' => [
'site_key' => '<string>',
'secret' => '<string>'
],
'arkose' => [
'site_key' => '<string>',
'secret' => '<string>',
'client_subdomain' => '<string>',
'verify_subdomain' => '<string>',
'fail_open' => true
]
]
]),
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://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 2,\n \"match\": {\n \"auth0_managed\": [\n \"<string>\"\n ],\n \"geo_country_codes\": [\n \"<string>\"\n ]\n },\n \"action\": {\n \"simple_captcha\": {},\n \"auth_challenge\": {\n \"fail_open\": true\n },\n \"recaptcha_v2\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"recaptcha_enterprise\": {\n \"site_key\": \"<string>\",\n \"project_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"hcaptcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"friendly_captcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"arkose\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"client_subdomain\": \"<string>\",\n \"verify_subdomain\": \"<string>\",\n \"fail_open\": true\n }\n }\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://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 2,\n \"match\": {\n \"auth0_managed\": [\n \"<string>\"\n ],\n \"geo_country_codes\": [\n \"<string>\"\n ]\n },\n \"action\": {\n \"simple_captcha\": {},\n \"auth_challenge\": {\n \"fail_open\": true\n },\n \"recaptcha_v2\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"recaptcha_enterprise\": {\n \"site_key\": \"<string>\",\n \"project_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"hcaptcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"friendly_captcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"arkose\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"client_subdomain\": \"<string>\",\n \"verify_subdomain\": \"<string>\",\n \"fail_open\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}")
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 \"description\": \"<string>\",\n \"priority\": 2,\n \"match\": {\n \"auth0_managed\": [\n \"<string>\"\n ],\n \"geo_country_codes\": [\n \"<string>\"\n ]\n },\n \"action\": {\n \"simple_captcha\": {},\n \"auth_challenge\": {\n \"fail_open\": true\n },\n \"recaptcha_v2\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"recaptcha_enterprise\": {\n \"site_key\": \"<string>\",\n \"project_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"hcaptcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"friendly_captcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"arkose\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"client_subdomain\": \"<string>\",\n \"verify_subdomain\": \"<string>\",\n \"fail_open\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"priority": 2,
"match": {
"auth0_managed": [
"<string>"
],
"geo_country_codes": [
"<string>"
]
},
"action": {
"active_provider_id": "simple_captcha",
"simple_captcha": {},
"auth_challenge": {
"fail_open": true
},
"recaptcha_v2": {
"site_key": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>"
},
"hcaptcha": {
"site_key": "<string>"
},
"friendly_captcha": {
"site_key": "<string>"
},
"arkose": {
"site_key": "<string>",
"client_subdomain": "<string>",
"verify_subdomain": "<string>",
"fail_open": true
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"message": "<string>",
"statusCode": 400,
"error": "Bad Request"
}{
"message": "<string>",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "<string>",
"statusCode": 403,
"error": "Forbidden"
}{
"message": "<string>",
"statusCode": 404,
"error": "Not Found"
}{
"message": "<string>",
"statusCode": 409,
"error": "Conflict"
}{
"message": "<string>",
"statusCode": 429,
"error": "Too Many Requests"
}Update a CAPTCHA attack protection policy
Partially update a CAPTCHA attack protection policy. Only the provided fields are modified. A provided match or action replaces the stored value in full rather than merging with it; within action, a provider secret or API key that is omitted from a provided provider block keeps its stored value.
curl --request PATCH \
--url https://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"priority": 2,
"match": {
"auth0_managed": [
"<string>"
],
"geo_country_codes": [
"<string>"
]
},
"action": {
"simple_captcha": {},
"auth_challenge": {
"fail_open": true
},
"recaptcha_v2": {
"site_key": "<string>",
"secret": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>",
"api_key": "<string>"
},
"hcaptcha": {
"site_key": "<string>",
"secret": "<string>"
},
"friendly_captcha": {
"site_key": "<string>",
"secret": "<string>"
},
"arkose": {
"site_key": "<string>",
"secret": "<string>",
"client_subdomain": "<string>",
"verify_subdomain": "<string>",
"fail_open": true
}
}
}
'import requests
url = "https://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"priority": 2,
"match": {
"auth0_managed": ["<string>"],
"geo_country_codes": ["<string>"]
},
"action": {
"simple_captcha": {},
"auth_challenge": { "fail_open": True },
"recaptcha_v2": {
"site_key": "<string>",
"secret": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>",
"api_key": "<string>"
},
"hcaptcha": {
"site_key": "<string>",
"secret": "<string>"
},
"friendly_captcha": {
"site_key": "<string>",
"secret": "<string>"
},
"arkose": {
"site_key": "<string>",
"secret": "<string>",
"client_subdomain": "<string>",
"verify_subdomain": "<string>",
"fail_open": True
}
}
}
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>',
description: '<string>',
priority: 2,
match: {auth0_managed: ['<string>'], geo_country_codes: ['<string>']},
action: {
simple_captcha: {},
auth_challenge: {fail_open: true},
recaptcha_v2: {site_key: '<string>', secret: '<string>'},
recaptcha_enterprise: {site_key: '<string>', project_id: '<string>', api_key: '<string>'},
hcaptcha: {site_key: '<string>', secret: '<string>'},
friendly_captcha: {site_key: '<string>', secret: '<string>'},
arkose: {
site_key: '<string>',
secret: '<string>',
client_subdomain: '<string>',
verify_subdomain: '<string>',
fail_open: true
}
}
})
};
fetch('https://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}', 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://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}",
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>',
'description' => '<string>',
'priority' => 2,
'match' => [
'auth0_managed' => [
'<string>'
],
'geo_country_codes' => [
'<string>'
]
],
'action' => [
'simple_captcha' => [
],
'auth_challenge' => [
'fail_open' => true
],
'recaptcha_v2' => [
'site_key' => '<string>',
'secret' => '<string>'
],
'recaptcha_enterprise' => [
'site_key' => '<string>',
'project_id' => '<string>',
'api_key' => '<string>'
],
'hcaptcha' => [
'site_key' => '<string>',
'secret' => '<string>'
],
'friendly_captcha' => [
'site_key' => '<string>',
'secret' => '<string>'
],
'arkose' => [
'site_key' => '<string>',
'secret' => '<string>',
'client_subdomain' => '<string>',
'verify_subdomain' => '<string>',
'fail_open' => true
]
]
]),
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://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 2,\n \"match\": {\n \"auth0_managed\": [\n \"<string>\"\n ],\n \"geo_country_codes\": [\n \"<string>\"\n ]\n },\n \"action\": {\n \"simple_captcha\": {},\n \"auth_challenge\": {\n \"fail_open\": true\n },\n \"recaptcha_v2\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"recaptcha_enterprise\": {\n \"site_key\": \"<string>\",\n \"project_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"hcaptcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"friendly_captcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"arkose\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"client_subdomain\": \"<string>\",\n \"verify_subdomain\": \"<string>\",\n \"fail_open\": true\n }\n }\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://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 2,\n \"match\": {\n \"auth0_managed\": [\n \"<string>\"\n ],\n \"geo_country_codes\": [\n \"<string>\"\n ]\n },\n \"action\": {\n \"simple_captcha\": {},\n \"auth_challenge\": {\n \"fail_open\": true\n },\n \"recaptcha_v2\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"recaptcha_enterprise\": {\n \"site_key\": \"<string>\",\n \"project_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"hcaptcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"friendly_captcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"arkose\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"client_subdomain\": \"<string>\",\n \"verify_subdomain\": \"<string>\",\n \"fail_open\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/attack-protection/captcha/policies/{id}")
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 \"description\": \"<string>\",\n \"priority\": 2,\n \"match\": {\n \"auth0_managed\": [\n \"<string>\"\n ],\n \"geo_country_codes\": [\n \"<string>\"\n ]\n },\n \"action\": {\n \"simple_captcha\": {},\n \"auth_challenge\": {\n \"fail_open\": true\n },\n \"recaptcha_v2\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"recaptcha_enterprise\": {\n \"site_key\": \"<string>\",\n \"project_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"hcaptcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"friendly_captcha\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"arkose\": {\n \"site_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"client_subdomain\": \"<string>\",\n \"verify_subdomain\": \"<string>\",\n \"fail_open\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"priority": 2,
"match": {
"auth0_managed": [
"<string>"
],
"geo_country_codes": [
"<string>"
]
},
"action": {
"active_provider_id": "simple_captcha",
"simple_captcha": {},
"auth_challenge": {
"fail_open": true
},
"recaptcha_v2": {
"site_key": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>"
},
"hcaptcha": {
"site_key": "<string>"
},
"friendly_captcha": {
"site_key": "<string>"
},
"arkose": {
"site_key": "<string>",
"client_subdomain": "<string>",
"verify_subdomain": "<string>",
"fail_open": true
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"message": "<string>",
"statusCode": 400,
"error": "Bad Request"
}{
"message": "<string>",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "<string>",
"statusCode": 403,
"error": "Forbidden"
}{
"message": "<string>",
"statusCode": 404,
"error": "Not Found"
}{
"message": "<string>",
"statusCode": 409,
"error": "Conflict"
}{
"message": "<string>",
"statusCode": 429,
"error": "Too Many Requests"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the CAPTCHA attack protection policy.
^pol_[1-9A-HJ-NP-Za-km-z]{22}$Body
The fields of the CAPTCHA attack protection policy to update.
Request body for updating a CAPTCHA attack protection policy. All fields are optional, but at least one must be provided. A provided match or action replaces the stored value in full rather than merging with it.
Human-readable policy name.
1 - 255Description of the policy's purpose.
Conflict resolution order. Lower number takes higher precedence. Must be unique per tenant.
x >= 1Traffic matching criteria for the policy. Exactly one of auth0_managed or geo_country_codes must be specified.
- Option 1
- Option 2
Show child attributes
Show child attributes
CAPTCHA configuration override for this policy.
Show child attributes
Show child attributes
Response
The CAPTCHA attack protection policy was successfully updated.
An attack protection policy override for CAPTCHA.
System-generated identifier for the policy.
Human-readable policy name.
1 - 255Conflict resolution order. Lower number takes higher precedence.
x >= 1Traffic matching criteria for the policy. Exactly one of auth0_managed or geo_country_codes must be specified.
- Option 1
- Option 2
Show child attributes
Show child attributes
CAPTCHA configuration override stored for this policy.
Show child attributes
Show child attributes
ISO 8601 timestamp when the policy was created.
ISO 8601 timestamp when the policy was last updated.
Description of the policy's purpose.