Cap Collectif Developers - GraphQL API

Anonymize a user's account by email

To use this mutation you must be authenticated as an administrator. Check the authentication guide for more details.

This mutation can be used with an SSO to anonymize user accounts.

The following mutation anonymizes the account associated with [email protected] while preserving its associated content:


mutation anonymizeAccountByEmail {
  anonymizeAccountByEmail(input: {email: "[email protected]"}) {
    email
    errorCode
  }
}

The email argument must be the valid email of an existing user who does not have the role ROLE_SUPER_ADMIN.

You must have at least the role ROLE_ADMIN to anonymize a user account.

If the email does not exist, the mutation does nothing and returns an error code:

{
  "data": {
    "anonymizeAccountByEmail": {
      "email": null,
      "errorCode": "NON_EXISTING_EMAIL"
    }
  }
}

Check the associated reference for more details.