# Adding / Deleting licenses via Rest API

**URL:** <https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188>\
**Category:** API and Webhooks\
**Created:** [March 22, 2020, 1:07am UTC](https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188 "2020-03-22T01:07:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ludo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ludo/32/3910_2.png) [@ludo](https://devforum.zoom.us/u/ludo)\
**Post date:** [March 22, 2020, 1:07am UTC](https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188/1 "2020-03-22T01:07:39Z")

</div>

**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

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 23, 2020, 5:06pm UTC](https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188/2 "2020-03-23T17:06:24Z")

</div>

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](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](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](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](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate)

Let me know if that helps!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ludo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ludo/32/3910_2.png) [@ludo](https://devforum.zoom.us/u/ludo)\
**Post date:** [March 23, 2020, 5:24pm UTC](https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188/3 "2020-03-23T17:24:34Z")

</div>

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.

 ![Zoom Plans](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/6/671f309a2100cb09d62765304281ff507eda09e4.jpeg)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 23, 2020, 11:10pm UTC](https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188/4 "2020-03-23T23:10:35Z")

</div>

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/accountplancreate)  
[https://marketplace.zoom.us/docs/api-reference/zoom-api/billing/accountplanbaseupdate](https://marketplace.zoom.us/docs/api-reference/zoom-api/billing/accountplanbaseupdate)  
[https://marketplace.zoom.us/docs/api-reference/zoom-api/billing/accountplanaddonupdate](https://marketplace.zoom.us/docs/api-reference/zoom-api/billing/accountplanaddonupdate)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ludo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ludo/32/3910_2.png) [@ludo](https://devforum.zoom.us/u/ludo)\
**Post date:** [March 23, 2020, 11:35pm UTC](https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188/5 "2020-03-23T23:35:16Z")

</div>

Thanks Tommy! These are almost helpful 🙂 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?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 24, 2020, 3:50pm UTC](https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188/6 "2020-03-24T15:50:43Z")

</div>

Hey @ludo,

You can try the [GET Plan Information endpoint](https://marketplace.zoom.us/docs/api-reference/zoom-api/billing/accountplans) to see if it will work!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:35pm UTC](https://devforum.zoom.us/t/adding-deleting-licenses-via-rest-api/9188/7 "2020-08-21T19:35:01Z")

</div>


