---
title: "Set View As"
method: PATCH
path: "/api/v1/auth/me/view-as"
tags: ["v1", "Auth"]
---

# Set View As

`PATCH /api/v1/auth/me/view-as`

## Request

- Base URL: `https://api.jeevyfabrication.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jeevyfabrication.com/api/v1/auth/me/view-as`
- Auth: none declared

Set (shop_role_id) or clear (null) the admin's view-as role switch.

Platform-admin only (``require_platform_admin``). Note this is a role
SWITCH, not strictly a demotion any more: since the flag itself grants
nothing in-shop, an admin whose own row holds a low role could preview a
higher one. Acceptable — platform admins are trusted Jeevy staff who can
give themselves owner via the console anyway; the value of view-as is the
faithful preview, not a privilege boundary.

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api.md) - [All operations](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/revisions/ad9a01abeac9?raw)
