AM
ZH-TW
免費開始
選單
類型

網域

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

domaindnstlsemail

網域

Domain 代表註冊到帳戶下的自訂主機名稱,用於品牌呈現、郵件送達率與 TLS 設定。

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
}

屬性

屬性 型別 說明
id string 帶有 hst 前綴的 KSUID
account_id string 擁有此網域的帳戶
hostname string 網域名稱(例如 mail.example.com
client_id string? 關聯的 OAuth client
cname_config object? CNAME proxy 設定
email_config object? 收件路由設定
txt_verification_token string DNS TXT 驗證 token

DNS 驗證

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

Record Type Name Value
TXT _am.mail.example.com {txt_verification_token}

驗證流程

DNSSystem管理員DNSSystem管理員註冊網域TXT 驗證權杖新增 TXT 記錄POST /api/domains/:domain_id/checks查詢 TXT 記錄找到權杖標記為已驗證

範例

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

相關