Create a folder, or register a file after uploading its chunks
POST /openapi/memorylake/api/v1/drives/items
One endpoint, two modes — the item_type field selects which:
Folder (item_type: "folder") — creates an empty folder in the Library.
File (item_type: "file") — registers a file whose bytes are already in storage from a completed chunked upload. You must have called Create Upload first and collected every chunk’s ETag.
Pick the tab below that matches the item type you’re creating. Required fields differ by mode.
parent_item_id accepts the alias MY_SPACE (your workspace root). Pass it directly instead of looking up the root ID. You can also pass any folder’s item_id to nest deeper.
Behavior if the name already exists in parent_item_id:
rename(default) — append a numeric suffix (report_1.pdf).
deny — fail with 409 DRIVE_ITEM_CONFLICT.
overwrite — overwrite the existing file’s content in the Library. The existing item_id is preserved.
replace — delete the existing file and create a new one. A new item_id is issued; prior references to the old ID become stale.
overwrite only replaces the file bytes stored in the Library — it does not re-process or re-index any project documents that were previously imported from the file. To propagate new content into a project, call Add Documents again after the overwrite (or use a fresh file).
ID of the resulting item. With overwrite, this equals the existing file’s item_id (preserved). With replace, rename, or a fresh creation, a new item_id is issued.
Always read name from the response. With the default rename strategy, the server may have appended a suffix — the returned name is what you should display and store.