---
title: "Create a dataset"
method: POST
path: "/datasets"
tags: ["datasets"]
---

# Create a dataset

`POST /datasets`

## Request

- Base URL: `https://{tenant_name}.benchling.com/api/v2-beta`
- URL: `https://{tenant_name}.benchling.com/api/v2-beta/datasets`
- Auth: HTTP bearer

Create a dataset. Note that a data frame must already exist to create a dataset. The data frame id is required in this request in order to create a dataset.

## Request body

- DatasetCreate
  - `customFields` CustomFields
  - `dataFrameId` string: ID of the data frame that
  - `folderId` string: ID of the folder that contains the file
  - `name` string: Display name for the file
  - `study_ids` string[], nullable: The study IDs that the dataset is associated with. If provided, the dataset will be associated with the provided studies. If not provided, the dataset will not be associated with any studies.

## Response `200`

Created

- Dataset
  - `archiveRecord` ArchiveRecord
    - `reason` string
  - `createdAt` string, date-time: Date and time the dataset was created
  - `creator` DatasetCreator: UserSummary of the user who created the dataset
    - `handle` string
    - `id` string
    - `name` string
  - `customFields` CustomFields
  - `dataFrameId` string: ID of the data frame to link to this dataset
  - `displayId` string: User-friendly ID of the dataset
  - `folderId` string: ID of the folder that contains the dataset
  - `id` string
  - `modifiedAt` string, date-time: Date and time the dataset was last modified
  - `name` string: The user-facing name for this Dataset.

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/benchling/apis/benchling-api-beta.md) - [All operations](https://skmtc.dev/benchling/apis/benchling-api-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/benchling/apis/benchling-api-beta/revisions/eba0b3d5b98e?raw)
