Skip to Content
Docs

POST /api/folders/items

POST
/api/folders/items

File items into a folder: {type, folder_id, ids}; folder_id null takes them out of the tree of the workspace the request names. A team's folder holds only the team's own items and needs the Editor role (403 workspace_role_required); a personal folder holds the caller's own items and personal items shared with them. 409 team_item_not_fileable (a team's item into a personal folder) or item_not_in_team (anything else into a team's folder), with ids; nothing is filed then. Answers {success, moved: [ids], skipped: [ids the caller can't see]}.

Personal access token scope: agents:write or prompts:write or sources:write or tools:write.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Request Body

application/json
  1. body
folder_id?string

Target folder id, or null to unfile

ids*array<string>

Ids of items of that kind

type*string

agent, source, tool or prompt

Response Body

Success

Example Request
curl -X POST 'http://localhost:7091/api/folders/items' \  -H 'Content-Type: application/json' \  -d '{  "ids": [    "string"  ],  "type": "string"}'
Example Response200
Empty