Update the expiration time of a banning rule

Updated

Updates the expiration time of a specified banning rule.

PUT
https://api.agora.io/dev/v1/kicking-rule

Use this endpoint to update the expiration time of a specified banning rule.

Request

  • The request URL and request body is case-sensitive. All requests must use HTTPS.

  • Content-Type: application/json

  • The request header must contain the Authorization field. For details, see RESTful authentication.

Request Body

application/json

appidstring
Required

The App ID of the project. You can get it through one of the following methods:

  • Copy from the Agora Console
  • Call the Get all projects API, and read the value of the vendor_key field in the response body.
idnumber
Required

The ID of the rule to update.

timenumber

The time duration (in minutes) to ban the user. Valid duration values are [1,1440]. Values outside this range are clamped to the nearest bound, except 0, which is a special value that disables the rule: users are set offline but can rejoin immediately.

Note

Use either time or time_in_seconds, not both. If both are set, time_in_seconds takes effect. If neither is set, the default ban duration is 60 minutes (3600 seconds).

time_in_secondsnumber

The time duration (in seconds) to ban the user. Valid duration values are [10,86430]. Values outside this range are clamped to the nearest bound, except 0, which is a special value that disables the rule: users are set offline but can rejoin immediately.

Response

  • A 200 status code indicates success. The response body contains the following parameters:

  • If the status code is not 200, the request fails. See the message field in the response body for the reason for this failure. Refer to Response status codes for details.

Response Body

A 200 status code indicates success. The response body contains the result of the request.

statusstring

The status of this request. success means the request succeeds.

resultobject

The result of the update.

Authorization

This endpoint requires authentication.

basicAuth

Request examples

curl --request PUT \  --url https://api.sd-rtn.com/dev/v1/kicking-rule \  --header 'Accept: application/json' \  --header 'Authorization: Basic <your_base64_encoded_credentials>' \  --header 'Content-Type: application/json' \  --data '{  "appid": "4855xxxxxxxxxxxxxxxxxxxxxxxxeae2",  "id": 1953,  "time": 60}'

Response example

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