Overview
Custom domains let your customers send emails from their own domain (e.g.promotions@joes-pizza.com) instead of a shared Pocketflows domain. There are
two ways to set them up:
- Embed-first — Your customer configures their domain directly through the Pocketflows embed UI. No API work required.
- API-first — You manage domain setup programmatically through the API.
Embed-first
If you’re using Pocketflows embeds, custom domain setup is already built into the UI. Your customers can add and verify their domain directly from the embedded experience—no additional integration work needed on your end.API-first
Use this approach if you want to manage custom domains programmatically—for example, to automate domain setup during onboarding or build your own domain configuration UI.Step 1: Create a custom domain
Register the domain you want to send emails from.id for the following steps.
Step 2: Retrieve DNS records
Poll the custom domain until the required DNS records are available.dns_records array contains the records that need to be added to the
domain’s DNS provider. Share these with your customer or configure them
programmatically if you manage their DNS.
DNS records may take a moment to be generated after creating the custom
domain. Poll this endpoint until
dns_records is populated in the response.Step 3: Validate the domain
Once the DNS records have been installed, call validate to verify everything is configured correctly.DNS changes can take up to 48 hours to propagate. If validation fails, wait
and try again later.