Delete Lead List
curl --request DELETE \
--url https://api.example.com/api/v1/entities/leadlists/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/entities/leadlists/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/entities/leadlists/{id}', 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.example.com/api/v1/entities/leadlists/{id}",
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.example.com/api/v1/entities/leadlists/{id}"
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.example.com/api/v1/entities/leadlists/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/entities/leadlists/{id}")
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(No content)
{
"error": {
"code": "FORBIDDEN",
"message": "You do not have access to this lead list"
}
}
{
"error": {
"code": "NOT_FOUND",
"message": "LeadList with id 'invalid-id' not found"
}
}
Lead Lists
Delete Lead List
Permanently deletes a lead list
DELETE
/
api
/
v1
/
entities
/
leadlists
/
{id}
Delete Lead List
curl --request DELETE \
--url https://api.example.com/api/v1/entities/leadlists/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/entities/leadlists/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/entities/leadlists/{id}', 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.example.com/api/v1/entities/leadlists/{id}",
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.example.com/api/v1/entities/leadlists/{id}"
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.example.com/api/v1/entities/leadlists/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/entities/leadlists/{id}")
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(No content)
{
"error": {
"code": "FORBIDDEN",
"message": "You do not have access to this lead list"
}
}
{
"error": {
"code": "NOT_FOUND",
"message": "LeadList with id 'invalid-id' not found"
}
}
Permanently deletes a lead list by its unique identifier. This action cannot be undone.
Authentication
This endpoint requires authentication. Only users with access to the lead list (or admin users) can delete it.This operation is irreversible. The lead list and its associations will be
permanently removed. The underlying persons or companies are not deleted.
Request
string (UUID)
required
The unique identifier of the lead list to delete.
Response
Returns an empty response with status code204 No Content on successful deletion.
void
No response body is returned on successful deletion.
Response Examples
(No content)
{
"error": {
"code": "FORBIDDEN",
"message": "You do not have access to this lead list"
}
}
{
"error": {
"code": "NOT_FOUND",
"message": "LeadList with id 'invalid-id' not found"
}
}
Error Codes
| Status Code | Error Code | Description |
|---|---|---|
| 403 | FORBIDDEN | User does not have access to this lead list. Only users in userIds or admins can delete the list. |
| 404 | NOT_FOUND | No lead list exists with the specified ID. |
| 500 | INTERNAL_ERROR | An unexpected server error occurred. |
Authorization Rules
- Access Control: Only users whose ID is in the
userIdsarray can delete the lead list. - Admin Override: Users with the admin role can delete any lead list regardless of
userIds.
Notes
- Deleting a lead list does not delete the associated persons or companies. Only the list itself and its ID associations are removed.
- If you need to archive a list instead of permanently deleting it, consider implementing a soft-delete mechanism or moving the list to an archive state.