Skip to main content

Update expiration time

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.

Request header

  • Content-Type: application/json
  • The request header must contain the Authorization field. For details, see RESTful authentication.

Request body

APPLICATION/JSON
BODYrequired
  • appid stringrequired

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

  • id numberrequired

    The ID of the rule to update.

  • time numbernullable

    Range: [1, 1440]

    The time duration (in minutes) to ban the user. Values outside the range [1,1440] are clamped to the nearest bound. Setting this to 0 disables the rule: users are set offline but can rejoin immediately.

    info

    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_seconds numbernullable

    Range: [10, 86430]

    The time duration (in seconds) to ban the user. Values outside the range [10,86430] are clamped to the nearest bound. Setting this to 0 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:

OK
  • status string

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

  • result object

    The result of the update.

    Show propertiesHide properties
    • id number

      The rule ID.

    • ts string

      The UTC time when the rule expires.

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.

Authorization

This endpoint requires Basic authentication.

Request example

Test this request in Postman or use one of the following code examples:


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

Response example


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