# Issue in submitting form via V3 api

**URL:** <https://community.hubspot.com/t/issue-in-submitting-form-via-v3-api/12559>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [January 7, 2019, 11:39am UTC](https://community.hubspot.com/t/issue-in-submitting-form-via-v3-api/12559 "2019-01-07T11:39:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [January 7, 2019, 11:39am UTC](https://community.hubspot.com/t/issue-in-submitting-form-via-v3-api/12559/1 "2019-01-07T11:39:59Z")

</div>

I was using submit form to add new contact to my hubspot contacts using javascript code and i was getting error as

> Blockquote

{“status”:“error”,“message”:“Invalid input JSON on line 1, column 33: Cannot build FormSubmissionValue, some of required attributes are not set [name, value]”,“correlationId”:“4e91576b-fc91-4444-8637-275946ad37ad”,“requestId”:“257d66998300805f1914cd28e4560c1f”}

> Blockquote

this was my request body for post request  
{“fields”:[{“firstname”:“rakesh”},{“lastname”:“chauhan”},{“[email":"rakesh376@gmail.com](mailto:email%22:%22rakesh376@gmail.com)”},{“primary\_industry\_type”:“Automotive”}]}

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/0/20702f3cbabd368c8731d17632b35aa969cc67d5.png)

request1.PNG1709×887 79.9 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/7/764f2d1882908bde4dbb1451311c842fbb7b7c17.png](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/7/764f2d1882908bde4dbb1451311c842fbb7b7c17.png))

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [January 7, 2019, 7:36pm UTC](https://community.hubspot.com/t/issue-in-submitting-form-via-v3-api/12559/2 "2019-01-07T19:36:32Z")

</div>

Hi [@rakesh.chauhan](https://community.hubspot.com/u/rakesh.chauhan), it doesn’t look like the way you’re formatting your body is correct. The docs state your fields should be formatted like so:

```auto
"fields": [
 {
 "name": "email",
 "value": "example@example.com"
 },
 {
 "name": "lastname",
 "value": "Example Lastname"
 },
 {
 "name":"multiple_checkbox_property",
 "value":"option_1;option2"
 },
 {
 "name":"date_property",
 "value":1520985600000
 },
 {
 "name":"checkbox_property",
 "value":"true"
 }
 ]

```

From your example, you’re missing the `name` property for each value you provide. I created a simple Repl here: [https://repl.it/@cbarley10/DefensiveBeigeRuntimes](https://repl.it/@cbarley10/DefensiveBeigeRuntimes) in NodeJS for a Form Submission using the v3 API. I’d recommend emulating the example there if you can! Or please use the example in the sidebar.
