# Method: alerts.undelete

- [HTTP request](https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/alerts/undelete#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/alerts/undelete#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/alerts/undelete#body.request_body)
  - [JSON representation](https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/alerts/undelete#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/alerts/undelete#body.response_body)
- [Authorization scopes](https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/alerts/undelete#body.aspect)
- [Examples](https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/alerts/undelete#examples)

Restores, or "undeletes", an alert that was marked for deletion within the past 30 days. Attempting to undelete an alert which was marked for deletion over 30 days ago (which has been removed from the Alert Center database) or a nonexistent alert returns a `NOT_FOUND` error. Attempting to undelete an alert which has not been marked for deletion has no effect.

### HTTP request

`POST https://alertcenter.googleapis.com/v1beta1/alerts/{alertId}:undelete`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `alertId` | `string` Required. The identifier of the alert to undelete. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "customerId": string } ``` |

| Fields ||
|---|---|
| `customerId` | `string` Optional. The unique identifier of the Google Workspace account of the customer the alert is associated with. The `customerId` must have the initial "C" stripped (for example, `046psxkn`). Inferred from the caller identity if not provided. [Find your customer ID](https://support.google.com/cloudidentity/answer/10070793). |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/alerts#Alert`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/apps.alerts`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).