Skip to Content
Docs
ReferenceOrganise

Move files and folders

POST
/move_file

Moves files and folders of a project the user can edit into one folder, in a single call. Pass each item's entry_id from list_folder, never a media_id, and folder_id "root" for the project root or a folder's entry_id. A memory never moves inside another memory, and no other file named Memory.md moves into one: a memory reads its instructions only from its own Memory.md.

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 move.

Items1 <= items <= 25
folder_id*|

"root", or the entry_id of the folder to move them into.

Response Body

The operation's answer.

application/json
  1. response
entry_ids*array<string>
folder_id*string
Example Request
curl -X POST 'https://app.awen.ai/api/v1/move_file' \  -H 'Content-Type: application/json' \  -d '{  "project_id": "string",  "entry_ids": [    "string"  ],  "folder_id": "root"}'
Example Response
{  "entry_ids": [    "string"  ],  "folder_id": "string"}