AM
ZH-CN
免费开始
菜单
类型

域名

用于品牌展示、邮件发送和 TLS 证书管理的自定义域名配置。

domain dns tls email

域名

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
}

属性

属性类型说明
idstringhst 前缀的 KSUID
account_idstring拥有该域名的账户
hostnamestring域名(如 mail.example.com
client_idstring?关联的 OAuth 客户端
cname_configobject?CNAME 代理配置
email_configobject?入站邮件路由配置
txt_verification_tokenstringDNS TXT 验证令牌

DNS 验证

添加 TXT 记录以验证所有权:

Record TypeNameValue
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"
}

相关