Many thousands and thousands host apartments on Airbnb all around the world, so yes of course it can be a good idea if
1. Your lease allows it
2. Your local government allows it
3. You do your market research for supply and demand for this type of listing in your location to see how many days a year you are likely to be able to let it out for.
4. You do your market research and put together a profit and loss budget to see how profitable it might be