---
title: "POST /projects/{+projectId}/datasets/{+datasetId}:undelete"
method: POST
path: "/projects/{+projectId}/datasets/{+datasetId}:undelete"
tags: ["datasets"]
---

# POST /projects/{+projectId}/datasets/{+datasetId}:undelete

`POST /projects/{+projectId}/datasets/{+datasetId}:undelete`

Undeletes a dataset which is within time travel window based on datasetId. If a time is specified, the dataset version deleted at that time is undeleted, else the last live version is undeleted. # IAM Permissions Requires the following IAM permission(s) to use this method: - `bigquery.datasets.create` on the project. - `bigquery.datasets.get` on the dataset.

## Path parameters

- `projectId` string, required
- `datasetId` string, required

## Request body

- UndeleteDatasetRequest — Request format for undeleting a dataset.
  - `deletionTime` string, google-datetime — Optional. The exact time when the dataset was deleted. If not specified, the most recently deleted version is undeleted. Undeleting a dataset using deletion time is not supported.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/bigquery.md) · [All operations](https://skmtc.dev/google/apis/bigquery/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/bigquery/revisions/98f33ea9c8c9/schema)
