curl --request DELETE \
--url https://api.attio.com/v2/workspace_blocklist_addresses/{address} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attio.com/v2/workspace_blocklist_addresses/{address}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.attio.com/v2/workspace_blocklist_addresses/{address}', 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.attio.com/v2/workspace_blocklist_addresses/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.attio.com/v2/workspace_blocklist_addresses/{address}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.attio.com/v2/workspace_blocklist_addresses/{address}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/workspace_blocklist_addresses/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"status_code": 400,
"type": "invalid_request_error",
"code": "validation_type",
"message": "Path params validation error."
}{
"status_code": 403,
"type": "auth_error",
"code": "unauthorized",
"message": "A user-level access token can only manage the workspace blocklist if the member it acts for is a workspace admin."
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "Address not found on the workspace blocklist"
}Delete a workspace blocklist address
An address is an email address (jane@acme.com) or a domain (acme.com).
Removes an address from the workspace blocklist, whatever its enforcement level. The address itself is its key: there is no separate ID.
The address is normalized as when it is added: email addresses and domains are trimmed and lowercased, a URL is reduced to its hostname, and a leading www. is removed. So the address is found whatever form it was added in. A URL, or any other value with reserved characters, must be percent-encoded in the path.
An address that isn’t on the workspace blocklist returns a 404. A client retrying a request can treat a 404 as done.
Removing a protected address takes effect immediately. Removing a blocked address takes effect once each connected mailbox has re-synced, which may take a few minutes.
A user-level access token can only call this endpoint if the workspace member it acts for is a workspace admin.
This endpoint is in alpha and may be subject to breaking changes as we gather feedback.
Required scopes: email_calendar_blocklist:read-write.
Supported token levels: workspace, user.
curl --request DELETE \
--url https://api.attio.com/v2/workspace_blocklist_addresses/{address} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attio.com/v2/workspace_blocklist_addresses/{address}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.attio.com/v2/workspace_blocklist_addresses/{address}', 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.attio.com/v2/workspace_blocklist_addresses/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.attio.com/v2/workspace_blocklist_addresses/{address}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.attio.com/v2/workspace_blocklist_addresses/{address}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/workspace_blocklist_addresses/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"status_code": 400,
"type": "invalid_request_error",
"code": "validation_type",
"message": "Path params validation error."
}{
"status_code": 403,
"type": "auth_error",
"code": "unauthorized",
"message": "A user-level access token can only manage the workspace blocklist if the member it acts for is a workspace admin."
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "Address not found on the workspace blocklist"
}Authorizations
This API uses OAuth 2.0 with the authorization code grant flow.
Scopes
View, and optionally manage, the addresses (email addresses and domains) whose emails and calendar events are hidden in Attio.
Path Parameters
An email address or a domain. Attio works out which one it is. Email addresses are trimmed and lowercased, and their host must be a valid domain. Domains are trimmed and lowercased, a URL is reduced to its hostname, and a leading www. is removed; subdomains are kept. Single labels (acme), bare public suffixes (com), unknown suffixes, IP addresses, wildcards and values over 253 characters are rejected.
"jane@acme.com"
Response
Success
Success
Was this page helpful?