HOC SiteDocumentation

Files

Files and directories store media and documents used by pages, objects, and email. Uploads are multipart on the REST API; MCP accepts base64 and converts to multipart.

Listing needs website access. Uploads and mutations need writable file access on the website.

Files

List files and directories together, upload with multipart form data (max 5 GB per file), move files between directories, or soft-delete them. System-managed favicon assets are excluded from listings.

List files and directories. Optional includeDeleted=true.

GET /api/v1/{locale}/{websiteId}/files

Upload a file (maximum 5 GB). Multipart field name: file. Optional directory_id. Oversized uploads return an error that includes the file size and the 5 GB maximum.

POST /api/v1/{locale}/{websiteId}/files

Move (PATCH directoryId) or soft-delete a file.

PATCH|DELETE /api/v1/{locale}/{websiteId}/files/{fileId}
{
  "directoryId": "string | null"
}

MCP: get_files, upload_file (base64 content, max 5 GB decoded — assertWebsiteFileUploadSize), upload_file_from_url (CDN/R2 hosts only; other hosts return files.host_not_allowed), import_file_from_url (public HTTPS image, SSRF-guarded, resized to WebP; rejects non-images and bodies over 20 MB), save_file, delete_file. Prefer upload_file_from_url or REST multipart above ~1–2 MB of base64.