Skip to main content
These endpoints provide a flexible way to ingest and manage external data without the need to map it to standard HubSpot CRM object schemas. Learn more about managing external datasets.

Create a data source

To create a data source, follow the instructions in the sections below based on whether you’re uploading JSON or another file format (including CSV, XLS, XLSX, or TSV).

Upload JSON data

To upload JSON as a data source, ensure you’ve authorized the data_integration.data_source.json.write scope for your app, then make a POST request to /data-studio/data-source/2026-09-beta/json. The code block below demonstrates an example cURL request:
When creating a data source from JSON data, the following parameters must be included in your request: The properties of the config parameter are detailed below: A successful response resembles the following:
The table below provides more details on each of the response fields:

Upload a CSV, XLS, XLSX, or TSV file

To upload a CSV, XLS, XLSX, or TSV file to create a reusable data source, make a POST request to /data-studio/data-source/2026-09-beta.
When creating a data source, the following multipart/form-data parameters must be included in your request: The request form parameter should be a JSON object that includes the following fields: Below is a description of the request body fields for the FILE data source type: A response would look like this:
Below is a description of the response body fields:

Retrieve a data source

To get details about a data source, including ingestion status and file structure, make a GET request to /data-studio/data-source/2026-09-beta/{datasourceId}, providing the ID of the data source as the datasourceId path parameter. For example, the following request would retrieve a data source:
A response would look like this:
Below is a description of the response body fields:

Push JSON data to an existing data source

To add records to an existing JSON data source without replacing its schema, make a POST request to /data-studio/data-source/2026-09-beta/{datasourceId}/data-push, providing the ID of the data source as the datasourceId path parameter. If a recordId was specified when creating or updating the data source, records with a matching ID will be updated. Records with no matching ID will be appended. If no recordId is configured, all records are appended. The code block below demonstrates an example cURL request to append two new records to an existing JSON-based data source:
The one required request body field, data, is detailed below:

Update the schema for an existing data source

To update the schema or upload additional data to an existing data source, consult the sections below based on the format of the data source you created (i.e., JSON data or an uploaded file).

Update an existing JSON-based data source

To replace the schema and optionally load new data into an existing JSON data source, make a PUT request to /data-studio/data-source/2026-09-beta/{datasourceId}/json, providing the ID of the data source as the datasourceId path parameter. When providing a new schema, it must include all existing columns in use, otherwise the request will be rejected. Any columns not included in the new schema are dropped. The code block below demonstrates an example request body to update a JSON-based data source:
The request body should include the following parameters:

Update an existing file-based data source

To upload a new file to overwrite an existing file-based data source in Data Studio, make a PUT request to /data-studio/data-source/2026-09-beta/{datasourceId}, providing the ID of the data source as the datasourceId path parameter. When providing a new schema, it must include all existing fields in use, otherwise the request will be rejected. Any missing fields in the new schema are dropped. When updating a data source, you can provide the same parameters as when you create a data source. For example, the following request body would update a data source:
Below is a description of the request body fields: Below is a description of the request body fields for the config object when updating a FILE data source type, which is the only currently supported type: A successful response will resemble the following:
Below is a description of the response body fields:

Rename an existing data source

To rename a data source, make a PATCH request to /data-studio/data-source/2026-09-beta/{datasourceId}, providing the ID of the data source as the datasourceId path parameter, and the datasourceName field in the request body with the new name for the data source. The new data source name cannot be blank and must be unique. This endpoint is supported for both JSON and file based data sources, but you’ll need to ensure you’ve authorized the corresponding data_integration.data_source.json.write scope or data_integration.data_source.file.write scope based on the format of the existing data source. The code block below demonstrates an example cURL request to rename an existing data source with an ID of 12354:

Delete a data source

To delete a data source, make a DELETE request to /data-studio/data-source/2026-09-beta/{datasourceId}, providing the ID of the data source as the datasourceId path parameter. A data source cannot be deleted if it’s actively used by datasets. You’ll receive a 204 No Content response on successful deletion with no response body. Status codes you could receive include:

Rate limits

Standard HubSpot API rate limits apply. Learn more about rate limits.
Last modified on July 20, 2026