---
title: "UpdateOrgMemberRole"
description: "Change a member's role"
canonical: "https://pgbeam.com/docs/go-sdk/account/updateOrgMemberRole"
last-updated: "2026-09-07T06:13:50.000Z"
---

# UpdateOrgMemberRole

> Change a member's role

URL: https://pgbeam.com/docs/go-sdk/account/updateOrgMemberRole

Changes what a member is allowed to do. An organization must keep at least one owner, so the last owner cannot be demoted, and `owner` cannot be assigned here: ownership transfer is a separate, higher-privilege flow.

## Usage

## Parameters

Parameter

Type

Required

Description

ctx

`context.Context`

Yes

Request context

orgID

`string`

Yes

Unique organization identifier.

memberID

`string`

Yes

Unique organization membership identifier. Unlike the resources PgBeam mints itself, memberships carry no type prefix: the id is opaque and is assigned when the membership row is created. Read it from `listOrgMembers` rather than constructing it.

req

`pgbeam.UpdateOrgMemberRoleRequest`

Yes

Request body

req.Role

`pgbeam.AssignableOrgRole`

Yes

A role that can be assigned through the member API. This is `OrgRole` without `owner`: ownership is transferred through a separate flow, so requesting it here is rejected with a 400.

## Response

`(*pgbeam.OrgMember, error)`: the updated membership.

## Example

## Errors

Status

Description

400

Invalid request parameters.

401

Missing or invalid authentication.

403

Operation not allowed by current plan limits.

404

Resource not found.

409

Resource already exists or conflicts with current state.

429

Rate limited. Try again later.