Adding / Deleting licenses via Rest API

Description
I’m trying to add or remove licenses via Rest API. This seems to only be possible using “sub accounts” however I do not have any sub account, I simply need to dynamically update our number of licenses every 5 weeks.
Our scenario is this: we hire instructors for courses and start new courses every 5 weeks. We maintain just the number of licenses we need for those instructors in order to not pay for licenses we do not use.

Is there a way to do that via Rest API? Thank you!

Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT / NodeJS

Which Endpoint/s?
Couldn’t find the proper end point for this

1 Like

Hey @ludo,

I think this is the flow you are looking for:

  1. Create licensed user: https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate

  2. Update the user if need be to the respective feature: https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usersettingsupdate

  3. Delete the user https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userdelete or keep the user and downgrade their plan: https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate

Let me know if that helps!

Thanks,
Tommy

Thank you Tommy for taking the time!

I have tried this and it doesn’t quite work. You cannot create a licensed user, or switch a user from “Basic” to “Licensed” if you have exceed the number of licenses in your plan. The other way around, switching a user from “Licensed” to “Basic” doesn’t reduce the number of paid licenses in your plan.

So the workflow to add a new licensed user would need to be something like this:

if (noMoreAvailableLicenses()) {
  addLicenseToPlan();
  createLicensedUser();
}

At this time I can do createLicensedUser, but no way to do addLicenseToPlan.
Similarily for removing a licensed user and removing a license in the plan.

Here’s a screenshot of the billing / plan that would be changed by this Rest API.

Hey @ludo,

I see! Use our billing endpoints to update the respective billing plan:

https://marketplace.zoom.us/docs/api-reference/zoom-api/billing/accountplancreate
https://marketplace.zoom.us/docs/api-reference/zoom-api/billing/accountplanbaseupdate
https://marketplace.zoom.us/docs/api-reference/zoom-api/billing/accountplanaddonupdate

Thanks,
Tommy

Thanks Tommy! These are almost helpful :slight_smile: The challenge is they seem to only apply to “sub-accounts” and I don’t seem to have “sub-accounts”. I just have a Master account and that’s it.
If the billing endpoint was working for a Master account then that would indeed be perfect. But do they? Or maybe I’m missing something in how my account is setup?

Hey @ludo,

You can try the GET Plan Information endpoint to see if it will work!

Thanks,
Tommy