---
title: "Replace a member's role set"
method: PATCH
path: "/v1/users/{user_id}/roles"
tags: ["Users"]
---

# Replace a member's role set

`PATCH /v1/users/{user_id}/roles`

## Request

- Base URL: `https://identity-api.paymongo.com`
- URL: `https://identity-api.paymongo.com/v1/users/{user_id}/roles`
- Auth: HTTP bearer

Overwrites the roles assigned to a member of the authenticated caller's organization. The caller cannot update their own roles or an account owner's roles. Platform-level roles require the caller's org to be a parent merchant.

## Path parameters

- `user_id` string, required

## Request body

- UserUpdateMemberRolesRequestEnvelopeDTO
  - `data` object
    - `attributes` UserUpdateMemberRolesRequestDTO
      - `roles` string[], required

## Response `200`

OK

- object: Standard response containing data and its metadata if any
  - `data` object
    - `attributes` UserMemberAttributesDTO
      - `confirmed` boolean
      - `contact_number` string
      - `created_at` integer
      - `department` string
      - `email` string
      - `first_name` string
      - `former_team_member` boolean
      - `last_name` string
      - `organization_id` string
      - `permissions` object: Permissions is the full permission catalog keyed as "module.action", true where one of the member's roles OR an enabled per-user grant (user_permissions) grants it, false otherwise.
      - `roles` string[]
      - `updated_at` integer
    - `id` string
    - `type` string
  - `has_more` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/paymongo/apis/identity.md) - [All operations](https://skmtc.dev/paymongo/apis/identity/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/identity/revisions/cc3056164874?raw)
