A microscopic multimode theory of collinear type-I spontaneous parametric downconversion in a cavity is presented. Single-mode and multimode correlation functions have been derived using fully quantized atom and electromagnetic field variables. From a first principles calculation the FWHM of the single-mode correlation function and the cavity enhancement factor have been obtained in terms of mirror reflectivities and the first-order crystal dispersion coefficient. The values obtained are in good agreement with recent experimental results [Phys. Rev. A 62 , 033804 (2000)].