Cap Collectif Developers - GraphQL API

Delete an user's account by its email

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

This mutation can eventually be used with an SSO to remove users accounts.

The following mutation remove the user's account which the email is [email protected] :


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

Value of email argument must be a 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 delete an user account.

If the user's email passed in parameters does not exist, the mutation does nothing and an error code which specify the reason of the error is returned :

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

Check the associated reference for more details.