Audience:
User deactivation
In certain circumstances, you might want to deactivate a user. When a user is deactivated successfully, the phone number associated with their Swan user object can be used for a new user.
Requirements
All of the following conditions must be met:
- All the user's account memberships are disabled.
- The user isn't the legal representative for any account.
- The user doesn't have a team membership to any of your projects.
- Go to Dashboard > your profile > Team management to confirm the user isn't a team member.
If all conditions are met, the user can be deactivated. When a user is deactivated, all user access tokens and refresh tokens associated with the deactivated user are revoked and can no longer be used.
Rejections
If conditions aren't met, there are three possible rejection reasons:
UserCannotBeDeactivatedRejection: one or more of the requirements aren't met.UserAlreadyDeactivatedRejection: the user associated with this user ID was already deactivated.UserNotFoundRejection: the user associated with this user ID wasn't found in the system.
Learn how to deactivate a user from the Dashboard or with the API. You can also submit a request to Swan Support.
To get a notification when a user is deactivated, subscribe to the User.Deactivated webhook.