> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapengine.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Move Path

> Rename or move a workspace path.

## Overview

Renames or moves a file or directory within the session's workspace. Both `from` and `to` must be workspace-relative (no leading `/`, no `..`). Cross-filesystem moves are not supported — both paths live inside the same workspace.

## Path Parameters

<ParamField path="id" type="string" required={true}>
  Browser session ID (UUID).
</ParamField>

## Body

<ParamField body="from" type="string" required={true}>
  Source workspace-relative path.
</ParamField>

<ParamField body="to" type="string" required={true}>
  Destination workspace-relative path.
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/fs/move" \
    -H "Authorization: Bearer $SCRAPENGINE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "from": "downloads/invoice.pdf",
      "to": "archive/2026/invoice.pdf"
    }'
  ```
</CodeGroup>

## Response

### Success Response (200)

<ResponseField name="from" type="string">
  Original workspace-relative path.
</ResponseField>

<ResponseField name="to" type="string">
  New workspace-relative path.
</ResponseField>

**Example Response:**

```json theme={null}
{
  "from": "downloads/invoice.pdf",
  "to": "archive/2026/invoice.pdf"
}
```

### Error Responses

| Status | Description                                            |
| ------ | ------------------------------------------------------ |
| `400`  | Invalid `from` or `to`.                                |
| `401`  | Unauthorized — invalid or missing API key.             |
| `404`  | Session or source path not found.                      |
| `409`  | Destination already exists or crosses a non-directory. |
