Anas bin Malik reported,

Quraysh made a peace treaty with the Prophet ﷺ, and among them was Suhayl bin Amr. The Prophet ﷺ said to Ali, "Write, In the name of Allah, the Most Gracious, the Most Merciful."Suhayl objected, "As for 'In the name of Allah,' we do not know what 'In the name of Allah, the Most Gracious, the Most Merciful' means. Write instead what we recognize, 'In Your name, O Allah.'"The Prophet ﷺ then said, "Write, From Muhammad, the Messenger of Allah."They said, "If we knew you were the Messenger of Allah, we would have followed you. But write your name and the name of your father."So the Prophet ﷺ said, "Write, From Muhammad bin Abdullah."They then stipulated to the Prophet ﷺ, "Whoever comes to you from among us, you shall return him to us, and whoever comes to us from among you, we will not return to you."The companions said, "Messenger of Allah, shall we write this?"He replied, "Yes. Whoever leaves us to join them, may Allah cast him far away, and whoever comes to us from them, Allah will surely provide him with relief and a way out."

Muslim 4632

Sahih

حدثنا أبو بكر بن أبي شيبة حدثنا عفان حدثنا حماد بن سلمة عن ثابت

عن أنس

أن قريشا صالحوا النبي ﷺ فيهم سهيل بن عمرو فقال النبي ﷺ لعلي اكتب بسم الله الرحمن الرحيم قال سهيل أما باسم الله فما ندري ما بسم الله الرحمن الرحيم ولكن اكتب ما نعرف باسمك اللهم فقال اكتب من محمد رسول الله قالوا لو علمنا أنك رسول الله لاتبعناك ولكن اكتب اسمك واسم أبيك فقال النبي ﷺ اكتب من محمد بن عبد الله فاشترطوا على النبي ﷺ أن من جاء منكم لم نرده عليكم ومن جاءكم منا رددتموه علينا فقالوا يا رسول الله أنكتب هذا قال نعم إنه من ذهب منا إليهم فأبعده الله ومن جاءنا منهم سيجعل الله له فرجا ومخرجا

مسلم 4632صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Jihad and expeditions
Chapter
Treaty of Hudaybiya at Hudaybiya
Numbering
Darussalam 4632
Muslim 4632