Accountmaker Docs
類型

網域

用於品牌、寄信與 TLS 管理的自訂網域設定。

domain dns tls email

網域

網域代表綁定到帳戶的自訂 hostname,用於品牌呈現、郵件送達與 TLS 設定。

Schema

interface Domain {
  id: string; // "hst..." - 唯一識別
  account_id: string; // 所屬帳戶
  hostname: string; // 網域名稱
  client_id: string | null; // 相關 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 驗證值
}

屬性

屬性類型說明
idstringhst 前綴的 KSUID
account_idstring擁有該網域的帳戶
hostnamestring網域名稱(例如 mail.example.com
client_idstring?相關 OAuth client
cname_configobject?CNAME proxy 設定
email_configobject?入站郵件路由設定
txt_verification_tokenstringDNS TXT 驗證 token

DNS 驗證

新增 TXT 記錄以驗證所有權:

記錄類型名稱
TXT_am.mail.example.com{txt_verification_token}

驗證流程

DNSSystemAdminDNSSystemAdmin註冊網域TXT 驗證 token新增 TXT 記錄POST /api/domains/:domain_id/checks查詢 TXT找到 token標記已驗證

範例

{
  "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"
}

相關