Update Saved Search
curl --request PATCH \
--url https://api.lemlist.com/api/database/saved-searches/{savedSearchId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.lemlist.com/api/database/saved-searches/{savedSearchId}"
payload = {}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
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::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"_id": "lss_ExAmPlE4f7Kq2Wz9x",
"name": "Lyon SaaS founders",
"mode": "leads",
"filters": [
{
"filterId": "currentTitle",
"in": [
"Founder"
],
"out": []
},
{
"filterId": "country",
"in": [
"France"
],
"out": []
}
],
"createdAt": "2026-09-14T08:30:00.000Z",
"lastResultsCount": 1240,
"lastResultsCountUpdatedAt": "2026-09-14T08:30:00.000Z"
}
}
People database
Update Saved Search
Renames a People Database saved search and/or replaces its filters.
PATCH
/
database
/
saved-searches
/
{savedSearchId}
Update Saved Search
curl --request PATCH \
--url https://api.lemlist.com/api/database/saved-searches/{savedSearchId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.lemlist.com/api/database/saved-searches/{savedSearchId}"
payload = {}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
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::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"_id": "lss_ExAmPlE4f7Kq2Wz9x",
"name": "Lyon SaaS founders",
"mode": "leads",
"filters": [
{
"filterId": "currentTitle",
"in": [
"Founder"
],
"out": []
},
{
"filterId": "country",
"in": [
"France"
],
"out": []
}
],
"createdAt": "2026-09-14T08:30:00.000Z",
"lastResultsCount": 1240,
"lastResultsCountUpdatedAt": "2026-09-14T08:30:00.000Z"
}
}
Send at least one of
name and filters. filters replace the saved ones entirely — they are not merged. mode is only read together with filters and defaults to the current mode of the saved search.The filters and the name are applied as two separate writes. If the rename is refused because the name is already taken (
409), the new filters are already saved.Authorizations
Body
application/json
New filters, replacing the saved ones entirely. 1 to 10 filters of shape { filterId, in?, out?, exactMatch? } (no other key: an unknown key such as type answers API_INVALID_FILTERS), at most 1000 values per in / out and 1000 characters per value.
Required array length:
1 - 10 elementsShow child attributes
Show child attributes
Was this page helpful?