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
sessionCookiecookie
better-auth.session_token<token>Interactive Better Auth browser session. Secure deployments may use the __Secure- cookie prefix.
memberId*stringUser ID of the organization member
application/json- body
role*stringValue 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.
Member updated
application/json- response
success?booleanmessage?stringdata?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" }}