HOC SiteDocumentation

Directories

Directories nest under an optional parent. Delete removes the folder and its nested subdirectories in one call when the whole subtree is file-free.

Create a directory.

POST /api/v1/{locale}/{websiteId}/files/directories
{
  "name": "string",
  "parentId": "string?"
}

Rename or move a directory with PATCH. DELETE removes the directory and every nested subdirectory when no file (including in child folders) still references them; otherwise the API returns an error. Move or delete files first.

MCP: save_directory, delete_directory.

PATCH|DELETE /api/v1/{locale}/{websiteId}/files/directories/{directoryId}