Reorder the folders
reorder_folders
Sets the order the folders of a workspace appear in on the dashboard.
Send every folder id in the order you want them. Each id you send takes its position from the list, while a folder you leave out keeps its old position and can end up tied with one you sent. Ids that do not belong to the workspace are ignored and the call still reports success, so call list_folders afterwards to confirm.
It needs the Edit folders permission in that workspace, and being a folder's creator is not enough. The built-in Archive is not a folder: it is not in list_folders and keeps its place in the sidebar. See Folders.
Request
Call it with a POST to https://api.modulify.ai/v1/reorder_folders, sending the inputs below as a JSON object. The token needs the sites:write scope.
It makes changes, so send an Idempotency-Key header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.
curl -X POST https://api.modulify.ai/v1/reorder_folders \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"workspaceId":"WORKSPACE_ID","folderIds":[]}'Over MCP, the same method is the reorder_folders tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
workspaceId |
string | Yes | The workspace whose folders are being ordered. |
folderIds |
array of strings | Yes | Every folder id, in the order they should appear. An empty list is refused. |
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.