You can use the delete company membership API to remove a user from a company. Before you can delete the membership, you must first remove all of the user's application assignments and cancel all of their subscriptions or transfer them to another company membership.
When all company memberships are removed from a user account, the user account is deleted.
Use the following DELETE request to delete a company membership.
DELETE https://{marketplaceUrl}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}
Refer to the Delete company membership API reference guide for details on authorization rules and the full list of supported request body and query parameters.