> ## 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/users/{id}/disabled
```

### 认证

需要管理员角色。发送会话 Cookie 或携带 `Authorization: Bearer <api-key>`。

### 路径参数

<ParamField path="id" type="string" required>
  要更新的用户的唯一标识符。
</ParamField>

### 请求体

<ParamField body="disabled" type="boolean" required>
  设为 `true` 以禁用账户，或 `false` 以启用。
</ParamField>

### 响应

更新成功返回 `200 OK`，无响应体。

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://router.example.com:8080/v1/router/users/user-abc123/disabled \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <admin-api-key>" \
    -d '{"disabled":true}'
  ```
</RequestExample>

<ResponseExample>
  ```text 200 theme={null}
  (No response body)
  ```
</ResponseExample>

## 更新用户邮箱

更改与另一个用户账户关联的邮箱地址。

### 接口

```http theme={null}
PUT /v1/router/users/{id}/email
```

### 认证

需要管理员角色。发送会话 Cookie 或携带 `Authorization: Bearer <api-key>`。

### 路径参数

<ParamField path="id" type="string" required>
  要更新的用户的唯一标识符。
</ParamField>

### 请求体

<ParamField body="email" type="string" required>
  要为用户设置的邮箱地址。
</ParamField>

### 响应

更新成功返回 `200 OK`，无响应体。

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://router.example.com:8080/v1/router/users/user-abc123/email \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <admin-api-key>" \
    -d '{"email":"updated@example.com"}'
  ```
</RequestExample>

<ResponseExample>
  ```text 200 theme={null}
  (No response body)
  ```
</ResponseExample>
