Skip to main content
PUT
/
accounts
/
{id}
/
blocklist
Update domains blocklist for account
curl --request PUT \
  --url https://api-network.joinmassive.com/resellers/accounts/{id}/blocklist \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "domains_blocklist": [
    "example.com",
    "test.org",
    "badsite.net"
  ]
}
'
import requests

url = "https://api-network.joinmassive.com/resellers/accounts/{id}/blocklist"

payload = { "domains_blocklist": ["example.com", "test.org", "badsite.net"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({domains_blocklist: ['example.com', 'test.org', 'badsite.net']})
};

fetch('https://api-network.joinmassive.com/resellers/accounts/{id}/blocklist', 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-network.joinmassive.com/resellers/accounts/{id}/blocklist",
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([
'domains_blocklist' => [
'example.com',
'test.org',
'badsite.net'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$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-network.joinmassive.com/resellers/accounts/{id}/blocklist"

payload := strings.NewReader("{\n \"domains_blocklist\": [\n \"example.com\",\n \"test.org\",\n \"badsite.net\"\n ]\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("x-api-key", "<api-key>")
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-network.joinmassive.com/resellers/accounts/{id}/blocklist")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"domains_blocklist\": [\n \"example.com\",\n \"test.org\",\n \"badsite.net\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-network.joinmassive.com/resellers/accounts/{id}/blocklist")

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

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domains_blocklist\": [\n \"example.com\",\n \"test.org\",\n \"badsite.net\"\n ]\n}"

response = http.request(request)
puts response.read_body
{}
{
"error": "Invalid request: <details>"
}
{
"error": "Unauthorized"
}
{
"error": "Forbidden"
}
{
"error": "Account not found"
}
{
"error": "Internal server error"
}
For more details on how domain blocking works, including wildcard patterns and the common blocklist, see Domain Blocking.

Authorizations

x-api-key
string
header
required

Path Parameters

id
string
required

The account ID

Body

application/json
domains_blocklist
string[]
required

Array of domain names to block. Maximum 253 characters per domain. Domains will be automatically deduplicated and sanitized.

Maximum array length: 100
Example:
["example.com", "test.org", "badsite.net"]

Response

Domains blocklist updated successfully

The response is of type object.