---
title: "Recently Deleted API endpoints"
description: "Endpoint reference for the Recently Deleted tag (2 endpoints): Deleted advertisers, campaigns, banners, sites, zones and placements of the last 90 days, and restoring them"
type: "reference"
audience: [network-manager, admin]
keywords: [api, rest, endpoints, recently, deleted]
---

Fetch the complete documentation index at: https://epom.com/ad-server/docs/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Recently Deleted API endpoints

Deleted advertisers, campaigns, banners, sites, zones and placements of the last 90 days, and restoring them. 2 endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see [REST API overview](https://epom.com/ad-server/docs/api.md). Parameters marked `form` go in an `application/x-www-form-urlencoded` request body.

### POST /rest-api/deleted-entities/{type}/{id}/restore.do

[Request examples](https://epom.com/ad-server/docs/api/recently-deleted/post-deleted-entities-restore.md)

Restore a deleted entity.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `type` | path | string | yes | ADVERTISER, CAMPAIGN, BANNER, SITE, ZONE or PLACEMENT (any case) |
| `id` | path | integer | yes | The deleted entity's id |

**Responses:** `200` — Restored · `404` — No such entity, or one the caller may not view · `409` — Not restorable: {success:false, message, reason, blockedBy?}. reason is NOT_DELETED, NOT_RECORDED (deleted before deletions were recorded, more than 90 days ago, or already restored), PARENT_DELETED (blockedBy {type, id, name} names the deleted advertiser, campaign, site or zone to restore first) or FILES_MISSING (a banner whose creative files are gone). Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/deleted-entities/list.do

[Request examples](https://epom.com/ad-server/docs/api/recently-deleted/get-deleted-entities-list.md)

List recently deleted entities.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `types` | query | array&lt;string&gt; | no | Only these entity types: ADVERTISER, CAMPAIGN, BANNER, SITE, ZONE, PLACEMENT. Default: all |
| `ancestorType` | query | string | no | With ancestorId: only entities under this ADVERTISER, CAMPAIGN, SITE or ZONE |
| `ancestorId` | query | integer | no | With ancestorType: the id of that advertiser, campaign, site or zone |
| `start` | query | integer | no | Skip this many items. Default 0 |
| `limit` | query | integer | no | How many items to return, 1-200. Default 50 |

**Responses:** `200` — {success, items:[...], total, start, returned, truncated, retentionDays}. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

## Related

- [REST API overview](https://epom.com/ad-server/docs/api.md) — authentication and conventions
- [API endpoint reference by tag](https://epom.com/ad-server/docs/api/endpoints.md)

<!-- Generated from the OpenAPI spec. Do not edit by hand. -->