Update User Signature
curl --request PATCH \
--url https://api.lemlist.com/api/users/{userId}/signature \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"signature": "<p>Best regards,<br>John Doe<br>Acme Inc</p>",
"plainTextSignature": "Best regards,\nJohn Doe\nAcme Inc"
}
'import requests
url = "https://api.lemlist.com/api/users/{userId}/signature"
payload = {
"signature": "<p>Best regards,<br>John Doe<br>Acme Inc</p>",
"plainTextSignature": "Best regards,
John Doe
Acme Inc"
}
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({
signature: '<p>Best regards,<br>John Doe<br>Acme Inc</p>',
plainTextSignature: 'Best regards,\nJohn Doe\nAcme Inc'
})
};
fetch('https://api.lemlist.com/api/users/{userId}/signature', 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/users/{userId}/signature")
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 \"signature\": \"<p>Best regards,<br>John Doe<br>Acme Inc</p>\",\n \"plainTextSignature\": \"Best regards,\\nJohn Doe\\nAcme Inc\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/users/{userId}/signature",
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([
'signature' => '<p>Best regards,<br>John Doe<br>Acme Inc</p>',
'plainTextSignature' => 'Best regards,
John Doe
Acme Inc'
]),
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": {
"userId": "usr_Tq8Wm3Zk6RbP2NxYv",
"signature": "<p>Best regards,<br>John Doe<br>Acme Inc</p>",
"plainTextSignature": "Best regards,\nJohn Doe\nAcme Inc"
}
}{
"error": "Send only signature (HTML, at most 100,000 characters) and/or plainTextSignature (at most 50,000 characters), as strings",
"code": "SIGNATURE_INVALID_INPUT"
}{
"error": "Only admins can edit a teammate's signature",
"code": "SIGNATURE_NOT_ALLOWED"
}{
"error": "This user is not a member of your team",
"code": "SIGNATURE_USER_NOT_IN_TEAM"
}{
"error": "Internal error",
"code": "INTERNAL_ERROR"
}Users
Update User Signature
Updates the HTML and plain-text email signatures of a team member.
PATCH
/
users
/
{userId}
/
signature
Update User Signature
curl --request PATCH \
--url https://api.lemlist.com/api/users/{userId}/signature \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"signature": "<p>Best regards,<br>John Doe<br>Acme Inc</p>",
"plainTextSignature": "Best regards,\nJohn Doe\nAcme Inc"
}
'import requests
url = "https://api.lemlist.com/api/users/{userId}/signature"
payload = {
"signature": "<p>Best regards,<br>John Doe<br>Acme Inc</p>",
"plainTextSignature": "Best regards,
John Doe
Acme Inc"
}
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({
signature: '<p>Best regards,<br>John Doe<br>Acme Inc</p>',
plainTextSignature: 'Best regards,\nJohn Doe\nAcme Inc'
})
};
fetch('https://api.lemlist.com/api/users/{userId}/signature', 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/users/{userId}/signature")
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 \"signature\": \"<p>Best regards,<br>John Doe<br>Acme Inc</p>\",\n \"plainTextSignature\": \"Best regards,\\nJohn Doe\\nAcme Inc\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/users/{userId}/signature",
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([
'signature' => '<p>Best regards,<br>John Doe<br>Acme Inc</p>',
'plainTextSignature' => 'Best regards,
John Doe
Acme Inc'
]),
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": {
"userId": "usr_Tq8Wm3Zk6RbP2NxYv",
"signature": "<p>Best regards,<br>John Doe<br>Acme Inc</p>",
"plainTextSignature": "Best regards,\nJohn Doe\nAcme Inc"
}
}{
"error": "Send only signature (HTML, at most 100,000 characters) and/or plainTextSignature (at most 50,000 characters), as strings",
"code": "SIGNATURE_INVALID_INPUT"
}{
"error": "Only admins can edit a teammate's signature",
"code": "SIGNATURE_NOT_ALLOWED"
}{
"error": "This user is not a member of your team",
"code": "SIGNATURE_USER_NOT_IN_TEAM"
}{
"error": "Internal error",
"code": "INTERNAL_ERROR"
}You can always edit your own signatures. Editing another member of your team takes a team admin: the API key acts as the user who created it, so a key created by a non-admin answers
403 (SIGNATURE_NOT_ALLOWED) for anyone but that user. Send at least one of signature and plainTextSignature, and note that unknown fields are refused.How each signature is used
signature— HTML, capped at 100,000 characters, inserted where an email carries{{signature}}. It is sanitized on save, so link images by URL instead of embedding them.plainTextSignature— plain text, capped at 50,000 characters, inserted by{{plainTextSignature}}in emails sent as plain text and in lemwarm. Line breaks are kept and HTML is converted to text.
plainTextSignature that passes 50,000 characters once its angle brackets are escaped is rejected as well, since the rest would be dropped on the way to plain text.Authorizations
Path Parameters
Body
application/json
The signatures to change. Provide signature and/or plainTextSignature: an omitted one keeps its stored value, and at least one is required. Unknown fields are refused, and an invalid body fails the whole update, so nothing is written. The HTML signature is sanitized on save, so link images by URL instead of embedding them; an empty string clears it.
Was this page helpful?