users

Delete User

Delete a user (admin). Refused while they still pay for a company (PRE-02).

The FK is ON DELETE RESTRICT precisely so this cannot silently unmeter their companies — but a bare integrity error surfaces as a 500 and tells the caller nothing. This checks first and names the remedy: transfer the payer, then delete. The count is safe to disclose here because this route is require_admin and already refuses a company-scoped key outright (ZET-176).

Also 409 for yourself (:func:_refuse_self_removal) and for the last active administrator (:func:_guard_last_admin).

Audited before the row goes: afterwards there is nothing left to name.

delete/users/{user_id}

Request

  • Base URL: https://app.zeno-works.ch (the document declares no server; this is the origin it was published from)
  • URL: https://app.zeno-works.ch/users/{user_id}
  • Auth: none declared

Path parameters

user_idstring required

Headers

authorizationstring nullable

Cookies

access_tokenstring nullable

Response

Successful Response

msgstring required

Changes

No recorded changes to this operation across all 1 revision of this API.