# When creating rows in batch on HubDB table, get "Invalid input JSON on line 1: values value"

**URL:** <https://community.hubspot.com/t/when-creating-rows-in-batch-on-hubdb-table-get-invalid-input-json-on-line-1-values-value/87846>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [August 18, 2023, 9:39pm UTC](https://community.hubspot.com/t/when-creating-rows-in-batch-on-hubdb-table-get-invalid-input-json-on-line-1-values-value/87846 "2023-08-18T21:39:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinglu](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jinglu](https://community.hubspot.com/u/jinglu)\
**Post date:** [August 18, 2023, 9:39pm UTC](https://community.hubspot.com/t/when-creating-rows-in-batch-on-hubdb-table-get-invalid-input-json-on-line-1-values-value/87846/1 "2023-08-18T21:39:42Z")

</div>

Hi,

We get errors “Invalid input JSON on line1, column xxx: values value” where xxx is varying when trying to create rows in batch on an existing HubDB table.

Could you please shed some light?

Thanks,

Jing

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [August 19, 2023, 10:44am UTC](https://community.hubspot.com/t/when-creating-rows-in-batch-on-hubdb-table-get-invalid-input-json-on-line-1-values-value/87846/2 "2023-08-19T10:44:35Z")

</div>

Hi @jinglu

Code you are use has some errors, you follow this curl as given

curl --location ‘[https://api.hubapi.com/cms/v3/hubdb/tables/\*\*tableId\*\*/rows/draft/batch/create](https://api.hubapi.com/cms/v3/hubdb/tables/ **tableId** /rows/draft/batch/create)’ \  
--header ‘authorization: Bearer access\_token’ \  
--header ‘content-type: application/json’ \  
--data ‘{  
“inputs”: [  
{  
“values”: {  
“name”: “Mayank”,  
“age”: 32,  
“gender”:“Male”  
}  
}, {  
“values”: {  
“name”: “Shubham”,  
“age”: 32,  
“gender”:“Male”  
}  
}  
]  
}’

In above curl

“name”: “Shubham”,

“age”: 32,

“gender”:“Male”

These are the column names with its values.

Results as shown in the screenshot

 ![GRajput_0-1692441854367.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/2/28e81e0df599c1d71a9e8b72d47c7f1326962645.png)

Hope this will helps you out. Please mark it as **Solution Accepted & Upvote** to help other Community member.  
Thanks!

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [August 19, 2023, 10:53am UTC](https://community.hubspot.com/t/when-creating-rows-in-batch-on-hubdb-table-get-invalid-input-json-on-line-1-values-value/87846/3 "2023-08-19T10:53:34Z")

</div>

Hi @jinglu,

There is likely an issue in the body of your request. Can you please share an example of your request body so I can help further. Below is a very basic example of how you can use the HubDB endpoint to create rows in batch:

```lia-code-sample
POST https://api.hubapi.com/cms/v3/hubdb/tables/5155793/rows/draft/batch/create
BODY
{
 "inputs": [
 {
 "values": {
 "name": "Peter Parker"
 }
 },
 {
 "values": {
 "name": "Bruce Banner"
 }
 }
 ]
}
RESPONSE
{
 "status": "COMPLETE",
 "results": [
 {
 "id": "77155012334",
 "createdAt": "2023-08-19T10:51:42.624Z",
 "updatedAt": "2023-08-19T10:51:42.624Z",
 "publishedAt": null,
 "values": {
 "name": "Bruce Banner"
 },
 "path": null,
 "name": null,
 "isSoftEditable": false,
 "childTableId": "0"
 },
 {
 "id": "77155012333",
 "createdAt": "2023-08-19T10:51:42.624Z",
 "updatedAt": "2023-08-19T10:51:42.624Z",
 "publishedAt": null,
 "values": {
 "name": "Peter Parker"
 },
 "path": null,
 "name": null,
 "isSoftEditable": false,
 "childTableId": "0"
 }
 ],
 "startedAt": "2023-08-19T10:51:42.620Z",
 "completedAt": "2023-08-19T10:51:42.638Z"
}

```

Resulting in:

 ![Screenshot 2023-08-19 at 11.52.54.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/d/cd253c37427491c16e84cf35a7a5c2e96c2264ed.png)

Again, if you are able to share more specifics with regards the request you are making, particularly the request body I should be able to point you in the right direction in terms of fixing your issues. 😊

---

<div class="post-metadata">

**Author:** ![jinglu](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jinglu](https://community.hubspot.com/u/jinglu)\
**Post date:** [August 19, 2023, 1:30pm UTC](https://community.hubspot.com/t/when-creating-rows-in-batch-on-hubdb-table-get-invalid-input-json-on-line-1-values-value/87846/4 "2023-08-19T13:30:12Z")

</div>

GRajput and Gaurav,

Thanks for reply. Will provide more details once error shows up again. We tried in Postman first and everything looked good. Errors come up when creating rows in batch in a script running at intervals.

Jing

---

<div class="post-metadata">

**Author:** ![jinglu](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jinglu](https://community.hubspot.com/u/jinglu)\
**Post date:** [August 23, 2023, 8:25pm UTC](https://community.hubspot.com/t/when-creating-rows-in-batch-on-hubdb-table-get-invalid-input-json-on-line-1-values-value/87846/5 "2023-08-23T20:25:31Z")

</div>

Hi, GRajput and Gaurav

It turns out that HubDB doesn’t accept value of **None** for some field. Once we replace None with empty string, everything works beautifully.

Thanks,

Jing
