# Delete a banning rule (/en/api-reference/api-ref/rtc/delete-ban-rule)

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

Deletes a specified banning rule.

- OpenAPI: /openapi/rtc/channel-management.en.yaml
- Operation ID: cma-delete-ban-rule
- Method: DELETE
- Path: /dev/v1/kicking-rule
- Endpoint: https://api.agora.io/dev/v1/kicking-rule

## Servers

- https://api.agora.io

Use this endpoint to delete a specified banning rule.


## Authorization

This endpoint requires authentication.

- `basicAuth`

## Parameters

No parameters.

### 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](/en/api-reference/api-ref/rtc/authentication).


## Request body

- `appid` (string, required) - The App ID of the project. You can get it through one of the following methods:
- Copy from the [Agora Console](https://console.agora.io)
- Call the Get all projects API, and read the value of the
  `vendor_key` field in the response body.
- `id` (number, required) - The ID of the rule to delete.

### Request body example

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

## Request examples

### curl

```bash
curl --request DELETE \
  --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
}'
```

### Node.js

```javascript
const https = require('https');

const options = {
  method: 'DELETE',
  hostname: 'api.sd-rtn.com',
  port: null,
  path: '/dev/v1/kicking-rule',
  headers: {
    Authorization: 'Basic <your_base64_encoded_credentials>',
    'Content-Type': 'application/json',
    Accept: 'application/json'
  }
};

const req = https.request(options, function (res) {
  const chunks = [];
  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  appid: '4855xxxxxxxxxxxxxxxxxxxxxxxxeae2',
  id: 1953
}));
req.end();
```

### Python

```python
import http.client
import json

conn = http.client.HTTPSConnection("api.sd-rtn.com")

payload = {
    "appid": "4855xxxxxxxxxxxxxxxxxxxxxxxxeae2",
    "id": 1953
}

headers = {
    'Authorization': "Basic <your_base64_encoded_credentials>",
    'Content-Type': "application/json",
    'Accept': "application/json"
}

conn.request("DELETE", "/dev/v1/kicking-rule", json.dumps(payload), headers)

res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```


### 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](/en/api-reference/api-ref/rtc/response-status-codes) for details.


## Responses

### 200

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

- `status` (string) - The status of this request. `success` means the request succeeds.
- `id` (number) - The ID of the deleted rule.
### default

The request failed. See the `message` field in the response body for the reason. Refer to Response status codes for details.

No schema.

## Response examples

### 200

```json
{
  "status": "success",
  "id": 1953
}
```
