Leave

[POST] .../v1/chat/leave

Deletes the current user from a regular group chat. Use this method when the current request user leaves a regular group chat or channel from the chat UI. The request body is required and id must contain the target chat UUID; the method removes only the current user membership and does not delete other participants or the chat record. Access is scoped to the current user as a participant and the operation is a destructive membership change that returns row_affected and the affected chat id when the leave succeeds. Missing body, missing id, non-member access, missing chat, unsupported chat type, last required staff restrictions and database failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
id String Required Chat UUID.

Request Example

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

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"
    ]
  }
}