Skip to Content
Docs
ReferenceOrganise

Move files and folders to the trash

POST
/trash_entries

Moves files and folders of a project the user can edit to the project's Trash, with everything inside the folders, as Delete in awen does. Pass each item's entry_id from list_folder, never a media_id. Nothing is deleted for good: restore_entries brings them back for 30 days with the entry_ids this answers, and only the user empties the Trash, in awen. A file still being made can't be trashed until it is ready. Ask the user before trashing files they did not ask to remove.

Needs a key with awen:write. Costs 2 units of the key's rate limit.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from Settings → Connected apps → API keys, sent as Authorization: Bearer awen_sk_…. Keep it on a server: a request from a web page is refused.

Request Body

application/json
  1. body
project_id*string

The project's project_id.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 128
entry_ids*array<>

The entry_id of each file and folder to trash.

Items1 <= items <= 25

Response Body

The operation's answer.

application/json
  1. response
project_id*string
entry_ids*array<string>
entry_count*integer
Range0 <= value <= 9007199254740991
Example Request
curl -X POST 'https://app.awen.ai/api/v1/trash_entries' \  -H 'Content-Type: application/json' \  -d '{  "project_id": "string",  "entry_ids": [    "string"  ]}'
Example Response
{  "project_id": "string",  "entry_ids": [    "string"  ],  "entry_count": 0}