# 更新规则过期时间 (/zh-CN/api-reference/api-ref/rtc/update-ban-expiration)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

更新指定封禁用户权限规则的过期时间。

- OpenAPI: /openapi/rtc/channel-management.zh-CN.yaml
- Operation ID: put-dev-v1-kicking-rule
- Method: PUT
- Path: /dev/v1/kicking-rule
- Endpoint: https://api.sd-rtn.com/dev/v1/kicking-rule

## Servers

- https://api.sd-rtn.com

## Authorization

This endpoint requires authentication.

- `Basic Auth`

## Parameters

- `Content-Type` (header, optional, string) - `application/json`。表示所有请求和响应内容的格式均为 JSON。

## Request body

- `appid` (string, required) - 项目的 App ID。可通过以下方式获取：
- 从声网控制台获取。
- 调用[获取所有项目信息 API](/zh-CN/api-reference/api-ref/console/list-projects)，并读取响应包体中 `vendor_key` 字段的值。
- `id` (number, required) - 规则 ID。
- `time` (number) - 封禁时间，单位为分钟，取值范围为 [1,1440]。

**注意：**
- 当设置的值在 `0` 到 `1` 之间时，服务端自动改设为 `1`。
- 当设置的值大于 `1440` 时，服务端自动改设为 `1440`。
- `time` 和 `time_in_seconds` 两个参数只需设置其中的一个。如果同时设置，则 `time_in_seconds` 生效；如果都不设置，服务端会自动将封禁时间设为 60 分钟，即 3600 秒。
- `time_in_seconds` (number) - 封禁时间，单位为秒，取值范围为 [10,86430]。

**注意：**
- 当设置的值在 `0` 到 `10` 之间，服务端自动改设为 `10`。
- 当设置的值大于 `86430` 时，服务端自动改设为 `86430`。
- `time` 和 `time_in_seconds` 两个参数只需设置其中的一个。如果同时设置，则 `time_in_seconds` 生效；如果都不设置，服务端会自动将封禁时间设为 60 分钟，即 3600 秒。

### Request body example

```json
{
  "appid": "4855xxxxxxxxxxxxxxxxxxxxxxxxeae2",
  "id": 1953,
  "time": 60
}
```

## Responses

### 200

如果状态码为 200，则请求成功。

- `status` (string) - 本次请求的状态。`success` 表示请求成功。
- `result` (object) - 请求结果。
  - `result.id` (number) - 规则 ID。
  - `result.ts` (string) - 该规则的过期时间（UTC 时间）。
### 非 200

如果状态码不为 200，则请求失败。你可以参考[响应状态码](/zh-CN/realtime-media/rtc/reference/response-code)排查问题。

No schema.

## Response examples

### 200

```json
{
  "status": "success",
  "result": {
    "id": 1953,
    "ts": "2018-01-09T08:45:54.545Z"
  }
}
```
