Skip to main content

Add a Domain

Start by registering the domain you want to send emails from.
import { createClient } from 'simpleemailapi';

const client = createClient({ apiKey: 'sea_live_...' });

const { domain } = await client.domains.addDomain({
  domain: 'example.com'
});

console.log('Domain added:', domain.id);
console.log('DNS Records:', domain.records);
After adding the domain, you will receive a list of DNS records (DKIM, SPF, DMARC) that you must add to your DNS provider.