SetArchived

[POST] .../v1/chat/setarchived

Changes the archived flag for the current user in a chat. Use this method when the current request user archives or restores one chat in their personal chat list. The request body is required, id must contain the chat UUID and archived determines whether the chat is hidden in the user's normal list. Access is scoped to the current user's chat visibility and the method changes only that user's archived state. Missing body, missing id, inaccessible chat, invalid current-user scope, database failures and user state storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
archived Boolean Required true - move to archive, false - restore from archive.
id String Required Chat UUID.

Request Example

{
  "id": "8cdd646d-dbd0-45c0-8f5b-d90a9b000001",
  "archived": true
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1,
    "ids": [
      "8cdd646d-dbd0-45c0-8f5b-d90a9b000001"
    ]
  }
}