Accreting black holes show characteristic features that result from reprocessing of hard X-ray photons by the accretion disk. These features are distorted by relativistic effects and therefore they probe the innermost regions of the system as long as its geometry. However, these distortions are insensitive to black hole mass, since they depend on disk geometry in units of gravitational radii. Measuring the reverberation lag resulting from the difference in path length between direct and reflected emission gives the length of the gravitational radius that can be constrained by a combined spectral-timing analysis, providing a means to measure black hole mass. In my thesis I developed a model to jointly fit the time-averaged X-ray spectrum and the cross-spectrum as a function of energy for a range of timescales, in order to measure the mass and the spin of black holes and to constrain the geometry and the atomic physics of the accretion disk. I applied this model to black hole binaries and active galactic nuclei obtaining promising results and interesting inconsistencies that require more investigations.