Domain
A Domain represents a custom hostname registered to an account for branding, email deliverability, and TLS configuration.
Schema
interface Domain {
id: string; // "hst..." - Unique identifier
account_id: string; // Owning account
hostname: string; // Domain name
client_id: string | null; // Associated client
cname_config: { type: "proxy" } | null;
email_config:
| { type: "catch-all" }
| { type: "forward"; forward_to: Record<string, string> }
| null;
txt_verification_token: string; // DNS TXT record value
}
Properties
| Property | Type | Description |
|---|---|---|
id |
string |
KSUID with hst prefix |
account_id |
string |
Account that owns domain |
hostname |
string |
Domain name (e.g., mail.example.com) |
client_id |
string? |
Associated OAuth client |
cname_config |
object? |
CNAME proxy configuration |
email_config |
object? |
Inbound email routing config |
txt_verification_token |
string |
Token for DNS TXT verification |
DNS Verification
Add TXT record to verify ownership:
| Record Type | Name | Value |
|---|---|---|
| TXT | _am.mail.example.com |
{txt_verification_token} |
Verification Flow
Example
{
"id": "hst_2kHfPZcN9xW4mE8RtY7vB",
"account_id": "acc_1jGePYbM8wV3lD7QsX6uA",
"hostname": "mail.example.com",
"client_id": null,
"cname_config": { "type": "proxy" },
"email_config": null,
"txt_verification_token": "am_2abc123xyz"
}