- JavaScript
- Python
Installing the SDK
1
Install the SDK
- Bun
- pnpm
- npm
- Yarn
2
Initialize the Client
- With API key
- From env
Managing Email Domains
Use your own custom domains to send emails, improving deliverability and maintaining brand consistency.List All Domains
View all domains currently registered with your account.Response
Array of all domains registered with your account, including their verification status and configuration details.
Get Domain Details
Get detailed information about a specific domain, including verification status and DNS records.Response
Register a Domain
Add a new domain to your account for sending emails.Response
You can also register a domain with minimal configuration:Delete a Domain
Remove a domain from your account when it’s no longer needed.Response
Parameters
domains.list()
No parameters required. Returns all registered domains.domains.get(domain)
domains.register(domain, options?)
domains.delete(domain)
Using Custom Domains
Once your domain is verified, you can use it to send emails with your brand:Domain Verification
After registering a domain, you’ll need to:- Add DNS records provided in the registration response to your domain’s DNS settings
- Verify ownership by ensuring the DNS records are properly configured
- Wait for verification which typically takes a few minutes to complete
domains.get() method.Make sure to add all required DNS records (DKIM, SPF, DMARC) to ensure optimal email deliverability and to prevent your emails from being marked as spam.
