Posthawk
Domain Management

Domain Management
API

Let your users add their own sending domains programmatically. Manage DKIM verification, inbound receiving, and webhook forwarding — all through a simple REST API and SDKs.

Programmatic Setup

Add domains
via API

Register a sending domain with one API call. Get back the DNS records your users need to configure — DKIM, SPF, and MAIL FROM.

TypeScript
import { Posthawk } from 'posthawk';const posthawk = new Posthawk('ck_live_...');// Add a customer's domainconst { data, error } = await posthawk.domains.create({  domain: 'mail.customer.com',  region: 'us-east-1',});if (data) {  // Show DNS records to your user  console.log(data.dns_records);}
TypeScript
// Check verification statusconst { data } = await posthawk.domains.verify(  'domain-uuid');if (data.sending_enabled) {  console.log('Domain verified — ready to send!');}// List all domainsconst { data: domains } = await posthawk.domains.list();// Delete a domainawait posthawk.domains.delete('domain-uuid');
Verification

Verify, list,
and manage

Trigger verification checks programmatically. List all domains, check their status, and remove domains when they are no longer needed.

Inbound & Webhooks

Receive emails,
forward to webhooks

Enable inbound receiving per domain. Set a webhook URL and get parsed emails delivered in real time. Test the webhook with a single call.

TypeScript
// Enable inbound receivingawait posthawk.domains.enableReceiving('domain-uuid');// Set a webhook for inbound emailsawait posthawk.domains.updateWebhook('domain-uuid', {  webhookUrl: 'https://yourapp.com/api/incoming',});// Test the webhookconst result = await posthawk.domains.testWebhook(  'domain-uuid');console.log(result.data); // { statusCode: 200 }
Getting started

Up and running
in minutes

01

Add a domain

Call the API with your domain name and preferred SES region. Get back DNS records to configure.

02

Configure DNS

Add the DKIM TXT, SPF, and MAIL FROM records to your DNS provider. Works with any registrar.

03

Verify & send

Trigger verification via API. Once verified, start sending emails from that domain immediately.

Multi-Region Sending

Choose from 8 AWS SES regions at domain creation. Send from the region closest to your recipients.

Automatic DKIM & SPF

BYODKIM with RSA 2048-bit keys. A single TXT record instead of 3 CNAMEs — simpler DNS setup.

Inbound Receiving

Enable inbound email per domain via API. Configure an MX record and receive parsed emails via webhook.

Webhook Forwarding

Set a webhook URL per domain to receive inbound emails in real time. Test it with a single API call.

Use case

Built for SaaS
platforms

If your product lets customers send emails from their own domains, the Domain Management API handles the infrastructure. Your users add their domain in your UI, you call the Posthawk API, and we handle DKIM signing, verification polling, and deliverability.

Email platforms

Let users send from their own domains with full authentication.

Marketing tools

Onboard customers with custom sending domains for better deliverability.

Dev tools

Integrate domain management into your platform's settings or API.

Start managing domains

Add your first domain in under a minute. Available on all cloud plans.

Cookie Preferences

We use analytics cookies to understand how you use our site and improve your experience. Privacy Policy