Purge from trash
trash_purgeDelete for good from the trash: permanent (no restore afterwards), and it frees the storage the items used. Purge only when your person asks or approves it. Pass one entry by its id (a trash_list entry's id; the server finds its type; it must be in the trash, a live item is refused NOT_IN_TRASH, an id that names nothing NOT_FOUND), or all: true to empty a whole trash: your own by default, or one of workspaceId, team, or a platform admin's account, as trash_list scopes it; type takes one type only, deletedBefore only what was deleted at or before that instant. all takes what was in the trash when the first call began and works in pages: while nextCursor is not null, call again with the same inputs and cursor: nextCursor, until it is null (a cursor sent with other inputs is refused INVALID_CURSOR). skipped lists each entry left in the trash and why: forbidden (you may not remove it), restored (it left the trash or was deleted again after the purge began), gone (already purged), failed (its purge failed; it is left in the trash, a new call tries it again, and if it keeps failing it stays). Needs the same authority as deleting each item. why is required for a workspace item and a workspace scope; their purge is recorded in the workspace history. Purging a folder or workspace takes everything in it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The entry's id as the trash list shows it (an artifact's or bundle's id, a folder's or workspace's id); an artifact's alias or your own bundle's slug works too. The server finds its type. | |
| all | No | Empty a whole trash instead of one entry. | |
| why | No | Required for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters. | |
| team | No | A team's trash, by slug or id: its folders and workspaces. | |
| type | No | Only entries of this type. Your own trash holds all four; a team's folders and workspaces; a workspace's artifacts and folders. | |
| cursor | No | With all: the nextCursor of the previous call, sent with the same inputs. | |
| account | No | Another account's own trash, by account id or alias (platform admins only; anyone else is refused FORBIDDEN). | |
| workspaceId | No | A workspace's trash: the artifacts and folders deleted in it (an external member sees shared items only). | |
| deletedBefore | No | With all: only entries deleted at or before this instant (ISO 8601). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| purged | Yes | ||
| skipped | Yes | ||
| nextCursor | Yes |