Skip to main content

Mute a participant

Mute one or more participants in a specific open channel. Muted users can still receive and read messages, but cannot send messages in the channel.

The mute status persists even if the user leaves and rejoins the open channel.

tip

Messages sent via the Platform Chat API are not affected by the mute status. A muted user can still send messages through the server API.

Request

POST: https://[Base URL](/platform-chat-api/base-url)/v4/open-channel/participant/mute-list/add

Rate limit: 100 per second

Signature: Required. See API request signature.

Request body

Content type: application/json

ParameterTypeRequiredDescription
participantIdsArrayYesUser IDs to mute. Maximum 20 per request.
channelIdStringYesThe open channel ID.
durationMinutesNumberYesMute duration in minutes. Maximum: 43,200 (30 days).
extraStringNoJSON-formatted extra data for the notification. Only effective when needNotify is true.
needNotifyBooleanNoWhether to notify participants. Default: false. When true, the client SDK triggers a callback (requires Android/iOS IMLib >= 5.4.5; Web IMLib >= 5.7.9). Notifies all participants in the open channel.

Request example

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

{
"channelId": "16",
"participantIds": ["2583", "2582"],
"durationMinutes": 1
}

Response

FieldTypeDescription
codeNumberReturn code. 0 indicates success.

Response example

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

{"code":0}