Sahih Muslim , Hadith 2287

Jabir reported Allah's Messenger as saying: The similitude of mine and that of the Apostles is like that of a person who built a house and he completed it and made it perfect but for the space of a brick. People entered therein and they were surprised at it and said: Had there been a brick (it would have been complete in all respects). Allah's Messenger said: I am that place where the brick (completing the building is to be placed), and I have come to finalise the chain of Apostles.

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَفَّانُ، حَدَّثَنَا سَلِيمُ بْنُ حَيَّانَ، حَدَّثَنَا سَعِيدُ، بْنُ مِينَاءَ عَنْ جَابِرٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏"‏ مَثَلِي وَمَثَلُ الأَنْبِيَاءِ كَمَثَلِ رَجُلٍ بَنَى دَارًا فَأَتَمَّهَا وَأَكْمَلَهَا إِلاَّ مَوْضِعَ لَبِنَةٍ فَجَعَلَ النَّاسُ يَدْخُلُونَهَا وَيَتَعَجَّبُونَ مِنْهَا وَيَقُولُونَ لَوْلاَ مَوْضِعُ اللَّبِنَةِ ‏"‏ ‏.‏ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ فَأَنَا مَوْضِعُ اللَّبِنَةِ جِئْتُ فَخَتَمْتُ الأَنْبِيَاءَ ‏"‏ ‏.‏

sunnah.com

This hadith has been narrated through another chain of transmitters but with a slight variation of wording.

وَحَدَّثَنِيهِ مُحَمَّدُ بْنُ حَاتِمٍ، حَدَّثَنَا ابْنُ مَهْدِيٍّ، حَدَّثَنَا سَلِيمٌ، بِهَذَا الإِسْنَادِ مِثْلَهُ وَقَالَ بَدَلَ أَتَمَّهَا أَحْسَنَهَا ‏.‏

sunnah.com