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

# 列出域名

> 列出你所有应用程序中配置的全部主机名，包括默认的 squareweb.app 子域名以及任何已绑定的自定义域名。速率限制为每 60 秒 20 次请求。

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  你账户的 API 密钥。你可以在[账户设置](https://squarecloud.app/zh/account/security)中找到它。
</ParamField>

<Note>
  此 endpoint 接受在 `Authorization` 请求头中传入你的 API 密钥或会话令牌（JWT）。必须进行身份验证，未携带身份验证的请求将返回 `401`。
</Note>

### 响应

<ResponseField name="status" type="string">
  指示调用是否成功。成功时为 `success`，否则为 `error`。
</ResponseField>

`response` 数组是你拥有的所有应用程序中每个主机名的扁平化列表。自定义域名排在前面，随后是默认的 `*.squareweb.app` 子域名。没有 Web 域名的应用程序（例如 worker 和机器人）将被省略。

<Info>
  此列表从缓存的项目列表中提供，因此它**不**计入每个应用程序的网络速率限制。
</Info>

<ResponseField name="response" type="array">
  主机名列表。

  <Expandable title="切换对象">
    <ResponseField name="app_id" type="string">
      拥有该域名的应用程序的 24 位十六进制标识符。
    </ResponseField>

    <ResponseField name="hostname" type="string">
      完全限定的主机名。
    </ResponseField>

    <ResponseField name="type" type="string">
      默认的 `*.squareweb.app` 主机为 `"subdomain"`；已绑定的自定义域名为 `"custom"`。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "status": "success",
    "response": [
      { "app_id": "abc123def456abc123def456", "hostname": "example.com", "type": "custom" },
      { "app_id": "abc123def456abc123def456", "hostname": "my-app.squareweb.app", "type": "subdomain" }
    ]
  }
  ```
</ResponseExample>
