# devices.storage.move

`POST /api/public/v1/devices/{id}/storage/move`

Move every profile folder of the machine to another absolute folder (worker 0.9.5+): refused while a browser runs; copied or renamed, verified file by file, then switched; progress and outcome appear in devices.list `storage.move`.

- Capability: `device.manage`
- Command: yes — send a `command_id`; resending the same id and body returns the stored receipt
- MCP tool: `devices_storage_move`

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes | Device id |
| `command_id` | body | string (uuid) | yes | Client-generated UUID for this command. Send the same id (and body) again to get the stored receipt instead of a second change; a different body under the same id is CONFLICT. |
| `to` | body | string | yes | Absolute folder on the machine, e.g. D:\Browlix\profiles or /srv/browlix/profiles; empty or new; never a network share (min length 2, max length 400) |

## Response

`201` with `{ data, replayed: false, correlation_id }` the first time; `200` with `replayed: true` for a repeated `command_id`.

The field list of this reply is not published yet; read `data` as JSON.

## Errors

| Code | HTTP | Retryable |
|---|---|---|
| `UNAUTHENTICATED` | 401 | no |
| `FORBIDDEN` | 403 | no |
| `RATE_LIMITED` | 429 | yes |
| `VALIDATION_FAILED` | 422 | no |
| `NOT_FOUND` | 404 | no |
| `CONFLICT` | 409 | no |
| `OUTCOME_UNKNOWN` | 202 | yes |
| `DEPENDENCY_UNAVAILABLE` | 503 | yes |
| `UNKNOWN` | 500 | no |

## Example (curl)

```bash
curl -X POST "https://browlix.com/api/public/v1/devices/<id>/storage/move" \
  -H "Authorization: Bearer $BROWLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command_id":"<uuid>","to":"<to>"}'
```

## Example (TypeScript SDK)

```ts
import { Browlix } from "@browlix/sdk";

const bx = new Browlix({ apiKey: process.env.BROWLIX_API_KEY! });
const reply = await bx.call("devices.storage.move", { path: { id: "<id>" }, body: {"to":"<to>"} });
console.log(reply.data);
```

## Example (Python)

```python
import os, uuid
import requests

r = requests.post(
    "https://browlix.com/api/public/v1/devices/<id>/storage/move",
    headers={"Authorization": f"Bearer {os.environ['BROWLIX_API_KEY']}"},
    json={"command_id":str(uuid.uuid4()),"to":"<to>"},
    timeout=60,
)
print(r.status_code, r.json())
```

## Example (MCP)

```json
{
  "method": "tools/call",
  "params": {
    "name": "devices_storage_move",
    "arguments": {
      "id": "<id>",
      "to": "<to>"
    }
  }
}
```
