---
title: "Set and migrate user data path"
method: POST
path: "/api/userData/setPath"
tags: ["User Data"]
---

# Set and migrate user data path

`POST /api/userData/setPath`

## Request body

- SetUserDataPathDto
  - `userDataPath` string, required — The target user data directory

## Response `200`

- UserDataOperationResultDto
  - `success` boolean, required — Whether the operation succeeded
  - `message` string, required — Human-readable operation message
  - `conflicts` string[], required — Paths that could not be moved
  - `status` UserDataStatusDto, required
    - `appRoot` string, required — The application install/runtime root
    - `configRoot` string, required — The unified configuration directory
    - `configPath` string, required — The unified configuration file path
    - `defaultUserDataRoot` string, required — The default user data directory
    - `configuredUserDataRoot` string, required — The configured user data directory
    - `activeUserDataRoot` string, required — The currently active user data directory
    - `portableDataRoot` string, required — The portable data directory under app root
    - `isPortable` boolean, required — Whether portable mode is currently active
    - `hasPortableDataDir` boolean, required — Whether app root data dir exists
    - `legacyMigration` UserDataLegacyMigrationStatusDto, required
      - `hasLegacyGames` boolean, required — Whether legacy games exist in the install dir
      - `hasLegacyCustomTemplates` boolean, required — Whether legacy custom templates exist in the install dir
      - `hasLegacyDerivativeEngines` boolean, required — Whether legacy derivative engines exist in the install dir
      - `needsMigrationNotice` boolean, required — Whether UI should show the migration notice

## Changes

- **2026-06-06** `6d06510c66ba` — 1 info
  - endpoint added
- **2023-10-20** `bbfe1dbc457f` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/openwebgal/apis/webgal-terre-api/changes/api/userData/setPath/post.md)

---

[API](https://skmtc.dev/openwebgal/apis/webgal-terre-api.md) · [All operations](https://skmtc.dev/openwebgal/apis/webgal-terre-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openwebgal/webgal-terre-api/revisions/ebcacb42f932/schema)
