Remove user from organization
POST/users/:id/remove-from-organization/
Detach a member from the organization — not an account deletion.
The account, its username and login history survive; only their
membership, roles and API access are revoked. Token/UserRole FKs
to User are CASCADE, so unlike removing project/pipeline/etc.
ownership (SET_NULL — see step 5), these must be dropped explicitly
or they'd be destroyed outright rather than merely detached.
Also deactivates the account: without this, a detached user keeps a
live, active row and could still authenticate or request a password
reset despite belonging to no organization. detached_at marks the
account as recoverable — re-inviting the same email re-attaches this
same row (see InvitationAcceptAPIView) instead of blocking or
creating a duplicate.
Request
Responses
- 200