Delete Saved Search
curl --request DELETE \
--url https://api.lemlist.com/api/database/saved-searches/{savedSearchId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/database/saved-searches/{savedSearchId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/database/saved-searches/{savedSearchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/database/saved-searches/{savedSearchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/database/saved-searches/{savedSearchId}",
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: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"_id": "lss_ExAmPlE4f7Kq2Wz9x",
"deleted": true
}
}{
"error": "Wrong param lemleads saved search id",
"code": "WRONG_PARAM_LEMLEADS_SAVED_SEARCH_ID"
}The authentication you supplied is incorrect{
"error": "No saved search found for this id",
"code": "SAVED_SEARCH_NOT_FOUND"
}{
"error": "Route bad method",
"code": "ROUTE_BAD_METHOD"
}People database
Delete Saved Search
Deletes a People Database saved search.
DELETE
/
database
/
saved-searches
/
{savedSearchId}
Delete Saved Search
curl --request DELETE \
--url https://api.lemlist.com/api/database/saved-searches/{savedSearchId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/database/saved-searches/{savedSearchId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/database/saved-searches/{savedSearchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/database/saved-searches/{savedSearchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/database/saved-searches/{savedSearchId}",
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: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"_id": "lss_ExAmPlE4f7Kq2Wz9x",
"deleted": true
}
}{
"error": "Wrong param lemleads saved search id",
"code": "WRONG_PARAM_LEMLEADS_SAVED_SEARCH_ID"
}The authentication you supplied is incorrect{
"error": "No saved search found for this id",
"code": "SAVED_SEARCH_NOT_FOUND"
}{
"error": "Route bad method",
"code": "ROUTE_BAD_METHOD"
}Pass the
savedSearchId as a path parameter. Deletion is permanent — there is no undo.An unknown id and a saved search belonging to another team answer the same 404.Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Id of the saved search
Minimum string length:
1Response
Saved search deleted
Show child attributes
Show child attributes
Was this page helpful?