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 value | Object | How it gets into the trash |
|---|---|---|
campaign | A campaign in the archived state | DELETE /api/v1/campaigns/{id} or PUT /api/v1/campaigns/{id} with {"state":"archived"} — see Admin API: campaigns |
offer | A deleted offer | DELETE /api/v1/offers/{id} — see Admin API: offers |
lander | A deleted landing page | DELETE /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
GET /api/v1/page-trashReturns 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 [].
| Field | Type | Description |
|---|---|---|
id | string, UUID | Object ID. The same as the campaign, offer or landing page ID in its own section |
name | string | Object name |
kind | string | Type: campaign, offer or lander |
deleted_at | string, RFC 3339 date and time | Time of deletion. For a campaign, the time of its last change |
Request example:
curl https://panel.example.com/api/v1/page-trash \
-H "Api-Key: <token>"Response example:
[
{
"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
POST /api/v1/page-trash/{id}/restorePuts a campaign, offer or landing page from the trash back into use. The tracker determines the object type by its ID.
No request body.
| Parameter | Where | Type | Required | Description |
|---|---|---|---|---|
id | path | string, UUID | yes | The id value from the trash list |
Response — code 200:
{"ok": true}Errors:
| Code | code | message | When |
|---|---|---|---|
404 | not_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:
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.
| Type | State | What to do next |
|---|---|---|
| Campaign | state is paused, the campaign link responds with 404 | Enable the campaign: PUT /api/v1/campaigns/{id} with {"state":"active"} — see Admin API: campaigns |
| Offer | Returned again by the offer section methods. state is paused, no streams lead to it | Enable the offer: PUT /api/v1/offers/{id} with {"state":"active"} — see Admin API: offers |
| Landing page | Returned again by the landing page section methods and takes part in the streams where it was selected | Nothing |
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.