# Change a member's role or status

`PATCH /v1/orgs/{orgId}/members/{userId}`

Assigns a different role, or disables or re-enables a member. Nobody can assign a role ranked above their own.

Requires: permission members:manage; second factor for browser sessions

## Request body

- `role_key` (string): 
- `status` (enum):  One of active, disabled.

```json
{
  "role_key": "role key",
  "status": "active"
}
```

Errors: insufficient_rank, last_owner, cannot_disable_self, unknown_role, role_not_applicable

```bash
curl -X PATCH "https://sandbox-api.payezy.io/v1/orgs/$ORG_ID/members/$USER_ID" \
  -H "Authorization: Bearer $PAYEZY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "role_key": "role key",
  "status": "active"
}'
```
