logo
In-app Chat
On this page

Delete a conversation


Overview

You can use this API to delete a conversation on the server side.

Request method and endpoint

  • Request method: POST
  • Request endpoint: https://zim-api.zego.im/?Action=DeleteConv
  • Protocol: HTTPS
  • QPS limit: 20 requests/second

Request parameters

The following list only shows the request parameters for this interface and some public parameters. For a complete list of public parameters, please refer to Accessing Server APIs - Public parameters.

ParameterTypeRequiredDescription
FromUserIdStringYes
  • For one-to-one conversation: Enter the UserId of one conversation user.
  • For group conversation: Enter the UserId of one group member.
ConvIdStringYes
  • For one-to-one conversation: Enter the UserId of the other conversation user.
  • For group conversation: Enter the GroupId of the group conversation.
ConvTypeConvTypeYesConversation type:
  • 0: One-to-one conversation.
  • 2: Group conversation.

Sample request

  • Request URL:

    Untitled
    https://zim-api.zego.im/?Action=DeleteConv
    &<Common request parameters>
    
    1
    Copied!
  • Request body:

    Untitled
    {
        "ConvId": "userB",
        "ConvType": 0,
        "FromUserId": "userA"   
    }
    
    1
    Copied!

Response parameters

ParameterTypeDescription
CodeNumberReturn code.
MessageStringDescription of the request result.
RequestIdStringRequest ID.

Sample response

Untitled
{
    "Code": 0,
    "Message": "success",
    "RequestId": "343649807833778782"
}
1
Copied!

Return codes

The following list only shows the return codes related to the business logic of the interface. For a complete list of return codes, please refer to Return codes.

Return CodeDescriptionSolution
660000002Invalid parameter.The parameter entered is missing or invalid. Please check the parameters.

Previous

Clear the unread message count of a conversation

Next

Register Bots