The Messenger of Allah ﷺ said, "Whoever introduces into this matter of ours something that is not part of it, it is rejected."Ibn Isa's version reads, the Prophet ﷺ said, "Whoever does something not in accordance with our matter, it is rejected."
حدثنا محمد بن الصباح البزاز حدثنا إبراهيم بن سعد ح و حدثنا محمد بن عيسى حدثنا عبد الله بن جعفر المخرمي وإبراهيم بن سعد عن سعد بن إبراهيم عن القاسم بن محمد
قال رسول الله ﷺ من أحدث في أمرنا هذا ما ليس فيه فهو رد قال ابن عيسى قال النبي ﷺ من صنع أمرا على غير أمرنا فهو رد
Muslim narrated it in the Book of Judgments, Chapter on the annulment of invalid rulings and rejecting innovated matters, hadith no. 1718, from Muhammad bin Sabbah, and Bukhari narrated it in the Book of Reconciliation, Chapter on when they reconcile upon an unjust settlement then the settlement is rejected, hadith no. 2697, from the hadith of Ibrahim bin Saad, with the same wording.