/api/principal endpoints.
Create a Domain
POST /api/principal
Register a new domain with your UGMail account. Once the domain is created, use the DNS Records API to retrieve the MX, SPF, and DKIM records you need to add at your registrar.
Request Parameters
The domain name to register (e.g.,
example.com). This becomes the unique identifier for the domain principal.Must be
"domain" to create a domain principal.Example Request
Example Response
Response Fields
The unique identifier for the domain principal. Identical to
name for domain principals.The domain name that was registered.
Always
"domain" for domain principals.List All Principals
GET /api/principal
Retrieve a list of all principals in your account. Filter by type to return only domains.
Example Request
Query Parameters
Filter results by principal type. Pass
type=domain to return only domain principals.Example Response
Get a Domain
GET /api/principal/{name}
Retrieve the details of a specific domain by its name.
Path Parameters
The domain name (e.g.,
example.com).Example Request
Example Response
Delete a Domain
DELETE /api/principal/{name}
Remove a domain from your account. This action is permanent and cannot be undone.
Path Parameters
The domain name to delete (e.g.,
example.com).
