كتاب الجهاد والسير
32  
The Book of Jihad and Expeditions
(34)
Chapter: The truce of Al-Hudaybiyah
(34)
باب صُلْحِ الْحُدَيْبِيَةِ فِي الْحُدَيْبِيَةِ ‏‏
Sahih Muslim 1783 b

It has been narrated on the authority of Abu Ishaq, who heard Bars' b. Azib say:

When the Messenger of Allah (ﷺ) made peace with the people of Hudaibiya, 'Ali drew up the agreement between them, and so he wrote: Muhammad, the Messenger of Allah. (This is followed by the same wording as we have in the previous tradition except the omission of the words: This is what he has settled.)
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ أَبِي إِسْحَاقَ، قَالَ سَمِعْتُ الْبَرَاءَ بْنَ عَازِبٍ، يَقُولُ لَمَّا صَالَحَ رَسُولُ اللَّهِ صلى الله عليه وسلم أَهْلَ الْحُدَيْبِيَةِ كَتَبَ عَلِيٌّ كِتَابًا بَيْنَهُمْ قَالَ فَكَتَبَ ‏"‏ مُحَمَّدٌ رَسُولُ اللَّهِ ‏"‏ ثُمَّ ذَكَرَ بِنَحْوِ حَدِيثِ مُعَاذٍ غَيْرَ أَنَّهُ لَمْ يَذْكُرْ فِي الْحَدِيثِ ‏"‏ هَذَا مَا كَاتَبَ عَلَيْهِ ‏"‏ ‏.‏
Reference : Sahih Muslim 1783b
In-book reference : Book 32, Hadith 112
USC-MSA web (English) reference : Book 19, Hadith 4402
  (deprecated numbering scheme)