---
title: "Allow an account to switch its workspace role (admins only)."
method: PUT
path: "/admin/users/{userId}/workspace-role-switch"
tags: ["Admin"]
---

# Allow an account to switch its workspace role (admins only).

`PUT /admin/users/{userId}/workspace-role-switch`

## Request

- Base URL: `https://docs.sleeperhit.studio/api/v1`
- URL: `https://docs.sleeperhit.studio/api/v1/admin/users/{userId}/workspace-role-switch`
- Auth: HTTP bearer

Lets the account switch its own workspace role (Screenwriter, Content creator, Business) on every surface. Its role is not changed. 403 `admin_required` unless the credential's account is an admin right now; 404 `not_found` for an unknown id. Idempotent (`changed: false` when it was already on). Audited. Scope: `account:write`. Free.

## Response `200`

Switching is on for the account.

- WorkspaceRoleSwitchChange
  - `userId` string, required
  - `enabled` boolean, required
  - `changed` boolean, required: False when it already was that way: nothing was recorded.

## Other responses

- `401`: Missing, malformed, revoked, or expired API key.
- `403`: API key is valid but lacks the scope, is blocked by IP allowlist, or the account is disabled.
- `429`: Rate limit for this API key + IP + route family was exceeded.
- `500`: The API failed unexpectedly. Safe to retry with the same Idempotency-Key.

---

[API](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api.md) · [All operations](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api/revisions/64c1102ccb2f?raw)
