---
title: "Change somebody's role (owner only)"
method: PATCH
path: "/workspaces/{id}/members/{userId}"
tags: ["workspaces"]
---

# Change somebody's role (owner only)

`PATCH /workspaces/{id}/members/{userId}`

## Request

- Base URL: `https://api.swingfactor.ai/v1`
- URL: `https://api.swingfactor.ai/v1/workspaces/{id}/members/{userId}`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required
- `userId` string, uuid, required

## Request body

- RoleBody
  - `role` 'editor' | 'viewer', required

## Response `204`

No content.

## Other responses

- `401`: No token, or not a valid one: `unauthorized`.
- `403`: Owner only.

---

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