users

Revoke Membership

Remove one company membership from a user (admin).

The subtractive counterpart to PUT /users/{id} — same reasoning as its sibling above: taking one tenant away should not require restating every other one.

Not idempotent, deliberately. Revoking a membership that does not exist answers 404, not 204. Access removal is the one operation where "it already looked done" and "it is done" must not read the same: an operator revoking the wrong company id, or the right one on the wrong person, needs to be told nothing happened.

{company_id} in the path puts this route inside the support-session confinement sweep (test_support_session_confinement_gate.py). It satisfies it through ScopedDep, and its real refusal is require_admin's deny_support_session: a confined operator has no business editing platform memberships at all. Do not move this handler off ScopedDep.

delete/users/{user_id}/memberships/{company_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}/memberships/{company_id}
  • Auth: none declared

Path parameters

user_idstring required
company_idstring required

Headers

authorizationstring nullable

Cookies

access_tokenstring nullable

Response

Successful Response

invite_mail_attemptedboolean nullable

Changes

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