curl --request PUT \
--url https://api.firecrawl.dev/v2/team/threat-protection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "normal",
"riskScoreThreshold": 75,
"blacklist": [
"*.risky.example"
],
"whitelist": [
"*.trusted.example"
],
"blockedTlds": [
"zip"
],
"failurePolicy": "closed",
"allowRequestOverrides": true
}
'import requests
url = "https://api.firecrawl.dev/v2/team/threat-protection"
payload = {
"mode": "normal",
"riskScoreThreshold": 75,
"blacklist": ["*.risky.example"],
"whitelist": ["*.trusted.example"],
"blockedTlds": ["zip"],
"failurePolicy": "closed",
"allowRequestOverrides": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: 'normal',
riskScoreThreshold: 75,
blacklist: ['*.risky.example'],
whitelist: ['*.trusted.example'],
blockedTlds: ['zip'],
failurePolicy: 'closed',
allowRequestOverrides: true
})
};
fetch('https://api.firecrawl.dev/v2/team/threat-protection', 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.firecrawl.dev/v2/team/threat-protection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'normal',
'riskScoreThreshold' => 75,
'blacklist' => [
'*.risky.example'
],
'whitelist' => [
'*.trusted.example'
],
'blockedTlds' => [
'zip'
],
'failurePolicy' => 'closed',
'allowRequestOverrides' => 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://api.firecrawl.dev/v2/team/threat-protection"
payload := strings.NewReader("{\n \"mode\": \"normal\",\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"*.risky.example\"\n ],\n \"whitelist\": [\n \"*.trusted.example\"\n ],\n \"blockedTlds\": [\n \"zip\"\n ],\n \"failurePolicy\": \"closed\",\n \"allowRequestOverrides\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.firecrawl.dev/v2/team/threat-protection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"normal\",\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"*.risky.example\"\n ],\n \"whitelist\": [\n \"*.trusted.example\"\n ],\n \"blockedTlds\": [\n \"zip\"\n ],\n \"failurePolicy\": \"closed\",\n \"allowRequestOverrides\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/team/threat-protection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"normal\",\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"*.risky.example\"\n ],\n \"whitelist\": [\n \"*.trusted.example\"\n ],\n \"blockedTlds\": [\n \"zip\"\n ],\n \"failurePolicy\": \"closed\",\n \"allowRequestOverrides\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"mode": "normal",
"riskScoreThreshold": 75,
"blacklist": [
"*.risky.example"
],
"whitelist": [
"*.trusted.example"
],
"blockedTlds": [
"zip"
],
"failurePolicy": "closed",
"allowRequestOverrides": true,
"configured": true,
"updatedAt": "2023-11-07T05:31:56Z"
}
}Update Threat Protection Policy
Full-document update. Unspecified fields reset to defaults. Enterprise feature, team admins only.
curl --request PUT \
--url https://api.firecrawl.dev/v2/team/threat-protection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "normal",
"riskScoreThreshold": 75,
"blacklist": [
"*.risky.example"
],
"whitelist": [
"*.trusted.example"
],
"blockedTlds": [
"zip"
],
"failurePolicy": "closed",
"allowRequestOverrides": true
}
'import requests
url = "https://api.firecrawl.dev/v2/team/threat-protection"
payload = {
"mode": "normal",
"riskScoreThreshold": 75,
"blacklist": ["*.risky.example"],
"whitelist": ["*.trusted.example"],
"blockedTlds": ["zip"],
"failurePolicy": "closed",
"allowRequestOverrides": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: 'normal',
riskScoreThreshold: 75,
blacklist: ['*.risky.example'],
whitelist: ['*.trusted.example'],
blockedTlds: ['zip'],
failurePolicy: 'closed',
allowRequestOverrides: true
})
};
fetch('https://api.firecrawl.dev/v2/team/threat-protection', 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.firecrawl.dev/v2/team/threat-protection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'normal',
'riskScoreThreshold' => 75,
'blacklist' => [
'*.risky.example'
],
'whitelist' => [
'*.trusted.example'
],
'blockedTlds' => [
'zip'
],
'failurePolicy' => 'closed',
'allowRequestOverrides' => 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://api.firecrawl.dev/v2/team/threat-protection"
payload := strings.NewReader("{\n \"mode\": \"normal\",\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"*.risky.example\"\n ],\n \"whitelist\": [\n \"*.trusted.example\"\n ],\n \"blockedTlds\": [\n \"zip\"\n ],\n \"failurePolicy\": \"closed\",\n \"allowRequestOverrides\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.firecrawl.dev/v2/team/threat-protection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"normal\",\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"*.risky.example\"\n ],\n \"whitelist\": [\n \"*.trusted.example\"\n ],\n \"blockedTlds\": [\n \"zip\"\n ],\n \"failurePolicy\": \"closed\",\n \"allowRequestOverrides\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/team/threat-protection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"normal\",\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"*.risky.example\"\n ],\n \"whitelist\": [\n \"*.trusted.example\"\n ],\n \"blockedTlds\": [\n \"zip\"\n ],\n \"failurePolicy\": \"closed\",\n \"allowRequestOverrides\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"mode": "normal",
"riskScoreThreshold": 75,
"blacklist": [
"*.risky.example"
],
"whitelist": [
"*.trusted.example"
],
"blockedTlds": [
"zip"
],
"failurePolicy": "closed",
"allowRequestOverrides": true,
"configured": true,
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Threat protection mode. off disables checks; normal checks URLs against Google Web Risk (+2 credits per URL scanned).
off, normal "normal"
Normalized score (0-100) at or above which a classifier verdict is blocked. Lower is stricter.
0 <= x <= 10075
Exact domains or globs (e.g. *.example.com) always blocked, without a classifier call.
["*.risky.example"]
Exact domains or globs always allowed. Wins over every other rule.
["*.trusted.example"]
Top-level domains to block outright, lowercase without a leading dot.
["zip"]
Behavior when the classifier is unreachable: closed blocks (default), open allows.
open, closed "closed"
Whether individual requests may pass a threatProtection object. When false, such requests are rejected with 403.
true

