Ban Rules (kicking-rule)
Agora-compatible kicking rules and their lifecycle.
Group overview
Generated at build time from the public REST API definition: tag ban-rules, 4 operations (out of 189). For authentication, envelope and pagination conventions see REST API overview.
| Method | Path | Summary |
|---|---|---|
GET | /v1/ban-rules | List kicking rules |
POST | /v1/ban-rules | Create a kicking rule |
PATCH | /v1/ban-rules/{id} | Update a kicking rule |
DELETE | /v1/ban-rules/{id} | Delete a kicking rule |
Operation details
GET /v1/ban-rules
List kicking rules
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
channelName | query | string | ||
uid | query | integer |
Response
| Status codes | Description / schema |
|---|---|
200 | rules — object{ total, rules } |
Example call
curl -s -X GET "$NIMEET_API_BASE/v1/ban-rules?channelName=weekly-sync&uid=10001" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"POST /v1/ban-rules
Create a kicking rule
Authentication: project credentials (Base64 of customerId:customerSecret)
Request body
| Field | Type | Required | Description |
|---|---|---|---|
channelName | string | ||
uid | integer | ||
ip | string | ||
privileges | array<enum(join_channel | publish_audio | publish_video)> | ||
durationSeconds | integer | default 3600 |
{
"channelName": "weekly-sync",
"uid": 10001,
"privileges": [
"join_channel"
],
"durationSeconds": 600
}Response
| Status codes | Description / schema |
|---|---|
201 | created — BanRule |
Example call
curl -s -X POST "$NIMEET_API_BASE/v1/ban-rules" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"channelName":"weekly-sync","uid":10001,"privileges":["join_channel"],"durationSeconds":600}'PATCH /v1/ban-rules/{id}
Update a kicking rule
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
id | path | is | string | length 0..128 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
durationSeconds | integer | ||
privileges | array<string> |
{
"durationSeconds": 120,
"privileges": [
"join_channel"
]
}Response
| Status codes | Description / schema |
|---|---|
200 | the updated kicking rule — BanRule |
400 | Invalid parameter — Error |
404 | Resource not found — Error |
Example call
curl -s -X PATCH "$NIMEET_API_BASE/v1/ban-rules/weekly-sync_1a2b" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"durationSeconds":120,"privileges":["join_channel"]}'DELETE /v1/ban-rules/{id}
Delete a kicking rule
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
id | path | is | string | length 0..128 |
Response
| Status codes | Description / schema |
|---|---|
204 | deleted |
404 | Resource not found — Error |
Example call
curl -s -X DELETE "$NIMEET_API_BASE/v1/ban-rules/weekly-sync_1a2b" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"Schemas used by this group
BanRule — object
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | ||
channelName | string | null | ||
uid | integer | null | ||
ip | string | null | ||
privileges | array<enum(join_channel | publish_audio | publish_video)> | ||
expireAt | string | null | format date-time | |
createdAt | string | format date-time |
Error — object{ code, message, reason, sdkCode, details }
| Field | Type | Required | Description |
|---|---|---|---|
code | string | is | stable machine code, see errors.json |
message | string | is | |
reason | string | ||
sdkCode | integer | Agora-aligned client error number | |
details | object |