Real estate agency showing without notice
Hello. I apologize if how I explain this as I am very frazzled, but I was at home and I had the door latch on the door and my headphones on. The real estate agency in charge of my one room had texted and called me in order to show my one room, and I didnt see they had done so. Only 10 minutes later, they were putting in the code to my front door and then they had attempted to open the door while I was inside. I was so shocked and scared that I yelled "Just a moment" at the agent, and I answered the door. He had prospective tenants with him and asked to show my one room, and I had tried to say no mentioning I had a bunch of laundry and stuff out. He still insisted so I asked for a moment while I quickly tidied things up and then let them inside. They quickly left, but I cant help but feeling scared and anxious afterwards. It was only 10 minutes notice. Is this normal?
I literally asked over the phone yesterday for them to give at least a days notice because they had called and texted me while I was at the hospital waiting for my appointment and in my confusion I gave them the code to let them in. I don't understand though how they can just enter my apartment without even giving at least a couple hours notice unless if it was an emergency. Showing my one room to prospective tenants is not an emergency. What if I had been in the shower?! What if I was naked and changing?? I have been having health problems lately. What if I was in the middle of throwing up?! Is it too much for me to ask for a day's notice? When I originally came to look at this apartment, I had scheduled ahead of time with the agency a date and time I was going to start looking at places in the area. Is this even legal? I am scared shirtless right now at them trying to barge in all of a sudden.
Just to be clear, I was only given 10 minutes notice from the time they had texted and called to when they had opened my door and attempted to come in but failed due to the door latch.
Edit/Update: So thanks to the replies here and another sub, I was able to figure out how to set my boundaries with the real estate agency. I changed my door code, and I informed the real estate agency that I had done so and that they can only come and visit after they contact me prior AND receive my okay as well. I told them that I will let them in myself to do so to remain cooperative in helping find new tenants. I also told them times in the following week that I would not be available under any circumstances. I also will not give them my door password again as they have shown they will enter without giving much prior notice or receiving any confirmation. Thank you all for the advice and explanations.