ENOfficial
Narrated AbuBakrah: When anything came to the Prophet (ﷺ) which caused pleasure (or, by which he was made glad), he prostrated himself in gratitude to Allah.
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا مَخْلَدُ بْنُ خَالِدٍ، حَدَّثَنَا أَبُو عَاصِمٍ، عَنْ أَبِي بَكْرَةَ، بَكَّارِ بْنِ عَبْدِ الْعَزِيزِ أَخْبَرَنِي أَبِي عَبْدُ الْعَزِيزِ، عَنْ أَبِي بَكْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم أَنَّهُ كَانَ إِذَا جَاءَهُ أَمْرُ سُرُورٍ أَوْ بُشِّرَ بِهِ خَرَّ سَاجِدًا شَاكِرًا لِلَّهِ .
sunnah.com