---
title: "Update Member Role"
method: POST
path: "/api/v2/organizations/updateMemberRole"
tags: ["Organizations"]
---

# Update Member Role

`POST /api/v2/organizations/updateMemberRole`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/organizations/updateMemberRole`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Update a member's role in the organization. Requires ADMIN status or MEMBER_EDIT permission. For a member who signs in through WorkOS, the role is written to WorkOS first. A role your identity provider assigns through an explicit SSO or directory group role assignment is reapplied at the member's next sign-in or directory sync, so change such roles in the identity provider. Returns 412 when promoting a member who no longer belongs to the organization in WorkOS, or when demoting an admin listed in BETTER_AUTH_ADMIN_EMAILS.

## Request body

- OrganizationsUpdateMemberRoleRequest: Input for updating a member's role in the organization
  - `organizationId` string: Organization ID. If omitted, the organization is resolved from the authenticated user.
  - `userId` string, required: ID of the user whose role should be updated
  - `role` 'ADMIN' | 'MEMBER', required: The new role to assign to the member

## Response `200`

Successful response

- object
  - `ok` boolean

## Other responses

- `401`: Error Response
- `412`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
