> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hybridbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取域名

> 返回面向客户的域名详情。

<script src="/locale-bridge.js" />


## OpenAPI

````yaml /openapi.zh-cn.json GET /v1/public/accounts/{account_id}/domains/{domain}
openapi: 3.1.0
info:
  title: Code API (Public)
  version: 1.0.0
servers:
  - url: https://api.hybridbox.io
security: []
paths:
  /v1/public/accounts/{account_id}/domains/{domain}:
    get:
      tags:
        - public-accounts
        - public-domains
      summary: 获取域名
      description: 返回面向客户的域名详情。
      operationId: get_public_domain_v1_public_accounts__account_id__domains__domain__get
      parameters:
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
        - in: path
          name: domain
          required: true
          schema:
            title: Domain
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainDetailResponse'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
      security:
        - PublicBearerAuth: []
components:
  schemas:
    DomainDetailResponse:
      properties:
        auto_renew:
          default: false
          description: 是否启用域名自动续订
          title: 自动续订
          type: boolean
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          description: 域创建时间戳
          title: 创建时间
        dedicated_ip_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: 分配专用 IP UUID（如果有）
          title: 专用 IP Id
        dns_records:
          description: DNS 域记录
          items:
            $ref: '#/components/schemas/DomainDnsRecordResponse'
          title: DNS 记录
          type: array
        id:
          description: 域名 UUID
          format: uuid
          title: ID
          type: string
        inbound_tenant_external_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 入站租户的提供商外部 ID
          title: 入站租户外部 ID
        inbound_tenant_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: 入站租户 UUID（如果已分配）
          title: 入站租户 ID
        inbound_tenant_name:
          anyOf:
            - type: string
            - type: 'null'
          description: 入站租户显示名称（如果已分配）
          title: 入站租户名称
        inbound_tenant_type:
          anyOf:
            - type: string
            - type: 'null'
          description: 入站租户类型（如果已分配）
          title: 入站租户类型
        mailboxes:
          description: 域中的邮箱
          items:
            $ref: '#/components/schemas/DomainMailboxSummary'
          title: 邮箱
          type: array
        name:
          description: 域名
          title: 名称
          type: string
        outbound_routing_ready:
          description: 呼出路由是否准备好
          title: 出站路由就绪
          type: boolean
        redirect_mode:
          anyOf:
            - enum:
                - '301'
                - '302'
                - iframe
              type: string
            - type: 'null'
          description: 配置的重定向模式（如果有）
          title: 重定向模式
        redirect_url:
          anyOf:
            - type: string
            - type: 'null'
          description: 配置的重定向 URL（如果有）
          title: 重定向 URL
        status:
          description: 域生命周期状态
          title: 状态
          type: string
        tags:
          description: 附加到域的标签
          items:
            $ref: '#/components/schemas/DomainTagResponse'
          title: 标签
          type: array
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          description: 域上次更新时间戳
          title: 更新时间
        workspace_id:
          description: 包含域的工作空间 UUID
          format: uuid
          title: 工作区 Id
          type: string
      required:
        - id
        - name
        - status
        - workspace_id
        - outbound_routing_ready
      title: DomainDetailResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: 详情
          type: array
      title: HTTPValidationError
      type: object
    DomainDnsRecordResponse:
      description: 嵌入域名详情中的 DNS 记录。
      properties:
        id:
          description: DNS 记录标识符
          title: ID
          type: integer
        is_system_managed:
          default: false
          description: 该记录是否由HybridBox管理
          title: 由系统管理
          type: boolean
        name:
          description: DNS 记录名称
          title: 名称
          type: string
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          description: DNS 适用时记录优先级
          title: 优先级
        ttl:
          description: DNS 以秒记录 TTL
          title: TTL
          type: integer
        type:
          description: DNS记录类型
          title: 类型
          type: string
        value:
          description: DNS 记录值
          title: 值
          type: string
      required:
        - id
        - type
        - name
        - value
        - ttl
      title: DomainDnsRecordResponse
      type: object
    DomainMailboxSummary:
      description: 嵌入域名详情中的邮箱摘要。
      properties:
        active:
          description: 邮箱是否处于活动状态
          title: 活动
          type: boolean
        email:
          description: 主邮箱电子邮件地址
          title: 电子邮件
          type: string
        first_name:
          description: 邮箱用户名
          title: 名字
          type: string
        id:
          description: 邮箱UUID
          format: uuid
          title: ID
          type: string
        last_name:
          description: 邮箱用户姓氏
          title: 姓氏
          type: string
      required:
        - id
        - email
        - first_name
        - last_name
        - active
      title: DomainMailboxSummary
      type: object
    DomainTagResponse:
      description: 附加到域名的标签。
      properties:
        id:
          description: 标签 UUID
          format: uuid
          title: ID
          type: string
        name:
          description: 标签显示名称
          title: 名称
          type: string
      required:
        - id
        - name
      title: DomainTagResponse
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: 位置
          type: array
        msg:
          title: 消息
          type: string
        type:
          title: 错误类型
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    PublicBearerAuth:
      bearerFormat: JWT or Hybridbox Service account token
      description: >-
        Public API bearer credential sent as `Authorization: Bearer <token>`.
        Use either an OAuth access token or a Hybridbox Service account token.
      scheme: bearer
      type: http

````