In this study, we provide an overview of relevant national and local regulations and policies for smart mobility, focusing on carsharing services. In particular, we highlight the importance of parking policies. Given this importance, we propose a mathematical optimization model that can be used by a local government to analytically choose the best subset of parking slots to rent to carsharing companies, in order to improve urban mobility. Government that must choose which parking slots to rent to carsharing companies in a city, while finding an optimal balance between the interest of the population and those of the profit-oriented companies. Specifically, we propose to formulate this decision problem as a Binary Linear Programming problem, which includes boolean variables to represent the possibility of renting or not a cluster of parking slots. We present the results of testing the model using realistic data related to the City of Rome. Such data are defined on the basis of the experience gained within the collaboration with our industrial partners in EGo , a carsharing service launched at the University Roma Tre with the support of the electric utility company Enel. The application of the model to a set of realistic data of city of Rome shows that the model can return a fair territorial distribution of the parking slots, satisfying various families of constraints limiting the distribution.