Skip to main content
DELETE
/
api
/
v1
/
contact-lists
/
{id}
Delete List
curl --request DELETE \
  --url https://api.example.com/api/v1/contact-lists/{id}
import requests

url = "https://api.example.com/api/v1/contact-lists/{id}"

response = requests.delete(url)

print(response.text)
const options = {method: 'DELETE'};

fetch('https://api.example.com/api/v1/contact-lists/{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/contact-lists/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$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/contact-lists/{id}"

req, _ := http.NewRequest("DELETE", url, nil)

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/contact-lists/{id}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/contact-lists/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
Delete a contact list and all its contacts.
This action is irreversible. All contacts in the list will be permanently deleted.

Path Parameters

id
string
required
The unique list ID (e.g., lst_abc123).

Examples

import { MailBreeze } from "mailbreeze";

const mailbreeze = new MailBreeze({ apiKey: "sk_live_xxx" });

await mailbreeze.lists.delete("lst_abc123");

console.log("List deleted");
from mailbreeze import MailBreeze

client = MailBreeze(api_key="sk_live_xxx")

await client.lists.delete("lst_abc123")

print("List deleted")
client := mailbreeze.NewClient("sk_live_xxx")

err := client.Lists.Delete(ctx, "lst_abc123")
if err != nil {
    log.Fatal(err)
}

fmt.Println("List deleted")
$mailbreeze = new MailBreeze('sk_live_xxx');

$mailbreeze->lists->delete('lst_abc123');

echo "List deleted";
let client = Client::new("sk_live_xxx");

client.lists().delete("lst_abc123").await?;

println!("List deleted");
curl -X DELETE "https://api.mailbreeze.com/api/v1/contact-lists/lst_abc123" \
  -H "Authorization: Bearer sk_live_xxx"

Response

Returns 204 No Content on success with no response body.

Errors

CodeHTTP StatusDescription
NOT_FOUND404List with this ID doesn’t exist
LIST_IN_USE409List is being used by active campaigns
If you need to preserve contacts, export them before deleting the list, or move them to another list using the contacts update endpoint.