Recently Deleted API endpoints
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
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. Parameters marked form go in an application/x-www-form-urlencoded request body.
POST /rest-api/deleted-entities/{type}/{id}/restore.do
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.
GET /rest-api/deleted-entities/list.do
List recently deleted entities.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
types | query | array<string> | 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.
Related
- REST API overview — authentication and conventions
- API endpoint reference by tag