Move a folder to another workspace
move_folder_to_workspace
Moves a folder and every site inside it into a different workspace, in a one-way move that cannot be undone.
The folder and all of its sites change owner, and each one has its creator rewritten to you, which cannot be recovered. Deleted sites stay behind in the old workspace. The tool tells the client to confirm with you before calling it.
You need the Move folders permission in the workspace the folder is leaving and an accepted membership in the one it is going to. The move is refused when the destination already holds a folder with the same name, when the two workspace ids are the same, and when the destination has too few project or site slots left on its plan.
A site whose code was moved to a connected GitHub account has that code copied back to Modulify first. So the move is also refused while that code is still being moved, when the Modulify app lost access to its repository, or when the repository was deleted on GitHub, and it stops when a copy fails, naming any sites whose code was already copied back. These answers start with The folder was not moved. See Move your code to GitHub.
Request
Call it with a POST to https://api.modulify.ai/v1/move_folder_to_workspace, sending the inputs below as a JSON object. The token needs the sites:delete scope.
This method is marked destructive: it deletes or overwrites data. Check the inputs before you call it, and send an Idempotency-Key header whenever you might retry it.
curl -X POST https://api.modulify.ai/v1/move_folder_to_workspace \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"folderId":"FOLDER_ID","currentWorkspaceId":"CURRENT_WORKSPACE_ID","workspaceId":"WORKSPACE_ID"}'Over MCP, the same method is the move_folder_to_workspace tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
folderId |
string | Yes | The folder to move, from list_folders. |
currentWorkspaceId |
string | Yes | The workspace it is in today. |
workspaceId |
string | Yes | The workspace to move it into, from list_workspaces. A token limited to specific workspaces must be allowed in both. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.