The crier of the Messenger of Allah ﷺ came to us and announced, "Allah and His Messenger forbid you from eating the flesh of donkeys, for it is impure."
أخبرنا محمد بن عبد الله بن يزيد قال حدثنا سفيان عن أيوب عن محمد
أتانا منادي رسول الله ﷺ فقال إن الله ورسوله ينهاكم عن لحوم الحمر فإنها رجس
Agreed upon. Bukhari narrated it in the book of jihad, chapter on takbir during battle, hadith (2991), and Muslim in the book of hunting and slaughtered animals, chapter on the prohibition of eating domestic donkeys, hadith (1940), from the hadith of Sufyan bin Uyayna in this manner. It is also in al-Kubra, hadith (64).