<p><em>[eng] Aims. The aim of this work is to assess the temperature and velocity diagnostics of coronal rain clumps, as observed in the lines</em></p><p><em>formed in the upper chromosphere.</em></p><p><em>Methods. We performed the temperature diagnostics using inversions of data from nine spectroscopic observations obtained with the</em></p><p><em>IRIS spectrograph in the Mgii h&k lines. The sensitivity to the temperature of the emission peaks of these lines was exploited to</em></p><p><em>determine the temperature of the coronal rain plasma using inversions of the spectroscopic profiles. Additional relationships between</em></p><p><em>di erent spectral features of these lines, derived from the use of 3D radiative transfer line synthesis applied to simulations, were</em></p><p><em>employed in order to derive the line-of-sight (LoS) velocities in di erent parts of the coronal rain plasma.</em></p><p><em>Results. For the first time, spectroscopic inversions of coronal rain were successfully performed. Temperatures derived from the</em></p><p><em>inversions yield coronal rain clump temperatures at the formation height of the emission peaks of the Mgii h&k lines in the range</em></p><p><em>between 5000 and 7000 K. This narrow range of values remains consistent among all the di erent observations used in this work. We</em></p><p><em>obtained LoS velocities of up to 40 km s 1, which are consistent with the motion of the plasma being mostly constrained to the plane</em></p><p><em>of the sky, as the coronal rain was mostly detected shortly after its formation and the observations took place in the disc. Furthermore,</em></p><p><em>velocity diagnostics led to the detection of larger velocities at higher layers of the coronal rain plasma in some cases. This increased</em></p><p><em>velocity seems to indicate that at some point (at least) during the fall of coronal rain clumps towards the chromosphere, the material in</em></p><p><em>the upper part of the coronal rain plasma is falling with greater velocity than the material below it. The conditions of the temperature</em></p><p><em>and density of the coronal rain plasma where the Mgii h line forms appear to be slightly di erent that those of the Mgii k line, with</em></p><p><em>the former found at slightly colder and denser parts of the plasma.</em></p>