Update View
curl --request PATCH \
--url https://api.lemlist.com/api/views/{viewId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "contact"
}
'import requests
url = "https://api.lemlist.com/api/views/{viewId}"
payload = { "entity": "contact" }
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({entity: 'contact'})
};
fetch('https://api.lemlist.com/api/views/{viewId}', 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/views/{viewId}")
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 = "{\n \"entity\": \"contact\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/views/{viewId}",
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([
'entity' => 'contact'
]),
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": "evw_A1B2C3ExAmPlE9xYz",
"url": "https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_A1B2C3ExAmPlE9xYz"
}
}
Views
Update View
Renames a view, changes its icon or visibility, or replaces its filters.
PATCH
/
views
/
{viewId}
Update View
curl --request PATCH \
--url https://api.lemlist.com/api/views/{viewId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "contact"
}
'import requests
url = "https://api.lemlist.com/api/views/{viewId}"
payload = { "entity": "contact" }
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({entity: 'contact'})
};
fetch('https://api.lemlist.com/api/views/{viewId}', 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/views/{viewId}")
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 = "{\n \"entity\": \"contact\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/views/{viewId}",
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([
'entity' => 'contact'
]),
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": "evw_A1B2C3ExAmPlE9xYz",
"url": "https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_A1B2C3ExAmPlE9xYz"
}
}
filters, sort and columns each replace the current ones when sent; sort and columns apply to task views only. Default views are read-only: copy one with Duplicate View to change it.Authorizations
Path Parameters
Id of the view, from List Views
Required string length:
1 - 64Body
application/json
Font Awesome icon shown on the tab. Defaults to far fa-folder on create.
Available options:
far fa-folder, far fa-list-check, far fa-star, far fa-flag, far fa-bolt, far fa-bullseye, far fa-calendar, far fa-user, far fa-phone, far fa-fire, far fa-reply, far fa-plane-departure, far fa-triangle-exclamation, far fa-circle-check Example:
"far fa-fire"
A view's filters. On update, they replace all the current filters.
Show child attributes
Show child attributes
Example:
{ "connector": "and", "conditions": [ { "property": "ownerId", "operator": "is_any_of", "value": ["__me__"] }, { "property": "contactScore", "operator": "gte", "value": 5 }, { "property": "createdAt", "operator": "is_relative", "value": { "mode": "last", "amount": 30, "unit": "day" } } ] }
Was this page helpful?