---
title: "Updates a JSON datasource"
method: PUT
path: "/data-studio/data-source/2026-09/{datasourceId}/json"
tags: ["Basic"]
---

# Updates a JSON datasource

`PUT /data-studio/data-source/2026-09/{datasourceId}/json`

## Request

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

Update an existing data source in HubSpot Data Studio. This endpoint allows you to fully replace an existing datasource. The schema and the data can be provided in the request.

## Path parameters

- `datasourceId` integer, required

## Request body

- DataSourceUpdateRequest
  - `config` DataSourceConfig
    - `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: New name of the datasource

## Response `200`

successful operation

- DataSourceUpdateResponse
  - `createdAt` string: Timestamp when the datasource was created.
  - `datasourceId` string, required: The unique identifier for the data source. It is an integer formatted as int64.
  - `datasourceName` string, required: The name of the data source. It is a string.
  - `previewLink` string, required: A URL string that provides a preview link for the data source.
  - `updatedAt` string: Timestamp when the datasource was updated.

## Other responses

- `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/:datasourceId/json/put.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)
