In Switzerland, you must be 18 years old in order to get married. Same-sex couples can also get married: a man can marry a man and a woman can marry a woman. If you wish to get married, you need to contact the registry office of Basel-Stadt (Zivilstandsamt). The registry office then initiates the "marriage preparation procedure". For example, the office examines whether both partners meet the requirements for marriage. After the procedure has been completed, the wedding must take place within three months. The registry office offers more detailed information on the procedure and the necessary documents.
If one partner still lives abroad, it is possible to file a request for the partner to enter Switzerland (marriage preparation). You can then both get married here in Switzerland.
The registry office might suspect that you are engaging in a marriage of convenience (Scheinehe). A marriage of convenience is when you get married only in order to enable one of the partners to live in Switzerland. The registry office can deny the marriage. If you have already got married, the office can declare the marriage invalid. The marriage will then be rescinded. You may also lose your residence permit as a result of the marriage of convenience.