---
title: "Update member role"
url: https://hexelstudio.com/docs/api/ciam-core/organizations/update-member-role
---

# Update member role

**PATCH** `/organizations/{organization_id}/members/{member_id}`

Needs org:member:manage. The caller must outrank the role assigned and be the member, an owner, or outrank the member's current role (403 otherwise); the organization's last owner is never demoted (409 last_owner).

## Path parameters

- `organization_id: string`

  Organization ID

- `member_id: string`

  Member ID

## Headers

- `Authorization: string`

  `Bearer <token>`.

## Body parameters

- `role: optional string`

## Returns

`200` OK (`OrganizationMember`)

- `created_at: optional string`

- `deleted_at: optional string`

- `id: optional string`

- `invited_by_user_id: optional string`

- `joined_at: optional string`

- `left_at: optional string`

- `organization_id: optional string`

- `role: optional string`

  OWNER, ADMIN, MEMBER, VIEWER

- `status: optional string`

  ACTIVE, INACTIVE, SUSPENDED

- `updated_at: optional string`

- `user_id: optional string`

## Errors

- `400` Bad Request
- `403` Forbidden
- `404` Not Found
- `409` Conflict

## Example

```bash
curl --request PATCH \
  --url 'https://api.hexelstudio.com/v1/organizations/{organization_id}/members/{member_id}' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "role": "string"
}'
```

### Response (200)

```json
{
  "created_at": "2026-01-01T00:00:00Z",
  "deleted_at": "2026-01-01T00:00:00Z",
  "id": "string",
  "invited_by_user_id": "string",
  "joined_at": "2026-01-01T00:00:00Z",
  "left_at": "2026-01-01T00:00:00Z",
  "organization_id": "string",
  "role": "string",
  "status": "string",
  "updated_at": "2026-01-01T00:00:00Z",
  "user_id": "string"
}
```

### Response (400)

```json
{
  "key": "string"
}
```

### Response (403)

```json
{
  "key": "string"
}
```

### Response (404)

```json
{
  "key": "string"
}
```

### Response (409)

```json
{
  "key": "string"
}
```
