Get Snippet
curl --request GET \
--url https://api.lemlist.com/api/snippets/{snippetId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/snippets/{snippetId}"
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/snippets/{snippetId}', 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/snippets/{snippetId}")
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/snippets/{snippetId}",
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;
}{
"_id": "snt_A1B2C3D4E5F6G7H8I",
"name": "Signature",
"content": "<p>Best regards,<br/>{{senderName}}</p>",
"createdBy": "usr_A1B2C3D4E5F6G7H8I",
"createdAt": "2026-09-01T10:00:00.000Z"
}{
"error": "Validation error",
"code": "VALIDATION_ERROR"
}"The authentication you supplied is incorrect"{
"error": "Snippet not found",
"code": "SNIPPET_NOT_FOUND"
}Snippets
Get Snippet
Returns one snippet with its content.
GET
/
snippets
/
{snippetId}
Get Snippet
curl --request GET \
--url https://api.lemlist.com/api/snippets/{snippetId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/snippets/{snippetId}"
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/snippets/{snippetId}', 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/snippets/{snippetId}")
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/snippets/{snippetId}",
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;
}{
"_id": "snt_A1B2C3D4E5F6G7H8I",
"name": "Signature",
"content": "<p>Best regards,<br/>{{senderName}}</p>",
"createdBy": "usr_A1B2C3D4E5F6G7H8I",
"createdAt": "2026-09-01T10:00:00.000Z"
}{
"error": "Validation error",
"code": "VALIDATION_ERROR"
}"The authentication you supplied is incorrect"{
"error": "Snippet not found",
"code": "SNIPPET_NOT_FOUND"
}
The content is HTML as authored, with
{{variables}} left raw.
A deleted snippet and another workspace’s snippet both answer
404 SNIPPET_NOT_FOUND.Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The unique identifier of the snippet, from GET /snippets
Response
The snippet
A snippet: an HTML fragment (a signature, a paragraph, a call-to-action) inserted inside a message. The content is HTML as authored: sanitize it before rendering.
Was this page helpful?