Documentation sections

Admin API: trash

Two Admin API methods for the trash: a list of archived campaigns, deleted offers and landing pages, and restoring an object by ID.

The API offers the same actions as the Trash section of the panel: get a list of objects and put an object back into use. Both methods require a token with Full access («Полный доступ») (full). Authorization is described on the Admin API: overview and authorization page, and the response and error format on the Request, response and error format page.

What is in the trash

kind valueObjectHow it gets into the trash
campaignA campaign in the archived stateDELETE /api/v1/campaigns/{id} or PUT /api/v1/campaigns/{id} with {"state":"archived"} — see Admin API: campaigns
offerA deleted offerDELETE /api/v1/offers/{id} — see Admin API: offers
landerA deleted landing pageDELETE /api/v1/landers/{id} — see Admin API: landing pages

An archived campaign is still returned by GET /api/v1/campaigns. Deleted offers and landing pages are not returned by the methods of their sections: a request by their id returns 404.

Streams and domains do not go to the trash: DELETE deletes them immediately.

Methods

List trash objects

http
GET /api/v1/page-trash

Returns all objects in the team's trash as a single list.

No path, query or body parameters. There is no pagination and no filtering: select records by kind and name on your side.

Response — code 200 and an array of objects sorted by deleted_at, newest first. If the trash is empty, you get an empty array [].

FieldTypeDescription
idstring, UUIDObject ID. The same as the campaign, offer or landing page ID in its own section
namestringObject name
kindstringType: campaign, offer or lander
deleted_atstring, RFC 3339 date and timeTime of deletion. For a campaign, the time of its last change

Request example:

bash
curl https://panel.example.com/api/v1/page-trash \
  -H "Api-Key: <token>"

Response example:

json
[
  {
    "id": "7b0c1d52-3f4e-4a6b-9c8d-1e2f3a4b5c6d",
    "name": "Nutra PL — prelander",
    "kind": "lander",
    "deleted_at": "2026-10-03T14:22:05.418332Z"
  },
  {
    "id": "c41a9e07-52bd-4f13-8a60-9d7e6f5a4b3c",
    "name": "FB PL Nutra",
    "kind": "campaign",
    "deleted_at": "2026-10-02T09:10:47.905114Z"
  }
]

Restore an object

http
POST /api/v1/page-trash/{id}/restore

Puts a campaign, offer or landing page from the trash back into use. The tracker determines the object type by its ID.

No request body.

ParameterWhereTypeRequiredDescription
idpathstring, UUIDyesThe id value from the trash list

Response — code 200:

json
{"ok": true}

Errors:

CodecodemessageWhen
404not_foundстраница не найдена (page not found)The trash has no object with this ID: the ID is wrong or the object has already been restored. An ID that is not a UUID gets the same response, not 400

Request example:

bash
curl -X POST https://panel.example.com/api/v1/page-trash/7b0c1d52-3f4e-4a6b-9c8d-1e2f3a4b5c6d/restore \
  -H "Api-Key: <token>"

After restoring

The object disappears from the trash list. Its settings, links to streams and hosted page files are kept.

TypeStateWhat to do next
Campaignstate is paused, the campaign link responds with 404Enable the campaign: PUT /api/v1/campaigns/{id} with {"state":"active"} — see Admin API: campaigns
OfferReturned again by the offer section methods. state is paused, no streams lead to itEnable the offer: PUT /api/v1/offers/{id} with {"state":"active"} — see Admin API: offers
Landing pageReturned again by the landing page section methods and takes part in the streams where it was selectedNothing

Restore limitations

  • Objects are restored one at a time: one request, one ID. There is no method for several objects.
  • A repeated request with the same ID returns 404: the object is no longer in the trash.
  • There is no method to delete an object permanently or to empty the trash. An object stays in the trash until it is restored.
  • A token works on behalf of its creator — an owner or an admin. That is why the list shows all trash objects and you can restore any of them, including an offer with PHP with network access («PHP с доступом в сеть») enabled — see PHP in hosted pages and network access. Team lead restrictions apply to work in the panel and are described on the Trash page.
  • When the license is inactive, both methods return 402 — see Expired license.
Updated Need help? ↗