Close a Legal User

Permanently close a user account so it can no longer be used. This endpoint allows your platform to close a Mangopay Account, as per Mangopay's terms and conditions, in the event that the agreement between the user and the platform comes to an end. <Warning icon="fa-regular fa-triangle-exclamation"> **Caution – Closure is irreversible** Calling this endpoint immediately and permanently changes the `UserStatus` to `CLOSED` if the API call is successful. This cannot be undone, even by Mangopay. Your platform can re-register the user using [POST Create a Legal User (SCA)](/api-reference/users/create-legal-user-sca). </Warning> Closure is only possible if all wallets held by the user are empty. Closure is allowed for both `UserCategory` `OWNER` and `PAYER` and for all types of Legal user (Business, Partnership, Organization, Soletrader). When a User is closed (whether via this endpoint or by Mangopay): - The `UserStatus` changes to `CLOSED` (and the `USER_ACCOUNT_CLOSED` [webhook](/webhooks/event-types#account-closure) is sent) - The user has inflows and outflows [blocked](/guides/users/blocked-users) (and the relevant [webhooks](/webhooks/event-types#user-regulatory-status) are sent) - The user object remains available via the API and Dashboard for historical purposes Closing a user account does not affect Mangopay's data retention obligations or processes. Personal data associated with the closed account will be retained in accordance with Mangopay's data retention policies. <Note icon="fa-regular fa-circle-info"> **Note – Do not overuse OAuth token endpoint if automating calls** If you are writing a script to close a set of users, ensure you do not call the OAuth token endpoint before each DELETE call. You must use your authentication for the full duration of its lifetime, as described in the [authentication](/api-reference/overview/authentication#2-use-the-bearer-token-for-its-full-lifetime) guide. Overuse of the OAuth token endpoint is a security and performance risk and may result in preventative action from Mangopay. </Note>