Skip to main content
POST
Purchase Domain
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, send billingContact: 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

  1. The domain is billed, then registered and set up in the background. Follow its status with List Domains.
  2. 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 with alreadyOwned: 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

Set isTransfer: 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

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
domain
string
required

Domain to buy or transfer

Example:

"getacme.com"

provider
enum<string>
default:infraforge

Mailbox provider of the domain, permanent: google (Google Workspace), m365 (Microsoft 365) or infraforge (SMTP). Pick one listed in the Search Domains providers. A transfer requires google.

Available options:
google,
m365,
infraforge
isTransfer
boolean
default:false

Transfer a domain registered elsewhere instead of registering a new one

authCode
string

Transfer authorization code from the current registrar. Required when isTransfer is true.

dnsRecords
object[]

Transfer only: records to recreate on the zone once the transfer completes. Ignored for a registration.

billingContact
object

Registrant contact of the team, sent to the registrar. Stored on the team and reused for every later purchase; sending it again overwrites the stored one.

Response

Domain ordered, or already ordered by the team (alreadyOwned: true, nothing billed)

domain
object
required

A domain the team bought or is transferring through lemlist.

alreadyOwned
boolean
required

True when the team already had a live order for this domain: the call billed nothing and returns that order.