Skip to main content
Before you can send or receive email through UGMail, you need to register your domain with the platform and point your DNS records to UGMail’s infrastructure. This guide walks you through creating the domain via the Management API, fetching the DNS records UGMail generates for you, and adding those records at your registrar so your domain is fully verified and ready to use.

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
  • curl or any HTTP client
1

Create the domain via the API

Send 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.
A successful response returns a 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 /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.
Copy the values from the response — you’ll paste them into your DNS registrar in the next step.
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.
Use MXToolbox to verify each record type. Enter your domain in the MX Lookup tool, and use the TXT Lookup tool to confirm both your SPF and DKIM records are visible from the public DNS.
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.
Last modified on July 17, 2026