Gravitational-wave echoes in the post-merger signal of a binary coalescence are predicted in various scenarios, including near-horizon quantum structures, exotic states of matter in ultracompact stars, and certain deviations from general relativity. The amplitude and frequency of each echo is modulated by the photon-sphere barrier of the remnant, which acts as a spin-and frequencydependent high-pass filter, decreasing the frequency content of each subsequent echo. Furthermore, a major fraction of the energy of the echo signal is contained in low-frequency resonances corresponding to the quasi-normal modes of the remnant. Motivated by these features, in this work we provide an analytical gravitational-wave template in the low-frequency approximation describing the postmerger ringdown and the echo signal of a spinning ultracompact object. Besides the standard ringdown parameters, the template is parametrized in terms of only two physical quantities: the reflectivity coefficient and the compactness of the remnant. We discuss novel effects related to the spin and to the complex reflectivity, such as a more involved modulation of subsequent echoes, the mixing of two polarizations, and the ergoregion instability in case of perfectly-reflecting spinning remnants. Finally, we compute the errors in the estimation of the template parameters with current and future gravitational-wave detectors using a Fisher matrix framework. Our analysis suggests that models with almost perfect reflectivity can be excluded/detected with current instruments, whereas probing values of the reflectivity smaller than 80% at 3σ confidence level requires future detectors (Einstein Telescope, Cosmic Explorer, LISA). The template developed in this work can be easily implemented to perform a matched-filter based search for echoes and to constrain models of exotic compact objects.