Remove a member (admin only) — they become a former member
DELETE/api/users/:userId
ADMIN-ONLY. The seat is NOT deleted (doc 100): it becomes a former member (status removed) so messages, notes and calls keep their author, while sign-in, tokens, devices, permissions, departments, routing and the seat on the plan all go, and the workspace leaves the account's switcher. The owner and the last active admin are protected (422). mailbox_action decides the member's personal mailbox: archive (default — switched off and sealed: nobody sees it, admins included, until the workspace owner hands it over or deletes it), hand_over (to mailbox_target_user_id, an active member without a mailbox; 422 on that field otherwise), or delete (the mailbox and its conversations; the real mailbox at the provider is untouched). A former member is never route-bound, so a second DELETE is 404.
Request
Responses
- 204
- 401
- 403
- 404
- 422
Member removed.
Not authenticated. code: account_disabled means the member's seat was deactivated in this workspace: the session is over even though the token was not revoked (clients sign out and clean up).
Authenticated but not allowed.
Resource not found (or not visible to the current tenant).
The request failed validation.