Announcing the birth of a newborn baby in the mosque in order for the people to pray for him is not permissible because he is a Mubtadi` (one who introduces innovations in religion), according to the saying of the Prophet (peace be upon him):
“Anyone who does an action which is not in accordance with this matter of ours (Islam) will have it rejected.”
Related by Imam
Muslim in his Sahih (Authentic Hadith Book). It was not the Sunnah (acts, sayings or approvals of the Prophet) of the Prophet (peace be upon him) to announce the birth of newborn babies in the Masajid (mosques) in order for people to pray for them.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.