---
title: "Recovers a deleted web app"
method: POST
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover"
tags: ["Sites"]
---

# Recovers a deleted web app

`POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

## Path parameters

- `resourceGroupName` string, required
- `name` string, required
- `subscriptionId` string, required

## Query parameters

- `api-version` string, required

## Request body

- CsmSiteRecoveryEntity: Class containing details about site recovery operation.
  - `snapshotTime` string, date-time: Point in time in which the site recover should be attempted.
  - `recoverConfig` boolean: If true, then the website's configuration will be reverted to its state at SnapshotTime
  - `siteName` string: [Optional] Destination web app name into which web app should be recovered. This is case when new web app should be created instead.
  - `slotName` string: [Optional] Destination web app slot name into which web app should be recovered

## Response `202`

Asynchronous operation in progress

- Site
  - `id` string: Resource Id
  - `name` string: Resource Name
  - `kind` string: Kind of resource
  - `location` string, required: Resource Location
  - `type` string: Resource type
  - `tags` object: Resource tags

## Other responses

- `404`: Web app not found

---

[API](https://skmtc.dev/azure/apis/website-management-client.md) - [All operations](https://skmtc.dev/azure/apis/website-management-client/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/website-management-client/revisions/e6d8fbd68044?raw)
