> ## Documentation Index
> Fetch the complete documentation index at: https://wukong.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove Channel Subscribers

> Remove subscribers (members) from a channel

## Overview

Remove subscribers (members) from a channel, supporting batch removal operations.

## Request Body

### Required Parameters

<ParamField body="channel_id" type="string" required>
  Channel ID
</ParamField>

<ParamField body="channel_type" type="integer" required>
  Channel type

  * `1` - Personal channel
  * `2` - Group channel
</ParamField>

<ParamField body="subscribers" type="array" required>
  List of subscriber user IDs to remove

  <ParamField body="subscribers[]" type="string">
    User ID
  </ParamField>
</ParamField>

### Optional Parameters

<ParamField body="temp_subscriber" type="integer" default={0}>
  Whether as temporary subscriber

  * `0` - Permanent subscriber
  * `1` - Temporary subscriber
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "http://localhost:5001/channel/subscriber_remove" \
    -H "Content-Type: application/json" \
    -d '{
      "channel_id": "group123",
      "channel_type": 2,
      "subscribers": ["user4", "user5"],
      "temp_subscriber": 0
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('http://localhost:5001/channel/subscriber_remove', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      channel_id: 'group123',
      channel_type: 2,
      subscribers: ['user4', 'user5'],
      temp_subscriber: 0
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  data = {
      "channel_id": "group123",
      "channel_type": 2,
      "subscribers": ["user4", "user5"],
      "temp_subscriber": 0
  }

  response = requests.post('http://localhost:5001/channel/subscriber_remove', json=data)
  result = response.json()
  print(result)
  ```

  ```go Go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "fmt"
      "net/http"
  )

  func main() {
      data := map[string]interface{}{
          "channel_id":      "group123",
          "channel_type":    2,
          "subscribers":     []string{"user4", "user5"},
          "temp_subscriber": 0,
      }
      
      jsonData, _ := json.Marshal(data)
      
      resp, err := http.Post(
          "http://localhost:5001/channel/subscriber_remove",
          "application/json",
          bytes.NewBuffer(jsonData),
      )
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()
      
      var result map[string]interface{}
      json.NewDecoder(resp.Body).Decode(&result)
      fmt.Printf("%+v\n", result)
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": "ok"
  }
  ```
</ResponseExample>

## Response Fields

<ResponseField name="status" type="string" required>
  Operation status, returns `"ok"` on success
</ResponseField>

## Status Codes

| Status Code | Description                                   |
| ----------- | --------------------------------------------- |
| 200         | Subscribers removed successfully              |
| 400         | Request parameter error                       |
| 403         | No operation permission                       |
| 404         | Channel does not exist or user not in channel |
| 500         | Internal server error                         |

## Parameter Description

### Temporary Subscriber (temp\_subscriber)

| Value | Type                 | Description             | Impact                                |
| ----- | -------------------- | ----------------------- | ------------------------------------- |
| 0     | Permanent subscriber | Remove official member  | Completely remove member relationship |
| 1     | Temporary subscriber | Remove temporary member | Remove temporary access permission    |

## Use Cases

### Group Management

* **Kick members**: Group owner or admin removes violating members
* **Member leaves**: User voluntarily leaves the group
* **Batch cleanup**: Clean up inactive or invalid members
