# move_site_to_workspace

Source: https://modulify.ai/docs/api/sites/move-site-to-workspace

Moves one site into another workspace you belong to, a heavy one-way move that makes you its creator there.

- Title: Move a site to another workspace
- Scope: `sites:delete`
- Access: Destructive
- Endpoint: `POST /v1/move_site_to_workspace`

This is **Move to workspace** on the site's card in the dashboard, described in [Move to another of your workspaces](https://modulify.ai/docs/projects/transfer-a-project#move-to-another-of-your-workspaces). You need the **Move projects** permission in both workspaces. It is a heavy, one-way move, so the tool tells the client to confirm with you before calling it.

You become the site's creator in the new workspace, and it leaves its folder and comes out of the Archive. It keeps its pages, files, database, environment variables, chat history and comments. Its enabled skills and connectors are cleared, its [email domains](https://modulify.ai/docs/built-in/emails#one-site-per-domain) are removed so it sends from its built-in address until someone in the new workspace adds them again, and its forwarding addresses start over with the new workspace owner's account email. Both plans then apply again, so a site that lands in a free workspace gets the Modulify badge back and its custom domains are paused there.

It is refused when the two workspace ids are the same, when the destination has no free project or site slot left on its plan, and when the site moved or was transferred less than 24 hours ago while it is in a free workspace. A site whose code lives in 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 there or once Modulify lost access to its repository, see [Sites whose code lives in your GitHub](https://modulify.ai/docs/projects/transfer-a-project#sites-whose-code-lives-in-your-github).

To hand a site to another person, use `transfer_site`. To move a whole folder, use `move_folder_to_workspace`.

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/move_site_to_workspace`, sending the inputs below as a JSON object. The token needs the `sites:delete` scope.

> **Warning**
>
> This method is marked destructive: it deletes or overwrites data. Check the inputs before you call it, and send an [Idempotency-Key](https://modulify.ai/docs/api/idempotency) header whenever you might retry it.

```bash
curl -X POST https://api.modulify.ai/v1/move_site_to_workspace \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","currentWorkspaceId":"CURRENT_WORKSPACE_ID","workspaceId":"WORKSPACE_ID"}'
```

Over MCP, the same method is the [move_site_to_workspace tool](https://modulify.ai/docs/mcp/sites/move-site-to-workspace).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site to move, from `list_sites`. |
| `currentWorkspaceId` | string | Yes | The workspace the site is in today. |
| `workspaceId` | string | Yes | The workspace to move it into, from `list_workspaces`. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) 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](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) 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](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.