---
title: "Archive datasets"
method: POST
path: "/datasets:archive"
tags: ["datasets"]
---

# Archive datasets

`POST /datasets:archive`

## Request

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

Archive datasets

## Request body

- DatasetsArchive: The request body for archiving Datasets.
  - `datasetIds` string[], required
  - `reason` 'Made in error' | 'Archived' | 'Other', required: The reason for archiving the provided Datasets. Accepted reasons may differ based on tenant configuration.

## Response `200`

OK

- DatasetsArchivalChange: IDs of all items that were archived or unarchived, grouped by resource type.
  - `datasetIds` string[]

## 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)
