Bulk delete audience lists
curl --request DELETE \
--url https://app.lettr.com/api/audience/lists/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"list_ids": [
"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0",
"0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1"
]
}
'import requests
url = "https://app.lettr.com/api/audience/lists/bulk"
payload = { "list_ids": ["0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0", "0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
list_ids: ['0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0', '0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1']
})
};
fetch('https://app.lettr.com/api/audience/lists/bulk', 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://app.lettr.com/api/audience/lists/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'list_ids' => [
'0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0',
'0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.lettr.com/api/audience/lists/bulk"
payload := strings.NewReader("{\n \"list_ids\": [\n \"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0\",\n \"0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.delete("https://app.lettr.com/api/audience/lists/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"list_ids\": [\n \"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0\",\n \"0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/audience/lists/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"list_ids\": [\n \"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0\",\n \"0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Lists deleted successfully.",
"data": {
"deleted": 2
}
}
Audience Lists
Bulk delete audience lists
Delete up to 50 lists in a single request. All list_ids must belong to the authenticated team. Requires the audience:write scope and is blocked for sandbox API keys.
DELETE
/
audience
/
lists
/
bulk
Bulk delete audience lists
curl --request DELETE \
--url https://app.lettr.com/api/audience/lists/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"list_ids": [
"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0",
"0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1"
]
}
'import requests
url = "https://app.lettr.com/api/audience/lists/bulk"
payload = { "list_ids": ["0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0", "0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
list_ids: ['0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0', '0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1']
})
};
fetch('https://app.lettr.com/api/audience/lists/bulk', 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://app.lettr.com/api/audience/lists/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'list_ids' => [
'0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0',
'0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.lettr.com/api/audience/lists/bulk"
payload := strings.NewReader("{\n \"list_ids\": [\n \"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0\",\n \"0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.delete("https://app.lettr.com/api/audience/lists/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"list_ids\": [\n \"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0\",\n \"0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/audience/lists/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"list_ids\": [\n \"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0\",\n \"0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Lists deleted successfully.",
"data": {
"deleted": 2
}
}
Delete up to 50 lists in a single request. All
list_ids must belong to the authenticated team. Requires the audience:write scope and is blocked for sandbox API keys.Authorizations
API key for authentication
Body
application/json
Bulk delete audience lists
1–50 list IDs (all must belong to the authenticated team)
Required array length:
1 - 50 elementsExample:
[ "0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0", "0193e6a8-2a4b-7d1c-a3f5-2bb2e3f6e4a1" ]
Was this page helpful?
⌘I