It depends where the property is. Many planning laws in Spain are set at a regional level. That said, the scope of ‘permitted development’ in Spain is quite restricted in all areas. In Catalonia, for example, you wouldn’t need a building licence to do the work you mention, but you would need an ‘assabentat’ which you can get online without any wait, and I think is free. To be on the safe side just check the website of your ayuntamiento. That should have instructions as to permitted development in your municipality.