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

# Move Folder Items

> Move saved searches to a folder

Moves multiple saved searches to a target folder. The saved searches being moved must have a type that matches the target folder's type.

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

<ParamField path="id" type="string" required>
  Target folder ID
</ParamField>

## Request Body

<ParamField body="items" type="string[]" required>
  Array of saved search IDs to move
</ParamField>

### Example Request

```json theme={null}
{
  "items": ["ss123", "ss456"]
}
```

## Response

Returns arrays of successfully moved and failed items.

```json theme={null}
{
  "moved": [
    { "id": "ss123", "type": "content" },
    { "id": "ss456", "type": "content" }
  ],
  "failed": []
}
```

### Partial Success Response

```json theme={null}
{
  "moved": [
    { "id": "ss123", "type": "content" }
  ],
  "failed": [
    {
      "id": "ss456",
      "type": "asset",
      "error": "Cannot move asset saved search to a content folder"
    }
  ]
}
```

## Error Responses

### Folder Not Found

```json theme={null}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Folder not found"
  }
}
```

### Type Mismatch

Type mismatches for individual items are returned in the `failed` array of the response, not as request-level errors. A request-level error only occurs when the target folder is not found.

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/folders/folder123/items" \
    -H "Authorization: Bearer YOUR_JWT" \
    -H "Content-Type: application/json" \
    -d '{
      "items": ["ss123", "ss456"]
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/folders/folder123/items',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_JWT',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        items: ['ss123', 'ss456']
      })
    }
  );

  const result = await response.json();
  console.log(`Moved ${result.moved.length} items, ${result.failed.length} failed`);
  ```
</CodeGroup>
