Update Domain Mailbox
curl --request PATCH \
--url https://api.lemlist.com/api/domains-core/mailboxes/{mailboxId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"assignToUserId": "usr_Wf3Kp9Rd2Nz6Xc4Lj"
}
'import requests
url = "https://api.lemlist.com/api/domains-core/mailboxes/{mailboxId}"
payload = { "assignToUserId": "usr_Wf3Kp9Rd2Nz6Xc4Lj" }
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({assignToUserId: 'usr_Wf3Kp9Rd2Nz6Xc4Lj'})
};
fetch('https://api.lemlist.com/api/domains-core/mailboxes/{mailboxId}', 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/domains-core/mailboxes/{mailboxId}")
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 \"assignToUserId\": \"usr_Wf3Kp9Rd2Nz6Xc4Lj\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/domains-core/mailboxes/{mailboxId}",
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([
'assignToUserId' => 'usr_Wf3Kp9Rd2Nz6Xc4Lj'
]),
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;
}{
"ok": true,
"mailboxId": "dem_Rb4Nc7Fy1Hs6Jq0Wt",
"applied": [
"assignToUserId"
],
"assignedToUserId": "usr_Wf3Kp9Rd2Nz6Xc4Lj"
}{
"error": "At least one update field must be provided"
}{
"error": "Unauthorized"
}{
"error": "User is not part of current team"
}{
"error": "Mailbox not found"
}{
"error": "Internal error"
}{
"error": "Error while assigning mailbox to user. Please try again later."
}Domains
Update Domain Mailbox
Assigns a mailbox bought through lemlist to another team member.
PATCH
/
domains-core
/
mailboxes
/
{mailboxId}
Update Domain Mailbox
curl --request PATCH \
--url https://api.lemlist.com/api/domains-core/mailboxes/{mailboxId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"assignToUserId": "usr_Wf3Kp9Rd2Nz6Xc4Lj"
}
'import requests
url = "https://api.lemlist.com/api/domains-core/mailboxes/{mailboxId}"
payload = { "assignToUserId": "usr_Wf3Kp9Rd2Nz6Xc4Lj" }
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({assignToUserId: 'usr_Wf3Kp9Rd2Nz6Xc4Lj'})
};
fetch('https://api.lemlist.com/api/domains-core/mailboxes/{mailboxId}', 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/domains-core/mailboxes/{mailboxId}")
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 \"assignToUserId\": \"usr_Wf3Kp9Rd2Nz6Xc4Lj\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/domains-core/mailboxes/{mailboxId}",
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([
'assignToUserId' => 'usr_Wf3Kp9Rd2Nz6Xc4Lj'
]),
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;
}{
"ok": true,
"mailboxId": "dem_Rb4Nc7Fy1Hs6Jq0Wt",
"applied": [
"assignToUserId"
],
"assignedToUserId": "usr_Wf3Kp9Rd2Nz6Xc4Lj"
}{
"error": "At least one update field must be provided"
}{
"error": "Unauthorized"
}{
"error": "User is not part of current team"
}{
"error": "Mailbox not found"
}{
"error": "Internal error"
}{
"error": "Error while assigning mailbox to user. Please try again later."
}
The new user’s name is pushed to the mail provider.
Requires the Manage domains permission on the user of the API key. The target user must be a member of the team.
Authorizations
Body
application/json
Was this page helpful?