# Change a member's role (admin+; only an owner may set/clear owner)

`PUT https://api.instacloud.com/orgs/{orgId}/members/{userId}`

**Token scope:** `account` · `org` — read-only tokens refused (not a GET).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | path | `string` | yes |  |
| `userId` | path | `string` | yes | Better Auth user id (opaque string, not a UUID) |

## Request body (application/json)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `role` | `"owner" \| "admin" \| "member"` | yes |  |

## Response 200

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ok` | `boolean` | no |  |

## Response 400

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes |  |

## Response 403

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes |  |

## Response 404

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes |  |
