The Messenger of Allah ﷺ was cupped at Lahy Jamal, on the road to Makkah, in the middle of his head while he was in the state of ihram.In another narration, he was cupped on his head while in ihram for a headache he was suffering from.
أن رسول الله ﷺ احتجم بلحي جمل من طريق مكة وهو محرم في وسط رأسه. وفي رواية: أنه احتجم وهو محرم في رأسه لصداع كان فيه
Bukhari narrated it in the Book of Medicine (5698), and Muslim in the Book of Hajj (1203), both through the route of Sulayman bin Bilal, from Alqama bin Abu Alqama, from Abdul-Rahman Araj, that he heard Abdullah bin Buhayna, and he mentioned it.