List Views
curl --request GET \
--url https://api.lemlist.com/api/views \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/views"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/views', 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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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/views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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": {
"views": [
{
"id": "evw_contact_my_contacts",
"name": "My contacts",
"icon": "far fa-folder",
"visibility": "everyone",
"isDefault": true,
"canEdit": false,
"pinned": true,
"filterState": {
"basicFilters": [
{
"type": "condition",
"id": "ownerId",
"property": "ownerId",
"operator": "is_any_of",
"value": [
"__me__"
]
}
],
"advancedFilters": [],
"rootConnector": "and"
},
"sort": {
"field": "createdAt",
"order": -1
},
"url": "https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_contact_my_contacts"
},
{
"id": "evw_A1B2C3ExAmPlE9xYz",
"name": "Hot leads in Paris",
"icon": "far fa-fire",
"visibility": "me",
"isDefault": false,
"canEdit": true,
"pinned": true,
"filterState": {
"basicFilters": [
{
"type": "condition",
"id": "ExAmPlE1A2B3C4D5E",
"property": "ownerId",
"operator": "is_any_of",
"value": [
"__me__"
]
},
{
"type": "condition",
"id": "FakeA1B2C3D4E5F6G",
"property": "location",
"operator": "contains",
"value": "Paris"
}
],
"advancedFilters": []
},
"url": "https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_A1B2C3ExAmPlE9xYz"
}
]
}
}{
"error": "Validation error",
"code": "VALIDATION_ERROR"
}The authentication you supplied is incorrect{
"error": "Views of this list are not enabled for this team",
"code": "ENTITY_VIEW_ENTITY_UNAVAILABLE"
}Views
List Views
Lists the views of the Contacts, Companies or Tasks list, as the API key’s user sees them.
GET
/
views
List Views
curl --request GET \
--url https://api.lemlist.com/api/views \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/views"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/views', 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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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/views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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": {
"views": [
{
"id": "evw_contact_my_contacts",
"name": "My contacts",
"icon": "far fa-folder",
"visibility": "everyone",
"isDefault": true,
"canEdit": false,
"pinned": true,
"filterState": {
"basicFilters": [
{
"type": "condition",
"id": "ownerId",
"property": "ownerId",
"operator": "is_any_of",
"value": [
"__me__"
]
}
],
"advancedFilters": [],
"rootConnector": "and"
},
"sort": {
"field": "createdAt",
"order": -1
},
"url": "https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_contact_my_contacts"
},
{
"id": "evw_A1B2C3ExAmPlE9xYz",
"name": "Hot leads in Paris",
"icon": "far fa-fire",
"visibility": "me",
"isDefault": false,
"canEdit": true,
"pinned": true,
"filterState": {
"basicFilters": [
{
"type": "condition",
"id": "ExAmPlE1A2B3C4D5E",
"property": "ownerId",
"operator": "is_any_of",
"value": [
"__me__"
]
},
{
"type": "condition",
"id": "FakeA1B2C3D4E5F6G",
"property": "location",
"operator": "contains",
"value": "Paris"
}
],
"advancedFilters": []
},
"url": "https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_A1B2C3ExAmPlE9xYz"
}
]
}
}{
"error": "Validation error",
"code": "VALIDATION_ERROR"
}The authentication you supplied is incorrect{
"error": "Views of this list are not enabled for this team",
"code": "ENTITY_VIEW_ENTITY_UNAVAILABLE"
}Authorizations
Query Parameters
Was this page helpful?