Change subchannel type
Change the type of a community channel subchannel. A subchannel can be switched between public and private at any time.
- Private to public: The subchannel becomes open to all community channel members. The private member list is retained but no longer enforced. If the subchannel is later switched back to private, the existing member list is re-activated.
- Public to private: The subchannel becomes accessible only to users on the private subchannel member list.
Changing the subchannel type affects access permissions for historical messages. See Private subchannel overview for details.
Request method
POST: https://Base URL/v4/community-channel/subchannel-type/update
Rate limit: 100 requests per second
Signature required: All server API requests require signature verification. See API request signature.
Request body
The request body is in application/json format and supports the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | The community channel ID. |
subchannelId | String | Yes | The subchannel ID. |
channelVisibility | Number | Yes | Subchannel type. 0 = public. 1 = private. |
Request example
HTTP
POST /v4/community-channel/subchannel-type/update HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"channelId": "abc",
"subchannelId": "channel001",
"channelVisibility": 0
}
Response
The response body contains a JSON object with the following structure:
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"code":0}