---
title: "Ingest a new dataset"
method: POST
path: "/dataset"
tags: ["dataset"]
---

# Ingest a new dataset

`POST /dataset`

Create a dataset element in SciCat and send the data to SciCat.

## Request body

- PostDatasetRequest
  - `metaData` string, required — The metadata of the dataset.
  - `userToken` string, required — the scicat token for acting on behalf of the user
  - `autoArchive` boolean — whether to autoarchive the dataset. Default is TRUE

## Response `200`

Dataset ingestion successful

- PostDatasetResponse
  - `datasetId` string, required — The created dataset's id
  - `transferId` string — The unique transfer id of the dataset transfer job.
  - `status` string — The status of the transfer. Can be used to send a message back to the ui.

## Other responses

- `400` — Invalid request
- `401` — Unauthorized access - you don't have access to the dataset or path indicated in the request
- `500` — Internal Server Error

## Changes

> 50 revisions in range; 3 not diffed.

- **2025-08-15** `effe6597c391` — 2 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `500`
- **2025-07-02** `714c2732319d` — 1 breaking, 1 info
  - the response property `transferId` became optional for the status `200`
  - added the required property `datasetId` to the response with the `200` status
- **2025-03-11** `aaecd793801d` — 1 info
  - added the new optional request property `autoArchive`
- **2025-02-03** `bd936a25135c` — 1 breaking, 1 warning, 1 info
  - added the new required request property `userToken`
  - removed the optional property `ingestId` from the response with the `200` status
  - added the required property `transferId` to the response with the `200` status
- **2025-01-31** `318e4879b08f` — 1 breaking, 1 warning, 1 info
  - added the new required request property `userToken`
  - removed the optional property `ingestId` from the response with the `200` status
  - added the required property `transferId` to the response with the `200` status

[Full history](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api/changes/dataset/post.md)

---

[API](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api.md) · [All operations](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/swissopenem/scicat-ingestor-api/revisions/f35bb454d121/schema)
