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

# 注册开关设置

> 管理员开启或关闭咏唱引擎 ROUTER 的自助注册。

管理员用注册开关控制实例是否允许自助注册。调用需要管理员权限。

## 接口

```http theme={null}
PUT /v1/router/settings/allow_register
```

## 认证

用会话 Cookie 或 `Authorization: Bearer <api-key>` 认证，调用者必须是管理员。

## 请求体

<ParamField body="allow_register" type="boolean" required>
  是否开放自助注册。
</ParamField>

## 响应

<ResponseField name="ok" type="boolean">
  操作是否成功。
</ResponseField>

<ResponseField name="allow_register" type="boolean">
  更新后的开关状态。
</ResponseField>

## 示例

```bash theme={null}
curl -X PUT https://router.example.com/v1/router/settings/allow_register \
  -H "Authorization: Bearer <api-key>" \
  -d '{"allow_register": true}'
```

```json theme={null}
{ "ok": true, "allow_register": true }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.