# Update Member Role

> Make a member an admin, or an admin a plain member.

Requires an API key with the `write` scope.

N The key must have been created by the workspace **owner**. Not available while acting as a client workspace. Transferring ownership is not available through the API; use the app. The call writes an `audit.workspace_member.role_changed` entry.

## Path Parameters

<ParamField path="member_id" type="string" required>
  The member identifier (the `id` from List Members, not the user id).
</ParamField>

## Body Parameters

<ParamField body="role" type="string" required>
  `admin` or `member`.
</ParamField>

## Response

Returns the member in `data`.

<RequestExample>
```bash cURL
curl -X PATCH "https://api.foxreach.io/api/v1/workspace/members/wsm_abc123" \
  -H "X-API-Key: otr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"role": "admin"}'
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
client.workspace.update_member_role("wsm_abc123", "admin")
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
await client.workspace.updateMemberRole("wsm_abc123", "admin");
```

</RequestExample>

<ResponseExample>
```json
{ "data": { "id": "wsm_abc123", "userId": "usr_1", "email": "alex@yourcompany.com", "name": "Alex Doe", "picture": null, "role": "admin", "joinedAt": "2026-10-01T08:00:00+00:00" } }
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | The key lacks the `admin` or `write` scope, or its creator lacks the required role |
| `403` | Called while acting as a client workspace with `X-Workspace-Id` (`acting_as_forbidden`) |
| `400` | The owner cannot change their own role |
| `404` | Member not found in this workspace |
| `422` | A role other than `admin` or `member`, including `owner` |

## Rate Limit

- **120 requests per minute, shared by every `write` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`write`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
