Skip to content

Trash (management API)

View as Markdown

Deleting a route, banner, message, landing page, bio page, audience, A/B test or webhook moves it to the trash for 30 days. Restoring brings it back with the same ID. Each area also has its own restore endpoint.

Every path also works under /v1/manage/appspaces/{appspace}, which you need when an OAuth token reaches more than one Appspace. See the management API overview for signing in, errors, dry runs and paging.

MethodPathWhat it doesPermission
GET/v1/manage/trashList deleted things that can be restoredRead
POST/v1/manage/trash/{id}/restoreRestore something deletedRead and write
GET/v1/manage/trash

Permission: Read.

Deleted routes, banners, messages and so on, newest first, for 30 days after they were deleted.

Query parameters:

ParameterTypeRequiredDescription
areastringNoOnly this area, such as “routes”.
limitintegerNoHow many to return, 1 to 100 (default 50).
cursorstringNoFrom the previous page’s next_cursor, to get the page after it.

Response 200: a page of results in data, and next_cursor for the next page (see Paging). Each item:

FieldTypeDescription
idstringThe trash entry’s id: restore with POST /trash/{id}/restore.
areastringWhat it was, such as “routes”.
original_idstringIts id before it was deleted; restoring brings it back with the same id.
namestring
deleted_bystring
deleted_viastringdashboard, api, or mcp:<AI tool>.
deleted_atstring
restorable_untilstring
POST/v1/manage/trash/{id}/restore

Permission: Read and write. Changes something: takes dry_run and Idempotency-Key, and needs the Standard plan or above.

Brings it back with the same id, within 30 days of deleting it. Refuses with 409 conflict when its id, or something that must be unique (a route’s path, say), has been taken since.

Path parameters:

ParameterDescription
idThe trash entry’s id.

Response 200: the result in data, with warnings. With dry_run, a preview instead.

FieldTypeDescription
restoredtrue
areastring
idstring
namestring
Was this page helpful?