Skip to main content

Installing the SDK

1

Install the SDK

2

Initialize the Client

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

object[]
Array of all domains registered with your account, including their verification status and configuration details.
object
Request metadata including ID, timestamp, and API version.

Get Domain Details

Get detailed information about a specific domain, including verification status and DNS records.

Response

string
Current verification status of the domain (e.g., “verified”, “pending”, “failed”).
object[]
Array of DNS records required for domain verification and email sending.
object
Detailed verification status for each DNS record type (DKIM, SPF, DMARC).
object
Request metadata including ID, timestamp, and API version.

Register a Domain

Add a new domain to your account for sending emails.

Response

string
Registration status of the domain (e.g., “registered”, “pending_verification”).
object[]
Array of DNS records that must be added to your domain’s DNS settings for verification.
object
Request metadata including ID, timestamp, and API version.
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

boolean
Indicates whether the domain was successfully deleted.
string
Confirmation message about the deletion status.
object
Request metadata including ID, timestamp, and API version.

Parameters

domains.list()

No parameters required. Returns all registered domains.

domains.get(params)

string
required
The domain name to get details for (e.g., “example.com”).

domains.register(params)

string
required
The domain name to register (e.g., “example.com”). Must be a valid domain you own.
string
AWS region for domain setup. Common options: "us-east-1", "us-west-2", "eu-west-1". Defaults to "us-east-1" if not specified.
string
Custom return path subdomain for bounce handling. If set to "mail", bounce emails will be handled at mail.yourdomain.com.

domains.delete(params)

string
required
The domain name to delete from your account (e.g., “example.com”).

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:
  1. Add DNS records provided in the registration response to your domain’s DNS settings
  2. Verify ownership by ensuring the DNS records are properly configured
  3. Wait for verification which typically takes a few minutes to complete
The verification status can be checked using the 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.
Deleting a domain will immediately stop all email sending from that domain. Make sure to update your email configurations before removing a domain.