Remove Contact from List
curl --request DELETE \
--url https://api.example.com/v1/lists/{list_id}/contacts/{contact_id}import requests
url = "https://api.example.com/v1/lists/{list_id}/contacts/{contact_id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/v1/lists/{list_id}/contacts/{contact_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/v1/lists/{list_id}/contacts/{contact_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/v1/lists/{list_id}/contacts/{contact_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/v1/lists/{list_id}/contacts/{contact_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/lists/{list_id}/contacts/{contact_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{
"data": {
"removed": true,
"list_id": "<string>",
"contact_id": "<string>"
}
}Lists
Remove Contact from List
Remove a single contact’s membership from a list without deleting the contact
DELETE
/
v1
/
lists
/
{list_id}
/
contacts
/
{contact_id}
Remove Contact from List
curl --request DELETE \
--url https://api.example.com/v1/lists/{list_id}/contacts/{contact_id}import requests
url = "https://api.example.com/v1/lists/{list_id}/contacts/{contact_id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/v1/lists/{list_id}/contacts/{contact_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/v1/lists/{list_id}/contacts/{contact_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/v1/lists/{list_id}/contacts/{contact_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/v1/lists/{list_id}/contacts/{contact_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/lists/{list_id}/contacts/{contact_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{
"data": {
"removed": true,
"list_id": "<string>",
"contact_id": "<string>"
}
}Request
Path Parameters
string
required
The list’s unique ID (UUID)
string
required
The contact’s unique ID (UUID)
Headers
Authorization: Bearer wbk_your_api_key_here
Requires an API key with the
contacts:write permission. Only the list membership is removed — the contact itself is preserved. Fires the list.contacts_removed webhook event.Response
object
curl -X DELETE https://data.leadlex.com/functions/v1/api-gateway/v1/lists/l1b2c3d4-e5f6-7890-abcd-ef1234567890/contacts/123e4567-e89b-12d3-a456-426614174000 \
-H "Authorization: Bearer wbk_your_api_key_here"
import requests
API_KEY = "wbk_your_api_key_here"
BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"
LIST_ID = "l1b2c3d4-e5f6-7890-abcd-ef1234567890"
CONTACT_ID = "123e4567-e89b-12d3-a456-426614174000"
response = requests.delete(
f"{BASE_URL}/v1/lists/{LIST_ID}/contacts/{CONTACT_ID}",
headers={"Authorization": f"Bearer {API_KEY}"},
)
const LIST_ID = 'l1b2c3d4-e5f6-7890-abcd-ef1234567890';
const CONTACT_ID = '123e4567-e89b-12d3-a456-426614174000';
const response = await fetch(
`https://data.leadlex.com/functions/v1/api-gateway/v1/lists/${LIST_ID}/contacts/${CONTACT_ID}`,
{
method: 'DELETE',
headers: { 'Authorization': 'Bearer wbk_your_api_key_here' },
}
);
Example Response
{
"data": {
"removed": true,
"list_id": "l1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contact_id": "123e4567-e89b-12d3-a456-426614174000"
}
}
Errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing contacts:write permission |
| 404 | list_not_found | No list with this ID |
| 404 | membership_not_found | Contact is not a member of this list |
| 429 | rate_limited | Rate limit exceeded |