Prerequisites
- A UGMail account with a valid Bearer token (find yours at Settings → API Connection in the UGMail dashboard)
- A domain you own and can manage DNS records for
curlor any HTTP client
1
Create the domain via the API
Send a A successful response returns a
POST request to /api/principal with your domain name and the type domain. This registers the domain inside your UGMail account and triggers generation of the DNS records you’ll need in the next step.201 status along with a JSON object confirming the domain has been created. If you receive a 409, the domain is already registered on your account.2
Fetch your DNS records
Retrieve the DNS records UGMail has generated for your domain by calling the Copy the values from the response — you’ll paste them into your DNS registrar in the next step.
/api/dns/{domain} endpoint. The response includes the MX record, an SPF TXT record, and a DKIM TXT record — all three are required for full email deliverability.3
Add the DNS records at your registrar
Log in to your domain registrar (e.g., Cloudflare, Namecheap, GoDaddy) and create the following records using the exact values returned by the API in the previous step:
Enter the values exactly as provided. Any trailing spaces or missing characters in the DKIM record will cause signature verification to fail.
4
Verify DNS propagation
DNS changes can take anywhere from a few minutes to 48 hours to propagate worldwide. Before testing email delivery, confirm that your records are live and resolving correctly.Once all three record types resolve correctly, your domain is fully configured. You can now provision mailboxes on this domain.
DNS propagation typically completes within a few hours, but the full window is up to 48 hours depending on your registrar’s TTL settings and how aggressively resolvers around the world cache records. If records aren’t visible after 48 hours, double-check that you saved the correct values at your registrar and that there are no conflicting records of the same type.
Next steps
Provision a Mailbox
Create your first email account on this domain using the Management API.
Manage Aliases
Add role-based addresses like support@ and info@ to existing mailboxes.

