---
title: "Set or Clear the Staff View-as Role"
method: PATCH
path: "/v2/profile/view-as"
tags: ["profile"]
---

# Set or Clear the Staff View-as Role

`PATCH /v2/profile/view-as`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/profile/view-as`
- Auth: HTTP bearer

Previews the current org through the given role's eyes: permission
resolution intersects the role with the staff baseline, so it can only
narrow access. A null role id clears the preview.

## Request body

- ViewAsRequest
  - `role_id` string, nullable, required

## Response `200`

Successful Response

- ViewAsSchema
  - `role` RoleSummary, required: Lightweight role for nested relationships.
    - `id` string, required
    - `slug` string, required
    - `name` string, required
    - `is_system` boolean, required

## Other responses

- `404`: Not Found
- `422`: Unprocessable Content

---

[API](https://skmtc.dev/stuut/apis/stuut-api.md) - [All operations](https://skmtc.dev/stuut/apis/stuut-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stuut/apis/stuut-api/revisions/3b5ab941f918?raw)
