Start here. This is the direct spoken answer to practice first.
Why this question matters
Membership APIs look like ordinary CRUD, but they control who can access customer data. The design needs a clear permission boundary and safe handling for the last owner, removed users, and role changes.
I would model users separately from memberships. A membership belongs to an account or tenant and contains role, status, timestamps, and who created or changed it. APIs for add, remove, activate, deactivate, and change role would check the actor's capabilities inside the same tenant. Removing a member disables future access to tenant resources while preserving historical ownership and audit records.