logo
In-app Chat
ZIMAudio
On this page

SilenceConvNotification

POST

https://zim-api.zego.im/

By calling this API, you can batch set the mute notification status for one-on-one or group conversations. After setting to mute, the ZIM SDK will not push message notifications for related conversations to users, and the user's "total unread message count" will not increase.

By default, users can set up to 500 one-on-one conversations to mute. If you need to increase this limit, please contact ZEGOCLOUD Technical Support. The maximum can be 1000.

The mute limit for group conversations is the upper limit of the number of groups each user can join.

The client will receive changes in the mute notification status of conversations through the following ZIM SDK callback:

iOSAndroidmacOSWindows
conversationChangedonConversationChangedconversationChangedonConversationChanged
WebMini ProgramFlutterReact Native
conversationChangedconversationChangedonConversationChangedconversationChanged
Unity3Duni-app | uni-app xHarmonyOS
OnConversationChangedconversationChangedconversationChanged
Note
The parameter FromUserId only supports numbers, English characters, and {'!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', ' ', '{', '}', '|', '~'}.
QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [SilenceConvNotification]

    API prototype parameter

    https://zim-api.zego.im/?Action=SilenceConvNotification

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Public parameter. A 16-character hexadecimal random string (hex encoding of 8-byte random number). Refer to Signature example for how to generate.

    Timestamp int64required

    💡Public parameter. Current Unix timestamp, in seconds. Refer to Signature example for how to generate, with a maximum error of 10 minutes.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    Signature stringrequired

    💡Public parameter. Signature, used to verify the legitimacy of the request. Refer to Signing the requests for how to generate an API request signature.

Body

required
    FromUserId stringrequired

    Possible values: <= 32 characters

    Request to set the mute notification status for conversations of this UserID (who has logged in to the ZIM service by calling the login method on the client, or has completed registration by calling the server-side API).

    ConvType numberrequired

    Possible values: [0, 2]

    Conversation type:

    • 0: One-on-one conversation.
    • 2: Group conversation.
    ConvIds string[]required

    Possible values: <= 10

    List of conversation IDs to set mute status, with a maximum length of 10.

    • One-on-one conversation: Conversation ID is the user ID.
    • Group conversation: Conversation ID is the group ID.

    Note

    The conversation types in this list must be consistent, otherwise the API call will fail.

    Enable booleanrequired

    Whether to mute:

    • true: Enable mute.
    • false: Disable mute.

Responses

OK
Schema
    Code number

    Return code.

    The following only lists the Code and SubCode related to the API business logic. For the complete return codes, please refer to Return codes.

    Note

    When you request to modify the mute status of multiple conversations:

    • As long as the status of 1 or more conversations is successfully modified, Code will return 0, indicating success. In this case, please refer to the specific information in ErrorList to understand the details of failed conversation status modifications.
    • If the status of all conversations fails to be modified, Code will return the relevant return code. For details, please refer to Return codes.
    Code / SubCodeDescriptionSuggested Solution
    660000001General business error.Please retry or contact ZEGOCLOUD Technical Support.
    660000002Input parameter error.Please check the input parameters.
    660300005The API call frequency exceeds the AppID-level limit.Please try again later.
    660500002FromUserId is not registered.Please register FromUserId first.
    660600001Group does not exist.Please confirm if the entered GroupId is correct.
    660600009Failed to get group-related information.Please confirm if the GroupID is correct first. If correct, please contact ZEGOCLOUD Technical Support.
    660600024FromUserId is not in the target group.Please join the group first.
    660700015
    • If this error code is code, it means all peer users of one-on-one conversations are not registered.
    • If this error code is subCode, it means the peer user of the one-on-one conversation corresponding to ConvID is not registered.
    Please register the peer user first.
    660800030The user's mute list exceeds the length limit, default is 500, can be configured by contacting technical support, maximum can be 1000.Please contact ZEGOCLOUD Technical Support.
    660800051Conversation is already muted, cannot be set to mute again.No action needed.
    660800052Conversation mute has already been canceled, cannot be canceled again.No action needed.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

    ErrorList object[]

    Failure list.

    • When Code is 0:
    • If ErrorList is empty, the mute status of all conversations has been successfully modified.
    • If ErrorList is not empty, it means the mute status modification of some conversations failed. Please refer to SubCode and SubMessage for handling.
    • When Code is not 0:
    • If ErrorList is empty, it indicates parameter error, API frequency limit, or system error.
    • If ErrorList is not empty, it means the mute status modification of all conversations failed.
  • Array[
  • ConvId string

    Conversation ID for which the mute status modification failed.

    • One-on-one conversation: Conversation ID is the user ID.
    • Group conversation: Conversation ID is the group ID.
    SubCode number

    Specific error code for the failed mute status modification. For the complete return codes, please refer to the Code description or Return codes.

    SubMessage string

    Specific error description for the failed mute status modification.

  • ]

Previous

Reject a call invitation

Next

Pin conversations to the top

On this page

Back to top