Suggest Edits

API Descriptions

 

DataDome provides 2 API

  • Protection API: used for the server side integration that can be done using one of our modules or using directly our API
  • Management API: Allows to manage your protection : create and update Custom Rules and manage trusted proxies.
Suggest Edits

Protection API

 
posthttp://api.datadome.co/validate-request/
curl --request POST \
  --url http://api.datadome.co/validate-request/ \
  --header 'contenttype: application/x-www-form-urlencoded' \
  --header 'user-agent: DataDome' \
  --data ''
var request = require("request");

var options = { method: 'POST',
  url: 'http://api.datadome.co/validate-request/',
  headers:
   { 'user-agent': 'DataDome',
     contenttype: 'application/x-www-form-urlencoded' },
  form: false };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://api.datadome.co/validate-request/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["contenttype"] = 'application/x-www-form-urlencoded'
request["user-agent"] = 'DataDome'

response = http.request(request)
puts response.read_body
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://api.datadome.co/validate-request/");
xhr.setRequestHeader("contenttype", "application/x-www-form-urlencoded");
xhr.setRequestHeader("user-agent", "DataDome");

xhr.send(data);
import requests

url = "http://api.datadome.co/validate-request/"

payload = ""
headers = {
    'contenttype': "application/x-www-form-urlencoded",
    'user-agent': "DataDome"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Form Data

Key
string
required

The customer key defined in the settings (license key)

RequestModuleName
string
required

Name of the connector application/module that processes requests

ModuleVersion
string
required

Version of the connector application/module that processes requests

ServerName
string
required

Machine name of the request accepting server.

APIConnectionState
string

Is the current API call using a keepalive connection (new/reuse) ?

IP
string
required

IP address of the host originating the request (IP of the final client)

Port
int32
required

IP port of the TCP/IP connection originating the request (from the final client)

TimeRequest
int64
required

This microtimestamp at the hit request

Protocol
string
required

This is a scheme part of the Request-URI (HTTP or HTTPS)

Method
string
required

GET/POST/OPTION

ServerHostname
string
required

The virtualhost

Request
string
required

The path and query part of the Request-URI

HeadersList
string
required

list all headers name sent by the client, in received order, comma separated.

Host
string
required

From request Header if present

UserAgent
string
required

From request Header if present

Referer
string
required

From request Header if present

Accept
string

From request Header if present

AcceptEncoding
string

From request Header if present

AcceptLanguage
string

From request Header if present

AcceptCharset
string

From request Header if present

Origin
string

From request Header if present

XForwaredForIP
string

From request Header if present

X-Requested-With
string

From request Header if present

Connection
string

From request Header if present

Pragma
string

From request Header if present

CacheControl
string

From request Header if present

CookiesLen
int32

The length of the cookie string

AuthorizationLen
int32

The length of the Authorisation string

PostParamLen
int32

The length of the PostParam string (first chunk only)

ClientID
string

From Cookie name "datadome" - contains unique client ID

ContentType
string

From request Header if present

From
string

From request Header if present

X-Real-IP
string

From request Header if present

Via
string

From request Header if present

TrueClientIP
string

From request Header if present

Headers

ContentType
string
required

application/x-www-form-urlencoded

User-Agent
string
required

DataDome

 

Handle API Response

API calls return HTTP code and Headers that you can use inside your module or application.

API Response Code

Module behavior must change depending of the following API response code:

API Response
Meaning
Action to take

400

The request has not been applied because it lacks valid authentication credentials

Check you have set the right API Key. Contact us if the problem remains

401/403

The current hit should be blocked according to rules

The module should stop processing the hit and output the html code return by the API in the body section.

301/302

The current hit should be redirect to a specific page

The module should redirect to to the “Location” field present in the header of the API Response.

200

The hit should be allowed

The module should let the application proceed.

Any other response code should be ignored.

The module must check if HTTP response code has the same value as X-DataDomeResponse header. If not, the module must act like 200 code.

API Response Header

The module must parse the header

  • “X-DataDome-request-headers”, which contain the name of headers that must be added to the request.
  • “X-DataDome-headers”, which contain the name of headers that must be added to the final client response.

API Server response headers example:

X-DataDome-request-headers: X-DataDome-botname X-DataDome-botfamily X-DataDome-isbot
X-DataDome-botname: Crawler fake Google
X-DataDome-botfamily: bad_bot
X-DataDome-isbot: 1
X-DataDome-headers: Set-Cookie Pragma X-DataDome Cache-Control
Set-Cookie: datadome=some-value; Domain=domain.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT;
Pragma: no-cache
X-DataDome: protected
Cache-Control: no-cache
X-DataDomeResponse: 403

Module should add to client request:

X-DataDome-botname: Crawler fake Google
X-DataDome-botfamily: bad_bot
X-DataDome-isbot: 1

Module should add to client response:

Set-Cookie: datadome=some-value; Domain=domain.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT;
Pragma: no-cache
X-DataDome: protected
Cache-Control: no-cache

API field size

API servers won't accept incoming body request larger than 24kb.
Each field must be truncated by the module according to the below rules:

Limit (in bytes)
Fields

Unlimited

Key, IP, Port, Protocol, Method, CookiesLen, AuthorizationLen, ModuleVersion, PostParamLen, APIConnectionState, RequestModuleName, TimeRequest

128

ClientID, X-Requested-With, AcceptCharset, AcceptEncoding, Connection, Pragma, Cache-Control

256

AcceptLanguage

512

HeadersList, Origin, ServerHostname, ServerName, XForwaredForIP, Accept, Host

768

UserAgent

1024

Referer

2048

Request

Suggest Edits

HealthCheck

 

Query Auth

 Authentication is required for this endpoint.
gethttp://api.datadome.co/check/
curl --request GET \
  --url http://api.datadome.co/check/ \
  --data ''
var request = require("request");

var options = { method: 'GET',
  url: 'http://api.datadome.co/check/',
  form: false };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://api.datadome.co/check/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://api.datadome.co/check/");

xhr.send(data);
import requests

url = "http://api.datadome.co/check/"

payload = ""
response = requests.request("GET", url, data=payload)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

API Response

return 200 if API Server status is live

Suggest Edits

Custom rules

 
Suggest Edits

Gets custom rules

 

Query Auth

 Authentication is required for this endpoint.
gethttps://customer-api.datadome.co/1.0/protection/custom-rules
curl --request GET \
  --url https://customer-api.datadome.co/1.0/protection/custom-rules
var request = require("request");

var options = { method: 'GET',
  url:
   'https://customer-api.datadome.co/1.0/protection/custom-rules' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/custom-rules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://customer-api.datadome.co/1.0/protection/custom-rules");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/custom-rules"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

Gets the defined custom rules

dataobject
data.custom_rulesarray
statusinteger
errorsarray
messagestring

Internal Server Error

statusinteger
messagestring
Suggest Edits

Add a new custom rule

 

Query Auth

 Authentication is required for this endpoint.
posthttps://customer-api.datadome.co/1.0/protection/custom-rules
curl --request POST \
  --url https://customer-api.datadome.co/1.0/protection/custom-rules
var request = require("request");

var options = { method: 'POST',
  url:
   'https://customer-api.datadome.co/1.0/protection/custom-rules' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/custom-rules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://customer-api.datadome.co/1.0/protection/custom-rules");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/custom-rules"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

data
object
 
data.rule_name
string
required
data.ip_start
string
data.ip_end
string
data.query
string
data.rule_response
string
required
data.endpoint_type
string

Response

Acknowledges the creation of the custom rule

statusinteger
messagestring
datastring
errorsarray

Lists the errors detected inside the request

errorsarray

Internal Server Error

statusinteger
messagestring
Suggest Edits

Update an existing custom rule

 

Query Auth

 Authentication is required for this endpoint.
puthttps://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId
curl --request PUT \
  --url https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customRuleId
integer
required

The custom rule id to update

Body Params

data
object
 
data.rule_name
string
required
data.ip_start
string
data.ip_end
string
data.query
string
data.rule_response
string
required
data.endpoint_type
string

Response

Acknowledges the update of the custom rule

statusinteger
messagestring
datastring
errorsarray

Lists the errors detected inside the request

errorsarray

Rule not found

statusinteger
messagestring

Internal Server Error

statusinteger
messagestring
Suggest Edits

Deletes a custom rule

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId
curl --request DELETE \
  --url https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/custom-rules/customRuleId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customRuleId
integer
required

The custom rule id to delete

Response

Acknowledges the deletion of the custom rule

statusinteger
messagestring
datastring
errorsarray

Rule not found

statusinteger
messagestring

Internal Server Error

statusinteger
messagestring
Suggest Edits

Trusted Proxy

 
Suggest Edits

Returns the list of trusted proxies of the current customer.

 

Query Auth

 Authentication is required for this endpoint.
gethttps://customer-api.datadome.co/1.0/protection/trustedproxies
curl --request GET \
  --url https://customer-api.datadome.co/1.0/protection/trustedproxies
var request = require("request");

var options = { method: 'GET',
  url:
   'https://customer-api.datadome.co/1.0/protection/trustedproxies' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/trustedproxies")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://customer-api.datadome.co/1.0/protection/trustedproxies");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/trustedproxies"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

Suggest Edits

Adds a new trusted proxy.

 

Query Auth

 Authentication is required for this endpoint.
posthttps://customer-api.datadome.co/1.0/protection/trustedproxies
curl --request POST \
  --url https://customer-api.datadome.co/1.0/protection/trustedproxies
var request = require("request");

var options = { method: 'POST',
  url:
   'https://customer-api.datadome.co/1.0/protection/trustedproxies' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/trustedproxies")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://customer-api.datadome.co/1.0/protection/trustedproxies");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/trustedproxies"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

Suggest Edits

Updates a trusted proxy.

 

Query Auth

 Authentication is required for this endpoint.
puthttps://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId
curl --request PUT \
  --url https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

trustedProxyId
string
required

Response

Suggest Edits

Deletes a trusted proxy.

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId
curl --request DELETE \
  --url https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/trustedproxies/trustedProxyId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

trustedProxyId
string
required

Response

 
Suggest Edits

Gets the customer's whitelisted IP

 

Query Auth

 Authentication is required for this endpoint.
gethttps://customer-api.datadome.co/1.0/protection/whitelist
curl --request GET \
  --url https://customer-api.datadome.co/1.0/protection/whitelist
var request = require("request");

var options = { method: 'GET',
  url: 'https://customer-api.datadome.co/1.0/protection/whitelist' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/whitelist")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://customer-api.datadome.co/1.0/protection/whitelist");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/whitelist"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

Suggest Edits

Adds a new whitelisted IP

 

Query Auth

 Authentication is required for this endpoint.
posthttps://customer-api.datadome.co/1.0/protection/whitelist
curl --request POST \
  --url https://customer-api.datadome.co/1.0/protection/whitelist
var request = require("request");

var options = { method: 'POST',
  url: 'https://customer-api.datadome.co/1.0/protection/whitelist' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/whitelist")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://customer-api.datadome.co/1.0/protection/whitelist");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/whitelist"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

Suggest Edits

Updates a customer's whitelisted IP

 

Query Auth

 Authentication is required for this endpoint.
puthttps://customer-api.datadome.co/1.0/protection/whitelist/ruleId
curl --request PUT \
  --url https://customer-api.datadome.co/1.0/protection/whitelist/ruleId
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://customer-api.datadome.co/1.0/protection/whitelist/ruleId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/whitelist/ruleId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://customer-api.datadome.co/1.0/protection/whitelist/ruleId");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/whitelist/ruleId"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

ruleId
string
required

Response

Suggest Edits

Deletes a customer's whitelisted IP

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://customer-api.datadome.co/1.0/protection/whitelist/ruleId
curl --request DELETE \
  --url https://customer-api.datadome.co/1.0/protection/whitelist/ruleId
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://customer-api.datadome.co/1.0/protection/whitelist/ruleId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/whitelist/ruleId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://customer-api.datadome.co/1.0/protection/whitelist/ruleId");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/whitelist/ruleId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

ruleId
string
required

Response

Suggest Edits

Deletes a customer's whitelisted IP

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://customer-api.datadome.co/1.0/protection/blacklist/ruleId
curl --request DELETE \
  --url https://customer-api.datadome.co/1.0/protection/blacklist/ruleId
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://customer-api.datadome.co/1.0/protection/blacklist/ruleId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/blacklist/ruleId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://customer-api.datadome.co/1.0/protection/blacklist/ruleId");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/blacklist/ruleId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

ruleId
string
required

Response

Suggest Edits

Updates a blacklisted customer's IP

 

Query Auth

 Authentication is required for this endpoint.
puthttps://customer-api.datadome.co/1.0/protection/blacklist/ruleId
curl --request PUT \
  --url https://customer-api.datadome.co/1.0/protection/blacklist/ruleId
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://customer-api.datadome.co/1.0/protection/blacklist/ruleId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/blacklist/ruleId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://customer-api.datadome.co/1.0/protection/blacklist/ruleId");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/blacklist/ruleId"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

ruleId
string
required

Response

Suggest Edits

Gets all blacklisted IP

 

Query Auth

 Authentication is required for this endpoint.
gethttps://customer-api.datadome.co/1.0/protection/blacklist
curl --request GET \
  --url https://customer-api.datadome.co/1.0/protection/blacklist
var request = require("request");

var options = { method: 'GET',
  url: 'https://customer-api.datadome.co/1.0/protection/blacklist' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/blacklist")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://customer-api.datadome.co/1.0/protection/blacklist");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/blacklist"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

Suggest Edits

Add a new blacklisted IP

 

Query Auth

 Authentication is required for this endpoint.
posthttps://customer-api.datadome.co/1.0/protection/blacklist
curl --request POST \
  --url https://customer-api.datadome.co/1.0/protection/blacklist
var request = require("request");

var options = { method: 'POST',
  url: 'https://customer-api.datadome.co/1.0/protection/blacklist' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://customer-api.datadome.co/1.0/protection/blacklist")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://customer-api.datadome.co/1.0/protection/blacklist");

xhr.send(data);
import requests

url = "https://customer-api.datadome.co/1.0/protection/blacklist"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response