Conversation / Clear

In the Ozeki Chat Client, the Conversation/Clear API request serves as a crucial tool for users to manage conversation content by clearing all messages within a specific conversation. This action, initiated through the conversation clear action, effectively resets the conversation, removing all previous messages and providing a clean slate for future interactions. Upon successful execution, the API returns the cleared conversation, confirming the operation's completion and ensuring clarity in the chat environment.

Clear request

Method: POST
URL: ?srv=chatserver&api=chatconversation
Request headers: Content-Type: application/json Ozeki-Signature: signature Ozeki-Station: stationId Ozeki-User: userId
POST data:
{
  "action": "clear",
  "conversationid": "8ca16186c36a4e0a1ef2096e6c60b613",
  "instance": "PqjfKSn7V8",
  "clientversioncode": 3,
  "timestamp": "2024-03-08 15:27:02"
}

Clear response

Response headers Content-Type: application/json
Response data:
{
  "status": "OK",
  "errormessage": "",
  "conversation": {
    "id": "8ca16186c36a4e0a1ef2096e6c60b613",
    "isgroup": false,
    "participantids": [
      "aa68d2204cb2bb85f2de3b9aad0d86d7",
      "d574638619cbff603bf857164c47e850"
    ],
    "participants": [
      {
        "userid": "aa68d2204cb2bb85f2de3b9aad0d86d7",
        "username": "Alice"
      },
      {
        "userid": "d574638619cbff603bf857164c47e850",
        "username": "Administrator"
      }
    ],
    "displayname": "iuj...eHw==",
    "lastmessageid": "",
    "lastreportid": "",
    "lastaccess": 1709907168,
    "secret": "C7Z...srA==",
    "instance": "ZTZqIV8LS5",
    "mutedby": [],
    "favoriteby": [],
    "hiddenby": [],
    "properties": [
      {
        "userid": "aa68d2204cb2bb85f2de3b9aad0d86d7",
        "ismuted": false,
        "isfavorite": false,
        "hideid": "",
        "listitembackgroundcolor": "#ffffff"
      }
    ]
  }
}

More information