On 23 July 1763, there was the Imperial Manifesto of the empress "[Concerning giving] permission to all foreigners coming to Russia to settle in those provinces in which they will wish and [..] granted to them [by] right".
The legal status of foreigners was fixed in regulations of the period-the Police Ustav of 1782 and Charter to the Cities of 1785.