Skip to main content

Remove channels from a tag

Remove one or more channels from a specified tag. This only removes the channel-tag association; the channels and the tag itself are not deleted.

tip
  • Max 100 channels per request.
  • Removed channels still exist; they are simply no longer associated with this tag.
  • Supported channel types: 1 (Direct channel), 3 (Group channel), 6 (System channel).

Request

POST: https://[Base URL](/platform-chat-api/base-url)/v4/channel/tag/remove

Rate limit: 100 per second

Signature: Required. See API request signature.

Request body

Content type: application/json

ParameterTypeRequiredDescription
userIdStringYesThe user ID.
tagIdStringYesTag ID.
channelsObject[]YesChannel list. Max 100 per request.
channels[].channelIdStringYesTarget ID. Depending on the channel type, this is the other user's ID, group ID, or system target ID.
channels[].channelTypeNumberYesChannel type. 1 (Direct channel), 3 (Group channel), 6 (System channel).

Request example

HTTP
POST /v4/channel/tag/remove HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"userId": "testUserId",
"tagId": "tag1",
"channels": [
{
"channelId": "user1",
"channelType": 1
},
{
"channelId": "group1",
"channelType": 3
}
]
}

Response

FieldTypeDescription
codeNumberReturn code. 0 indicates success.

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"code":0}