v1

latestOpenAPI 3.1.02026-07-2295105298.6 KB
Team Management

Update Organization Member Role

Updates an organization member's role. Accepts either the coarse role (admin/viewer) or a role_id — a system role or one of your organization's custom roles (see GET /api/v1/roles); provide exactly one. Requires a global API key. Cannot modify the API key's owning user or the organization owner. Cannot demote the last remaining admin.

patch/api/v1/organizations/members/{user_id}

Request body

role'admin' | 'viewer'

Coarse role to assign. Mutually exclusive with role_id.

role_idstring

Assign any role by ID — a system role or one of your organization's custom roles (see GET /api/v1/roles). Mutually exclusive with role. Returns 404 if the role does not exist or belongs to another organization. System role IDs are GUID-shaped sentinels (e.g. 00000000-0000-0000-0000-000000000001), not RFC 4122 UUIDs.

Example request

{
  "role": "admin",
  "role_id": "789e0123-e89b-12d3-a456-426614174000"
}

Response

Member role updated successfully

successboolean required

Example response

{
  "success": true,
  "member": {
    "role": "admin"
  }
}