Delete domains from the blacklist
Remove specific domains from the blacklist. Removing a domain from the list doesn't change the status of a prospect if it was previously set to BLACKLISTED
.
Request
Endpoint
DELETE https://api.woodpecker.co/rest/v2/blacklist/domains
Headers
x-api-key: {YOUR_API_KEY}
Content-type: application/json
For details on how to authenticate your requests, please see the authentication guide.
Body
You can remove up to 500 domains per request
{
"domains": [
"baddomain.com",
"blacklistedomain.io",
"nomoreemails.co"
]
}
Field | Type | Description |
---|---|---|
domains | array[string] | List of domains to remove from blacklist |
Request sample
Remove a list of domains from blacklist
- cURL
- Python
- Java
- Node.js
curl --request DELETE \
--url "https://api.woodpecker.co/rest/v2/blacklist/domains" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"domains": [
"baddomain.com",
"blacklistedomain.io",
"nomoreemails.co"
]
}'
import requests
def deleteBlacklistedDomains():
url = "https://api.woodpecker.co/rest/v2/blacklist/domains"
headers = {
"x-api-key": "{YOUR_API_KEY}",
"Content-Type": "application/json"
}
payload = {
"domains": [
"baddomain.com",
"blacklistedomain.io",
"nomoreemails.co"
]
}
response = requests.delete(url, headers=headers, json=payload)
if response.status_code == 200:
print("DELETE successful:", response.json())
else:
print("DELETE failed with status:", response.status_code)
if __name__ == "__main__":
deleteBlacklistedDomains()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class WoodpeckerApiClient {
private static final String API_KEY = "{YOUR_API_KEY}";
public static void main(String[] args) {
deleteBlacklistedDomains();
}
public static void deleteBlacklistedDomains() {
try {
String url = "https://api.woodpecker.co/rest/v2/blacklist/domains";
String jsonData = "{"
+ "\"domains\": ["
+ "\"baddomain.com\","
+ "\"blacklistedomain.io\","
+ "\"nomoreemails.co\""
+ "]"
+ "}";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(url))
.header("x-api-key", API_KEY)
.header("Content-Type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString(jsonData))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() == 200) {
System.out.println("DELETE response: " + response.body());
} else {
System.err.println("DELETE request failed: " + response.statusCode());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
const axios = require("axios");
async function deleteBlacklistedDomains() {
const url = "https://api.woodpecker.co/rest/v2/blacklist/domains";
const headers = {
"x-api-key": "{YOUR_API_KEY}",
"Content-Type": "application/json"
};
const data = {
domains: [
"baddomain.com",
"blacklistedomain.io",
"nomoreemails.co"
]
};
try {
const response = await axios.delete(url, {
headers: headers,
data: data
});
if (response.status === 200) {
console.log("DELETE successful:", response.data);
} else {
console.error("DELETE failed with status:", response.status);
}
} catch (error) {
console.error("Request error:", error.response?.status || error.message);
}
}
deleteBlacklistedDomains();
Response
Response examples
- 200
- 400
- 401
- 404
- 500
Returns a list of successfully removed domains, including only those that were previously blacklisted; domains not found in the blacklist or with an invalid format are ignored and not included in the response. If none of the requested domains were blacklisted, the returned array will be empty.
{
"domains": [
"baddomain.com",
"blacklistedomain.io",
"nomoreemails.co"
]
}
Body schema
Field | Type | Description |
---|---|---|
domains | array[string] | List of domains removed from the blacklist |
Invalid request or malformed request syntax.
{
"title": "Bad Request",
"status": 400,
"detail": "You can proceed with up to 500 elements in one request" | "Domains parameter can not be empty" | "Value of domains is incorrect.",
"timestamp": "2025-03-05 17:57:00"
}
Body schema
Field | Type | Description |
---|---|---|
title | string | A short title describing the error |
status | integer | The HTTP status code |
detail | string | A detailed message explaining the error |
timestamp | string | The timestamp when the error occurred, YYYY-MM-DD HH:MM:SS UTC |
An issue with authorization. Please review the authorization guide
{
"title": "Unauthorized",
"status": 401,
"detail": "Invalid api key",
"timestamp": "2025-03-05 17:57:00"
}
Body schema
Field | Type | Description |
---|---|---|
title | string | A short title describing the error |
status | integer | The HTTP status code |
detail | string | A detailed message explaining the error |
timestamp | string | The timestamp when the error occurred, YYYY-MM-DD HH:MM:SS UTC |
Please review the request URL.
{
"title": "Not Found",
"status": 404,
"detail": "Requested resource does not exist",
"timestamp": "2025-03-05 17:57:00"
}
Body schema
Field | Type | Description |
---|---|---|
title | string | A short title describing the error |
status | integer | The HTTP status code |
detail | string | A detailed message explaining the error |
timestamp | string | The timestamp when the error occurred, YYYY-MM-DD HH:MM:SS UTC |
Unknown error, please try again later
{
"title": "Internal server error",
"status": 500,
"detail": "An unexpected error has occurred. Please try again later.",
"timestamp": "2025-03-05 17:57:00"
}
Body schema
Field | Type | Description |
---|---|---|
title | string | A short title describing the error |
status | integer | The HTTP status code |
detail | string | A detailed message explaining the error |
timestamp | string | The timestamp when the error occurred, YYYY-MM-DD HH:MM:SS UTC |