DELETE /users-by-email/{email} – Deletes a user account by email address.

  • This endpoint is only available for Auth0.
  • Email addresses are case-insensitive for lookup.
  • This is a permanent deletion operation and cannot be undone.
  • Authentication is required via Bearer token with elevated privileges.
  • Associated data will also be deleted:
    • User profile information
    • Authentication methods
    • MFA enrollments
    • Group memberships
    • Role assignments
    • Access tokens and refresh tokens
  • Consider implementing a soft delete if data retention is required.

Headers:

  • Authorization: Bearer <access_token> (required)
  • Content-Type: application/json or application/x-www-form-urlencoded (required)

Body:

  • provider: The authentication provider (optional). Defaults to auth0-user.
  • accountProvider: The account provider to filter by (optional).
  • connection: The connection name to filter by (optional).

Path Parameters:

  • email: The email of the user to delete. (required)

Query Parameters:

  • None

  • 204 No Content – Indicates successful deletion with no content returned.

Status Code Meaning When it Happens
400 Bad Request Missing or invalid parameters
401 Unauthorized Missing or invalid authentication token
403 Forbidden Insufficient permissions to delete user
404 Not Found User not found
500 Internal Server Error Unexpected error during user deletion
{
"error": "Detailed error message here"
}

DELETE /users-by-email/user@district.com
{
"provider": "auth0-user",
"accountProvider": "account_abc",
"connection": "conn_xyz"
}
{}

  • Parameters

    • event: APIGatewayProxyEvent

      The API Gateway event containing the request.

    • context: Context
    • callback: Callback<APIGatewayProxyResult>

    Returns void | Promise<APIGatewayProxyResult>

    A Promise resolving to an API Gateway-compatible response.