---
title: "Creates a JSON datasource"
method: POST
path: "/data-studio/data-source/2026-09/json"
tags: ["Advanced"]
---

# Creates a JSON datasource

`POST /data-studio/data-source/2026-09/json`

## Request

- Base URL: `https://api.hubapi.com`
- URL: `https://api.hubapi.com/data-studio/data-source/2026-09/json`
- Auth: none required

Creates a new JSON datasource with a defined column schema and optional inline data.

## Request body

- DataSourceCreateRequest
  - `config` DataSourceConfig, required
    - `file` FileStructureRequest
      - `columns` FileColumn[], required: List of columns to pick as datasource.
        - `name` string, required: The name of the column, represented as a string.
        - `type` string, required: The data type of the column, represented as a string.
      - `headerRowIndex` integer, required: Index of the header row. Starting with 1. Default is: 1
      - `sheetIndex` integer, required: Index of the sheet. Starting with 0. Default is: 0. Only relevant in case of XLS or XLSX.
    - `json` JsonDataRequest
      - `columns` FileColumn[], required: Columns of datasource with the type
        - `name` string, required: The name of the column, represented as a string.
        - `type` string, required: The data type of the column, represented as a string.
      - `data` object[], required: Initial data of the datasource
      - `recordId` string: Optional column-name which is used for identifying records of a datasource. This is required for updating single records of a datasource.
  - `datasourceName` string: Name of datasource

## Response `default`

An error occurred.

## Changes

- **2026-10-10** (2026-09) `48170f54a9e5`: 1 info
  - the endpoint scheme security `oauth2` was removed from the API

[Operation history](https://skmtc.dev/hubspot/apis/data-studio-datasource-ingestion/changes/data-studio/data-source/2026-09/json/post.md)

---

[API](https://skmtc.dev/hubspot/apis/data-studio-datasource-ingestion.md) - [All operations](https://skmtc.dev/hubspot/apis/data-studio-datasource-ingestion/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/data-studio-datasource-ingestion/revisions/48170f54a9e5?raw)
