Trash (management API)
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.
| Method | Path | What it does | Permission |
|---|---|---|---|
GET | /v1/manage/trash | List deleted things that can be restored | Read |
POST | /v1/manage/trash/{id}/restore | Restore something deleted | Read and write |
List deleted things that can be restored
Section titled “List deleted things that can be restored”/v1/manage/trashPermission: Read.
Deleted routes, banners, messages and so on, newest first, for 30 days after they were deleted.
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
area | string | No | Only this area, such as “routes”. |
limit | integer | No | How many to return, 1 to 100 (default 50). |
cursor | string | No | From 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:
| Field | Type | Description |
|---|---|---|
id | string | The trash entry’s id: restore with POST /trash/{id}/restore. |
area | string | What it was, such as “routes”. |
original_id | string | Its id before it was deleted; restoring brings it back with the same id. |
name | string | |
deleted_by | string | |
deleted_via | string | dashboard, api, or mcp:<AI tool>. |
deleted_at | string | |
restorable_until | string |
Restore something deleted
Section titled “Restore something deleted”/v1/manage/trash/{id}/restorePermission: 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:
| Parameter | Description |
|---|---|
id | The trash entry’s id. |
Response 200: the result in data, with warnings. With dry_run, a preview instead.
| Field | Type | Description |
|---|---|---|
restored | true | |
area | string | |
id | string | |
name | string |