cURL
curl --request POST \
--url https://www.getinboxzero.com/api/v1/senders/unsubscribe \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"senderEmail": "jsmith@example.com",
"unsubscribeLink": "<string>",
"listUnsubscribeHeader": "<string>"
}
'import requests
url = "https://www.getinboxzero.com/api/v1/senders/unsubscribe"
payload = {
"senderEmail": "jsmith@example.com",
"unsubscribeLink": "<string>",
"listUnsubscribeHeader": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senderEmail: 'jsmith@example.com',
unsubscribeLink: '<string>',
listUnsubscribeHeader: '<string>'
})
};
fetch('https://www.getinboxzero.com/api/v1/senders/unsubscribe', 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://www.getinboxzero.com/api/v1/senders/unsubscribe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'senderEmail' => 'jsmith@example.com',
'unsubscribeLink' => '<string>',
'listUnsubscribeHeader' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://www.getinboxzero.com/api/v1/senders/unsubscribe"
payload := strings.NewReader("{\n \"senderEmail\": \"jsmith@example.com\",\n \"unsubscribeLink\": \"<string>\",\n \"listUnsubscribeHeader\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.post("https://www.getinboxzero.com/api/v1/senders/unsubscribe")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"senderEmail\": \"jsmith@example.com\",\n \"unsubscribeLink\": \"<string>\",\n \"listUnsubscribeHeader\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getinboxzero.com/api/v1/senders/unsubscribe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senderEmail\": \"jsmith@example.com\",\n \"unsubscribeLink\": \"<string>\",\n \"listUnsubscribeHeader\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"senderEmail": "jsmith@example.com",
"status": "UNSUBSCRIBED",
"unsubscribe": {
"attempted": true,
"success": true,
"method": "post",
"statusCode": 123,
"reason": "no_unsubscribe_url"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}API
Unsubscribe sender
Unsubscribe from a sender for the scoped inbox. Looks up List-Unsubscribe from that sender’s mail when a link is not provided. Check unsubscribe.success: when it is false the sender was left unchanged.
POST
/
senders
/
unsubscribe
cURL
curl --request POST \
--url https://www.getinboxzero.com/api/v1/senders/unsubscribe \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"senderEmail": "jsmith@example.com",
"unsubscribeLink": "<string>",
"listUnsubscribeHeader": "<string>"
}
'import requests
url = "https://www.getinboxzero.com/api/v1/senders/unsubscribe"
payload = {
"senderEmail": "jsmith@example.com",
"unsubscribeLink": "<string>",
"listUnsubscribeHeader": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senderEmail: 'jsmith@example.com',
unsubscribeLink: '<string>',
listUnsubscribeHeader: '<string>'
})
};
fetch('https://www.getinboxzero.com/api/v1/senders/unsubscribe', 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://www.getinboxzero.com/api/v1/senders/unsubscribe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'senderEmail' => 'jsmith@example.com',
'unsubscribeLink' => '<string>',
'listUnsubscribeHeader' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://www.getinboxzero.com/api/v1/senders/unsubscribe"
payload := strings.NewReader("{\n \"senderEmail\": \"jsmith@example.com\",\n \"unsubscribeLink\": \"<string>\",\n \"listUnsubscribeHeader\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.post("https://www.getinboxzero.com/api/v1/senders/unsubscribe")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"senderEmail\": \"jsmith@example.com\",\n \"unsubscribeLink\": \"<string>\",\n \"listUnsubscribeHeader\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getinboxzero.com/api/v1/senders/unsubscribe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senderEmail\": \"jsmith@example.com\",\n \"unsubscribeLink\": \"<string>\",\n \"listUnsubscribeHeader\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"senderEmail": "jsmith@example.com",
"status": "UNSUBSCRIBED",
"unsubscribe": {
"attempted": true,
"success": true,
"method": "post",
"statusCode": 123,
"reason": "no_unsubscribe_url"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"hint": "<string>"
}
}Authorizations
Account-scoped API key created in Settings. Operations declare the scopes they require. Available scopes:
- RULES_READ: List and inspect automation rules for this inbox.
- RULES_WRITE: Create, update, and delete automation rules for this inbox.
- STATS_READ: Read aggregated inbox statistics for this inbox.
- SENDERS_UNSUBSCRIBE: Unsubscribe from senders for this inbox.
Body
application/json