The Vienna Congress
The great powers (Prussia, Russia, France, Austria and the United Kingdom) wanted to restore the European balance and the old regimes in 1814 and 1815. After the end of the Holy Roman Empire in 1806 (disbanded by Napoleon) and the fall of Napoleon (1813), the continent should not be dominated by one power again.
They created nations around France. In the Langres Agreement (29 January 1814), France was reduced to its borders of 1792 and Switzerland’s independence was guaranteed. The Swiss cantons were deeply divided, as were the great powers.
Russia and Prussia wanted a Swiss Confederation with strong federal powers, while Austria was committed to maintaining the independence of the cantons. The dividing lines in the Swiss cantons ran through the old Untertanengebiete, Catholic and Protestant cantons, supporters of the ancien régime and some other (economic) dividing lines.
On 8 September 1814, the English envoy reached a compromise: independence of the cantons, the abolition of internal customs barriers and aristocratic privileges and establishment of some federal institutions.
Prussia got Neuchâtel back, but Neuchâtel also joined the Confederation. Geneva and Wallis joined the Confederation, and on 7 August 1815, an agreement was signed by twenty-two cantons.
This constitution remained in force until 1848. Switzerland’s neutrality was guaranteed as early as 20 March 1815 and its external borders have remained unchanged, although the boundaries of cantons have sometimes been and are being adjusted and in 1979 a new canton (Jura) was recognised in the Constitution. (Source: Thierry Lentz, 1815. The Congress of Vienna and the New Foundation of Europe, Munich 2014).