---
title: "Change an org member's role"
method: PATCH
path: "/api/orgs/{slug}/members/{userId}"
tags: ["Members"]
---

# Change an org member's role

`PATCH /api/orgs/{slug}/members/{userId}`

## Request

- Base URL: `https://trydock.ai`
- URL: `https://trydock.ai/api/orgs/{slug}/members/{userId}`
- Auth: HTTP bearer

admin/owner only. Owner role is immutable via this endpoint.

## Path parameters

- `slug` string, required
- `userId` string, required

## Request body

- object
  - `role` 'admin' | 'member', required

## Response `200`

Role changed.

- object
  - `ok` true, required

---

[API](https://skmtc.dev/trydock/apis/dock-rest-api.md) - [All operations](https://skmtc.dev/trydock/apis/dock-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trydock/apis/dock-rest-api/revisions/dd96ae96a412?raw)
