Update licenses of sub users

Hi, im new here so sorry if it’s a question previously answered, I only found an answer from 2020 that’s no longer useful.
I’m trying to do a page that could, from an admin user, change the license to each sub-user couple times a day.
I mean: from 14:00 to 15:00 the user “John Doe” needs the license of a meeting with until 500 people, but from 16:00 to 18:00 the user “Joana Doana” needs that license, and that over and over without someone that manually changes the license every time, there’s an API which I could do that?