Skip to content

List your trash

GET
/account/trash

Returns deleted assets, posts and collections that you own, or that you deleted for someone else, most recently deleted first, one page at a time.

You need to be signed in; no capability is needed. Without a session cookie or bearer token that identifies you, the answer is 401, whether or not public mode is on. A limit that isn’t a whole number, or a parameter given twice, gets a plain-text 400 before sign-in is checked. After sign-in, a scope other than the two values, an empty one included, gets 400, and so does a cursor that can’t be read.

With scope set to owned_by_me, the default, you get every deleted item you own, whoever deleted it. With deleted_by_me you get the ones you deleted that belong to someone else, or to no one. No item is in both. Only the item’s current owner and its recorded deleter are compared; whether you can still see the item isn’t checked.

Each item shows its kind, id, title, when it was deleted and the reason given, but not who owns it or who deleted it. restorable_by_caller is true when you deleted the item yourself or hold system.admin granted globally. As the owner you can’t restore what someone else deleted; ask for it back with requestRestore instead. The value is worked out when the list is read, so the restore call can still fail, for example if the item was restored, deleted again or permanently deleted in the meantime.

restore_requested is true while you have a pending request to get the item back. purge_after is when the item becomes due for permanent deletion under the current setting: when it was deleted plus the retention period set for its kind, 30 days unless an administrator has changed it. It is only a guide, not a deadline: permanent deletion runs once a day, a batch at a time, so it usually comes later, a change to the setting moves it, and a pending request doesn’t hold it back.

Pages hold at most limit items, 50 unless you ask for another number; values below 1 count as 1 and above 200 as 200. Items deleted at the same moment come in a fixed order by id. When more remain, next_cursor is set: send it back as cursor, with the same scope, to get the items deleted before the last one on the page. Each page is read separately, so items restored, deleted or removed between requests can move, appear or disappear. Server errors get a plain-text 500.

scope
string
default: owned_by_me
Allowed values: owned_by_me deleted_by_me

owned_by_me, the default, for deleted items you own, whoever deleted them; deleted_by_me for items you deleted that you don’t own. No item is in both. Any other value gets 400.

limit
integer
default: 50 >= 1 <= 200

How many items per page, 50 if left out; values below 1 count as 1 and above 200 as 200.

cursor
string

The next_cursor from the previous page, to get items deleted earlier. Left out or empty, the page starts from the most recent; one that can’t be read gets 400.

A page of your deleted items, most recently deleted first.

object
items
required

Up to limit items, most recently deleted first; empty when there are none.

Array<object>

A deleted asset, post or collection: what it is, when it was deleted and whether you can restore it.

object
kind
required

The item’s type, which decides the restore call: restoreAsset, restorePost or restoreCollection.

string
Allowed values: asset post collection
id
required

The item’s id.

string format: uuid
title
required

The item’s title, or the name for a collection. It can be empty.

string
deleted_at
required

When it was deleted.

string format: date-time
restorable_by_caller
required

Whether you can restore it: true when you deleted it or hold system.admin granted globally. Worked out when the list was read; the restore call checks again.

boolean
deleted_reason

The reason given when the item was deleted, left out when there was none. In owned_by_me it can be the words of whoever deleted it.

string
nullable
restore_requested
required

Whether you have a pending request to get this item back. Only your own requests count.

boolean
purge_after

When the item becomes due for permanent deletion under the current setting: when it was deleted plus the retention period set for its kind. Only a guide: deletion usually comes later, and changing the setting moves this time. Left out when the setting can’t be read.

string format: date-time
nullable
next_cursor

Send this back as cursor, with the same scope, for the next items. Left out when there are no more.

string
nullable

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Unexpected server error

object
error
required

Human-readable error summary

string
Example
the request could not be completed