---
search:
  tags:
    - Members
    - PUT
seo:
  description: >-
    Replaces the Roles the member holds; requires member:update.… Reference for
    the PUT /organizations/{organizationId}/members/{userId} endpoint in the
    Auth API.
sidebar:
  label: Set a member's Roles
  badge: PUT
title: Set a member's Roles
type: openapi-operation
---
Replaces the Roles the member holds; requires member:update. Giving or taking a Role that grants organization:delete, such as owner, also requires organization:delete. The last owner keeps the owner Role (409). To take every Role away, remove the member.

`PUT /organizations/{organizationId}/members/{userId}`

**Request body** (`application/json`, required)

- `roles` (string[], required) — Names of the organization Roles the member holds.

Request body example:

```json
{
  "roles": [
    "string"
  ]
}
```

**Responses**

- `200` — The member and their Roles.
- `default` — The request failed.

Response example, 200:

```json
{
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "email": "string",
  "roles": [
    "string"
  ]
}
```
