One can apply online for the identity card at the competent cantonal passport office. In addition, applying for it also possible by telephone and in some cases directly on-site in the passport office. The procedures vary in the individual cantons.
An overview of the cantonal passport offices can be found on the pages of the Swiss Confederation.