Any construction of more than 5m2 is by law subject to getting an authorization for building it. It’s the same for building treehouses on ground level or suspended in the trees.
Usually an authorization from the city hall is sufficient for a build no more than 20m2. After that, a building permit is required. However, that law can vary depending on the chosen location of the build.
Finally, it is also permitted to build a treehouse in a listed site as long as it does not negatively impact the surroundings and landscape.
To be successful with your project, it is necessary to contact your city hall in order to know the law regarding building a treehouse and to know your different options best.