# Insert data directly from JSON to HubDB

**URL:** <https://community.hubspot.com/t/insert-data-directly-from-json-to-hubdb/81213>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [May 15, 2023, 2:40pm UTC](https://community.hubspot.com/t/insert-data-directly-from-json-to-hubdb/81213 "2023-05-15T14:40:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MTarnopolska](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@MTarnopolska](https://community.hubspot.com/u/MTarnopolska)\
**Post date:** [May 15, 2023, 2:40pm UTC](https://community.hubspot.com/t/insert-data-directly-from-json-to-hubdb/81213/1 "2023-05-15T14:40:14Z")

</div>

Hello,

We are looking into creating our product catalogue in HubDB based on our JSON table provided from an API.

I need to give a briefing to our developpers team about the way of integrating this data but I am lacking info.

We would like to be able to import the data directly from JSON to HubDB but I didn’t find any confirmation that it can be possible.

I know it’s possible to first transform it into a CSV file and then import to HubDB but we wouldn’t like to have to create a file and store it somewhere.

Is there any possiblity to directly stream the data from JSON to HubDB? If yes, is there any documentation about it?

Thanks a lot, HubSpot community 🤗

---

<div class="post-metadata">

**Author:** ![JBeatty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jbeatty/32/52252_2.png) [@JBeatty](https://community.hubspot.com/u/JBeatty)\
**Post date:** [May 15, 2023, 5:09pm UTC](https://community.hubspot.com/t/insert-data-directly-from-json-to-hubdb/81213/2 "2023-05-15T17:09:54Z")

</div>

Hi @MTarnopolska,

When using the [HubDB API](https://developers.hubspot.com/docs/api/cms/hubdb), you can only import, aka the “/cms/v3/hubdb/tables/{tableIdOrName}/draft/import” endpoint, via CSV. You are still able to add multiple rows via API using JSON by the “/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/create” endpoint which batch creates rows. That enpoint expects JSON to be sent in with the following format:

```lia-code-sample
{
 "inputs": [
 {
 "values": {
 "text_column": "sample text value",
 "number_column": 76,
 "multiselect": [
 {
 "id": "1",
 "name": "Option 1",
 "type": "option",
 "order": 0
 },
 {
 "id": "2",
 "name": "Option 2",
 "type": "option",
 "order": 1
 }
 ]
 },
 "path": "test_path",
 "name": "test_title",
 "childTableId": "1902373"
 }
 ]
}

```

Many of those fields above are optional, you can refer to the documentation to more information about the specific JSON format that endpoint is expecting.

Best,
