# Request Body should be a valid JSON object while creating a webinar

**URL:** <https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508>\
**Category:** API and Webhooks\
**Tags:** webinar\
**Created:** [June 1, 2021, 9:28am UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508 "2021-06-01T09:28:37Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![webinars5](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@webinars5](https://devforum.zoom.us/u/webinars5)\
**Post date:** [June 1, 2021, 9:28am UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/1 "2021-06-01T09:28:37Z")

</div>

**Description**  
I am trying to create a webinar through API in Json format and i am getting 300 error like **Request Body should be a valid JSON object.**

**Error**  
Request Body should be a valid JSON object.

Using JWT authenticaion

POST: [https://api.zoom.us/v2/users/{myuserid}/webinars](https://api.zoom.us/v2/users/%7Bmyuserid%7D/webinars)

JSON POST data:

[

{

```
  "topic":"Test Webinar",

  "type":5,

  "start_time":"2020-09-20T06:59:00Z",

  "duration":"60:00",

  "timezone":"America/Los_Angeles",

  "password":"test1234",

  "agenda":"Test Webinar",

  "recurrence":{

     "type":1,

     "repeat_interval":1,

     "end_date_time":"2020-09-20T06:59:00Z"

  },

  "settings":{

     "host_video":"true",

     "panelists_video":"true",

     "practice_session":"true",

     "hd_video":"true",

     "approval_type":0,

     "registration_type":2,

     "audio":"both",

     "auto_recording":"none",

     "enforce_login":"false",

     "close_registration":"true",

     "show_share_button":"true",

     "allow_multiple_devices":"false",

     "email_language":"en-US",

     "panelists_invitation_email_notification":true,

     "registrants_confirmation_email":true,

     "registrants_email_notification":true,

     "attendees_and_panelists_reminder_email_notification":{

        "enable":true,

        "type":1

     },

     "follow_up_attendees_email_notification":{

        "enable":true,

        "type":1

     },

     "follow_up_absentees_email_notification":{

        "enable":true,

        "type":1

     }

  }

```

}

]

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 2, 2021, 8:27pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/2 "2021-06-02T20:27:18Z")

</div>

Hey @webinars5,

Thank you for reaching out to the Zoom Developer Forum. It looks like your request body is inside square brackets which would be interpreted as an unnamed array in JSON which is not valid.

Try removing the square brackets from around your request and let me know if that helps.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![webinars5](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@webinars5](https://devforum.zoom.us/u/webinars5)\
**Post date:** [June 3, 2021, 4:42pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/3 "2021-06-03T16:42:13Z")

</div>

Hey Max,

Thanks for your reply. I removed the square brackets and tried but still the same issue.  
can you please help me to resolve this.

thanks

---

<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:** [June 3, 2021, 6:11pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/4 "2021-06-03T18:11:54Z")

</div>

Hi @webinars5,

Have you tried putting your JSON payload through a validator to ensure you’re not missing anything?:

> **[Best JSON Viewer and JSON Beautifier Online](https://codebeautify.org/jsonviewer)**
>
> Online JSON Viewer, JSON Beautifier to beautify and tree view of JSON data - It works as JSON Pretty Print to pretty print JSON data.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![webinars5](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@webinars5](https://devforum.zoom.us/u/webinars5)\
**Post date:** [June 4, 2021, 3:01am UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/5 "2021-06-04T03:01:58Z")

</div>

Hi Will,

yes i have validate using this and showing as Valid json.

Attached screenshot for your reference.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/f/7ffbfb7bf94931724c72a82de3da80a9ac612132.png)

Thanks  
Mallesh

---

<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:** [June 4, 2021, 3:43pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/6 "2021-06-04T15:43:11Z")

</div>

Hi @webinars5,

Thank you for confirming. Can you please also confirm that you’re including the `Content-Type` header with value of `application/json` along with your request, and that your `"` are not styled?

Additionally, have you tried sending the request from Postman, cURL, etc., to see if you get different results?

Let me know—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![webinars5](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@webinars5](https://devforum.zoom.us/u/webinars5)\
**Post date:** [June 7, 2021, 2:08am UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/7 "2021-06-07T02:08:33Z")

</div>

Hi Will,

Thanks for your reply. I added the Content-Type header with value of application/json and i trying in Postman also but nothing helped me.

Please find the attached screenshots for your reference from postman.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/a/fa4a637305de3b563f59fab1f8b20ff96303a3fd.png)

Thanks,  
Mallesh

---

<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:** [June 7, 2021, 3:13pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/8 "2021-06-07T15:13:06Z")

</div>

Hi @webinars5,

Can you double check that you’ve selected the following option under **Body**?  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/c/ccd7779b284fbc2eddb9a6a9025be9d0dcfa31c8.png)

Let me know—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![webinars5](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@webinars5](https://devforum.zoom.us/u/webinars5)\
**Post date:** [June 7, 2021, 3:21pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/9 "2021-06-07T15:21:38Z")

</div>

yes Will , Please check with that sample code attached and let me know.

Thanks

---

<div class="post-metadata">

**Author:** ![webinars5](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@webinars5](https://devforum.zoom.us/u/webinars5)\
**Post date:** [June 8, 2021, 1:30pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/10 "2021-06-08T13:30:27Z")

</div>

I tried everything and did not get any solution.

Any update on this. Please update me what went wrong here.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 9, 2021, 5:23pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/11 "2021-06-09T17:23:45Z")

</div>

Hey @webinars5,

I think this is happening because the [Create a Webinar API](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarcreate) expects the duration field to be an integer but it’s being sent as a string:

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/7/779630409b49cb4c26134b848d73e52d60e12745.png)

Please confirm that the data types you’re using match the schema of that API.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![webinars5](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@webinars5](https://devforum.zoom.us/u/webinars5)\
**Post date:** [June 10, 2021, 2:19am UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/12 "2021-06-10T02:19:21Z")

</div>

Thank you very much Max, It is working now 👍

---

<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:** [June 10, 2021, 3:27pm UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/13 "2021-06-10T15:27:12Z")

</div>

Awesome, glad Max could help!

Best,  
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:** [July 11, 2021, 1:27am UTC](https://devforum.zoom.us/t/request-body-should-be-a-valid-json-object-while-creating-a-webinar/51508/14 "2021-07-11T01:27:44Z")

</div>

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