# Error submitting to Hubspot API form

**URL:** <https://community.hubspot.com/t/error-submitting-to-hubspot-api-form/76700>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [March 8, 2023, 4:23am UTC](https://community.hubspot.com/t/error-submitting-to-hubspot-api-form/76700 "2023-03-08T04:23:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GRose4](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@GRose4](https://community.hubspot.com/u/GRose4)\
**Post date:** [March 8, 2023, 4:23am UTC](https://community.hubspot.com/t/error-submitting-to-hubspot-api-form/76700/1 "2023-03-08T04:23:14Z")

</div>

I’m submitting to a Hubspot API form and it is successfull about half of the time. The json sent is formatted exactly the same way each time.

The error received is:

`Exception('{"status":"error","message":"Invalid input JSON on line 1, column 451: Cannot build FormSubmissionValue, some of required attributes are not set [value]","correlationId":"9eb57057-e900-461a-80c1-c0edfb36f361"}')`

When I have resubmitted a form with exactly the same data as when the exception occurred the error does not repeat.

My json is formatted as below:

“fields”: [

{“name”: “country”, “value”: “Australia”},

{“name”: “state”, “value”: “Victoria”},

{“name”: “email”, “value”: “[test@test.com](mailto:test@test.com)”},

{“name”: “name”, “value”: “Joe Bloggs”}

]

Any ideas appreciated.

thanks

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [March 8, 2023, 6:48pm UTC](https://community.hubspot.com/t/error-submitting-to-hubspot-api-form/76700/2 "2023-03-08T18:48:27Z")

</div>

Hi, @GRose4 👋 Thanks for reaching out. Can you provide any additional details? Without being able to reproduce or “see” the issue in action, it’s shard for the community to offer an option.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![GRose4](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@GRose4](https://community.hubspot.com/u/GRose4)\
**Post date:** [March 8, 2023, 10:50pm UTC](https://community.hubspot.com/t/error-submitting-to-hubspot-api-form/76700/3 "2023-03-08T22:50:02Z")

</div>

The endpoint I’m using looks like this:

hubspot\_endpoint = ‘[https://api.hsforms.com/submissions/v3/integration/secure/submit/22676137/6bf52a8e-a2bf-431b-bb02-34d9d80c67e3](https://api.hsforms.com/submissions/v3/integration/secure/submit/22676137/6bf52a8e-a2bf-431b-bb02-34d9d80c67e3)’

It fails consistently when the email address sent has not already been a contact on Hubspot.

If there is a contact with that email. exactly the same code and data does not fail.

So I’m thinking this error message is happening further downstream in the process.

If there is any other specific information I can give you please let me know what it is.

thanks.

---

<div class="post-metadata">

**Author:** ![GRose4](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@GRose4](https://community.hubspot.com/u/GRose4)\
**Post date:** [March 10, 2023, 5:21am UTC](https://community.hubspot.com/t/error-submitting-to-hubspot-api-form/76700/4 "2023-03-10T05:21:16Z")

</div>

this turned out to be a data error with null fields from data imported from a previous application.
