# Switch hosts through the API?

**URL:** <https://devforum.zoom.us/t/switch-hosts-through-the-api/60066>\
**Category:** API and Webhooks\
**Created:** [November 10, 2021, 12:35pm UTC](https://devforum.zoom.us/t/switch-hosts-through-the-api/60066 "2021-11-10T12:35:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnhSon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anhson/32/32512_2.png) [@AnhSon](https://devforum.zoom.us/u/AnhSon)\
**Post date:** [November 10, 2021, 12:35pm UTC](https://devforum.zoom.us/t/switch-hosts-through-the-api/60066/1 "2021-11-10T12:35:33Z")

</div>

Hi, I have an issue that creates a meeting and switch host.

I am building a small scale e-learning application, I signed up for an account and upgraded to the PRO plan. Is there a way I can create a meeting from this account and switch host to another free account or is there a plan or way to do the same idea?

please suggest help me. thanks a lot. (sorry my english isn’t very good).

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 15, 2021, 9:53am UTC](https://devforum.zoom.us/t/switch-hosts-through-the-api/60066/2 "2021-11-15T09:53:25Z")

</div>

Hi @AnhSon,

If you’d like to switch the host for a meeting after it’s been scheduled, you can do so via API. You can use the [Update Meeting API](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingupdate) and pass the email/userId of the new host in the `schedule_for` field.

Let me know if this helps,  
Will

---

<div class="post-metadata">

**Author:** ![AnhSon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anhson/32/32512_2.png) [@AnhSon](https://devforum.zoom.us/u/AnhSon)\
**Post date:** [November 16, 2021, 5:17pm UTC](https://devforum.zoom.us/t/switch-hosts-through-the-api/60066/3 "2021-11-16T17:17:43Z")

</div>

Thanks for replying, @will.zoom

I have a Zoom Licensed account and a Zoom Basic account (I will add more basic accounts)

 ![Screen Shot 2021-11-17 at 00.05.57](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/d/cd0b730c9b3bdd6beed230493bd0d244408fd33c.png)

I use the api to create a meeting (/users/{userId}/meetings) with body  
({userId} is the email account Licensed)

```auto
body: {
   ....,
   schedule_for: "xxxxxxxx@gmail.com", //basic account added above
   ....
}

```

and I get the following 1 error

```auto
{"code":3000,"message":"You cannot schedule a meeting for xxxxxxxx@gmail.com"}

```

is there any way i can switch host before or after i create a meeting?  
please suggest me, thanks a lot.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 17, 2021, 2:02pm UTC](https://devforum.zoom.us/t/switch-hosts-through-the-api/60066/4 "2021-11-17T14:02:59Z")

</div>

Hey @AnhSon, if both users aren’t licensed or don’t have scheduling privileges, you may find this approach better:

> [@Changing the scheduled host for an existing meeting using the update\_meeting API?](https://devforum.zoom.us/t/changing-the-scheduled-host-for-an-existing-meeting-using-the-update-meeting-api/59343/12):
>
> My issue was that I was attempting to swap a host for an alternate in one step. It doesn’t work. What does is the following: Step 1. Save the alternate hosts and PATCH to clear { settings: { alternative\_hosts: ‘’ } } Step 2. Update the host for the new host email or id { schedule\_for: new\_host } Step 3. Modify the alternate hosts to ensure the new host is removed from the list and then PATCH { settings: { alternative\_hosts: new\_list\_without\_new\_host } } You must have schedule pr…

Let me know if it helps,  
Will

---

<div class="post-metadata">

**Author:** ![AnhSon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anhson/32/32512_2.png) [@AnhSon](https://devforum.zoom.us/u/AnhSon)\
**Post date:** [November 18, 2021, 2:40am UTC](https://devforum.zoom.us/t/switch-hosts-through-the-api/60066/5 "2021-11-18T02:40:41Z")

</div>

Hey @will.zoom, I have tried each step as you suggested.  
**Step 1** : I use the api create meeting (/users/{userId}/meetings), {userId} is the email account Licensed. with body:

```auto
body: {
       settings: {
             alternative_hosts: '', // PATCH to clear
       }
}

```

**Step 2** : I use the api update meeting (/meetings/{meetingId}), {meetingId} is the ID returned from response in step 1.  
with body:

```auto
body: {
     schedule_for: 'xxxxxxxx@gmail.com' // *Basic account*
}

```

and I get the following 1 error

```auto
{"code":3000,"message":"You cannot schedule a meeting for xxxxxxxx@gmail.com"}

```

Let me know if I’m doing something wrong, thanks a lot.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 19, 2021, 11:11am UTC](https://devforum.zoom.us/t/switch-hosts-through-the-api/60066/6 "2021-11-19T11:11:52Z")

</div>

Hi @AnhSon,

This error means that the users you’re attempting to set as host/alternative\_host do not have scheduling privileges:

> **[Scheduling privilege](https://support.zoom.us/hc/en-us/articles/201362803-Scheduling-privilege)**
>
> Scheduling privilege is designed for a user or an executive admin to:
> 
> Assign or delegate a user or multiple users in your account to schedule meetings on your behalf. 
> Schedule meetings on behalf ...

You must have schedule privileges for the new host and the alternates, in order to make this update.

Let me know if this helps to clarify,  
Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 19, 2021, 9:12pm UTC](https://devforum.zoom.us/t/switch-hosts-through-the-api/60066/7 "2021-12-19T21:12:39Z")

</div>

Closed on December 19, 2021, 9:12pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
