---
title: "Preview User Role Change"
method: POST
path: "/internal/migration/users/{user_id}/preview"
tags: ["internal"]
---

# Preview User Role Change

`POST /internal/migration/users/{user_id}/preview`

Effective permissions before/after adding/removing roles — no writes. Lets you see the
impact of moving a user onto their company role before committing.

## Path parameters

- `user_id` string, uuid, required

## Request body

- UserRoleChangeRequest
  - `add_role_ids` string[]
  - `remove_role_ids` string[]

## Response `200`

Successful Response

- PermissionDiffResponse — Effective permission strings before/after a proposed role change, and the delta.
  - `before` string[], required
  - `after` string[], required
  - `added` string[], required
  - `removed` string[], required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/kobaltlabs/apis/fastapi.md) · [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kobaltlabs/fastapi/revisions/3ff4c0bd276b/schema)
