---
title: Undelete request control
description: This control can be included in an add request to restore entries that have been soft-deleted and allow them to be normally accessed again. Learn more about soft deletes in Soft delete request control.
component: pingdirectory
page_id: pingdirectory:directory:controls/undelete-request-control
canonical_url: https://developer.pingidentity.com/pingdirectory/directory/controls/undelete-request-control.html
---

# Undelete request control

This control can be included in an [add request](../directory-entry-apis/create-entry-with-controls.html) to restore entries that have been soft-deleted and allow them to be normally accessed again. Learn more about soft deletes in [Soft delete request control](soft-delete-request-control.html).

The request body must contain the following attributes in addition to the `_controls` array, and no other attributes can be included:

* `_dn`: A mandatory string specifying the new DN to be assigned to the entry once it is undeleted.

* `ds-undelete-from-dn`: A mandatory string specifying the full DN of the soft-deleted entry. This DN is returned in the `soft-deleted-entry-dn` field when an entry is soft-deleted and it can be searched with appropriate permissions.

The following example shows the JSON encoding for the control:

```json
{
    "oid":"1.3.6.1.4.1.30221.2.5.23",
    "control-name":"Undelete Request Control",
    "criticality":true
}
```
