Duplicate View
curl --request POST \
--url https://api.lemlist.com/api/views/{viewId}/duplicate \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "contact"
}
'import requests
url = "https://api.lemlist.com/api/views/{viewId}/duplicate"
payload = { "entity": "contact" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({entity: 'contact'})
};
fetch('https://api.lemlist.com/api/views/{viewId}/duplicate', 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}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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_Fake7Kq2Wz9xA1B2C",
"name": "My contacts copy",
"url": "https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_Fake7Kq2Wz9xA1B2C"
}
}{
"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"
}{
"error": "View not found",
"code": "ENTITY_VIEW_NOT_FOUND"
}{
"error": "Maximum number of views reached",
"code": "ENTITY_VIEW_LIMIT_REACHED"
}Views
Duplicate View
Copies a view, default views included, into a private view pinned on the API key user’s tabs.
POST
/
views
/
{viewId}
/
duplicate
Duplicate View
curl --request POST \
--url https://api.lemlist.com/api/views/{viewId}/duplicate \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "contact"
}
'import requests
url = "https://api.lemlist.com/api/views/{viewId}/duplicate"
payload = { "entity": "contact" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({entity: 'contact'})
};
fetch('https://api.lemlist.com/api/views/{viewId}/duplicate', 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}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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_Fake7Kq2Wz9xA1B2C",
"name": "My contacts copy",
"url": "https://app.lemlist.com/teams/tea_ExAmPlE4f7Kq2Wz9x/lemcrm/contacts?view=evw_Fake7Kq2Wz9xA1B2C"
}
}{
"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"
}{
"error": "View not found",
"code": "ENTITY_VIEW_NOT_FOUND"
}{
"error": "Maximum number of views reached",
"code": "ENTITY_VIEW_LIMIT_REACHED"
}Authorizations
Path Parameters
Id of the view, from List Views
Required string length:
1 - 64Body
application/json
Was this page helpful?