Purchase Domain
curl --request POST \
--url https://api.lemlist.com/api/domains-core/purchase \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "getacme.com"
}
'import requests
url = "https://api.lemlist.com/api/domains-core/purchase"
payload = { "domain": "getacme.com" }
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({domain: 'getacme.com'})
};
fetch('https://api.lemlist.com/api/domains-core/purchase', 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/purchase")
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 \"domain\": \"getacme.com\"\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/purchase",
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([
'domain' => 'getacme.com'
]),
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;
}{
"domain": {
"_id": "dom_Kd8Wq2Lr5Tx9Mz3Pv",
"domain": "getacme.com",
"registrar": "google",
"status": "ordered",
"createdAt": "2026-01-15T10:30:00.000Z",
"emailCount": 0
},
"alreadyOwned": false
}{
"error": "A domain billing contact is required before purchasing. Provide the billingContact field, then retry."
}{
"error": "Unauthorized"
}{
"error": "You do not have permission to perform this action"
}{
"error": "This domain was already purchased or is not available anymore."
}{
"error": "Internal error"
}Domains
Purchase Domain
Orders a domain, or a transfer of a domain you own elsewhere, and bills the team.
POST
/
domains-core
/
purchase
Purchase Domain
curl --request POST \
--url https://api.lemlist.com/api/domains-core/purchase \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "getacme.com"
}
'import requests
url = "https://api.lemlist.com/api/domains-core/purchase"
payload = { "domain": "getacme.com" }
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({domain: 'getacme.com'})
};
fetch('https://api.lemlist.com/api/domains-core/purchase', 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/purchase")
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 \"domain\": \"getacme.com\"\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/purchase",
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([
'domain' => 'getacme.com'
]),
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;
}{
"domain": {
"_id": "dom_Kd8Wq2Lr5Tx9Mz3Pv",
"domain": "getacme.com",
"registrar": "google",
"status": "ordered",
"createdAt": "2026-01-15T10:30:00.000Z",
"emailCount": 0
},
"alreadyOwned": false
}{
"error": "A domain billing contact is required before purchasing. Provide the billingContact field, then retry."
}{
"error": "Unauthorized"
}{
"error": "You do not have permission to perform this action"
}{
"error": "This domain was already purchased or is not available anymore."
}{
"error": "Internal error"
}This call bills the team: the domain goes on its own yearly subscription, charged to the team’s payment method. Nothing can be canceled through the API; use the lemlist app or contact support.
Before the first purchase
The registrar needs a registrant contact. On the team’s first purchase, sendbillingContact: it is checked (address, then the registrar itself for google and m365), stored on the team and reused for every later purchase. Send it again only to change it.
A .fr or .be domain with google or m365 also needs billingContact.companyIdentificationCode (SIREN/SIRET). Some extensions only accept a registrant from given countries (a .fr needs an address in the EU/EEA).
After the call
- The domain is billed, then registered and set up in the background. Follow its
statuswith List Domains. - Order its mailboxes with Order Mailboxes. You can call it right away: the mailboxes wait for the domain, and are only billed once it is set up.
A domain can be bought without mailboxes. Don’t leave a
google domain without mailboxes for long: Google may delete a Workspace that holds no license, and adding mailboxes then requires support.Retrying
Calling again for a domain the team already ordered bills nothing and returns that order withalreadyOwned: true. A retry after a timeout is safe.
If the team has no valid payment method, or the payment fails, the order is canceled after about a day. That domain name can then no longer be ordered through lemlist: contact support.
Transfers
SetisTransfer: true with the authCode from your current registrar and provider: "google", the only provider that supports transfers. dnsRecords lists the records to recreate on the zone once the transfer completes. A transfer can take several days. If the registrar refuses the code, fix it in the lemlist app.
Requires the Manage domains permission on the user of the API key.
Authorizations
Body
application/json
Response
Domain ordered, or already ordered by the team (alreadyOwned: true, nothing billed)
Was this page helpful?