Prerequisites
- Your domain is already set up and DNS-verified in UGMail
- A valid Bearer token from Settings → API Connection at my.ugmail.co
1
Ensure your domain is set up
The mailbox address you create must belong to a domain that is already registered in your UGMail account and has its DNS records configured. If you haven’t done that yet, follow the Set Up Your First Domain guide before continuing.
2
Create the mailbox
Send a A
POST request to /api/principal with the individual type, a name matching the full email address, the initial password in the secrets array, and the email address in the emails array.201 Created response confirms the mailbox is live and ready to use immediately.3
Verify the mailbox was created
You can confirm the mailbox exists by fetching the principal record you just created. If the request returns the account details without error, the mailbox is active.
4
Test login via SMTP or IMAP
Use the credentials you set during creation to verify the mailbox accepts authenticated connections. The connection details are the same for every mailbox on your account:A successful SMTP
You can test SMTP login quickly with
curl:AUTH exchange confirms the mailbox is working end-to-end.Next steps
Manage Aliases
Add additional addresses like support@ or billing@ to this mailbox.
Connect an AI Agent
Give an AI agent its own dedicated mailbox and hook it up over SMTP.

