Supercheck LogoSupercheck
Organizations API

Update member role and projects

Update a member's role and project assignments. Cannot change the owner, your own role, or (as org_admin) another org_admin. Only org_owner can assign org_admin. Requires an interactive browser session. Project-scoped CLI tokens receive 403.

PUT
/api/organizations/members/{memberId}

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

Interactive Better Auth browser session. Secure deployments may use the __Secure- cookie prefix.

Path Parameters

memberId*string

User ID of the organization member

Request Body

application/json
  1. body
role*string
Value in"org_owner""org_admin""project_admin""project_editor""project_viewer"
selectedProjects?array<string>
projectAssignments?array<string|>

Accepted as project ID strings or { projectId } objects. Normalized to selectedProjects.

Response Body

Member updated

application/json
  1. response
success?boolean
message?string
data?
Example Request
curl -X PUT 'https://demo.supercheck.dev/api/organizations/members/string' \  -H 'Content-Type: application/json' \  -d '{  "role": "org_owner"}'
Example Response
{  "success": true,  "message": "string",  "data": {    "memberId": "string",    "newRole": "string",    "oldRole": "string"  }}