Change member role
PUT
/manage/organizations/:orgId/members/:memberId/roleChange only a member's role. The last remaining ADMIN cannot be demoted.
| Auth | Login required |
|---|
Path parameters
orgIdstringrequiredOrganization ID.
memberIdstringrequiredMember ID.
Request body
rolestringrequiredOne of ADMIN / MEMBER.
Notes
When accessed with an OAuth access token, `email` fields are recursively removed from the response JSON (they are retained for session-authenticated dashboard access).
Request
curl https://api.4s.link/manage/organizations/ORG_ID/members/MEMBER_ID/role \-X PUT \-H "Authorization: Bearer 4s_at_..." \-H "Content-Type: application/json" \-d '{"role": "ADMIN"}'
Example response
{"id": "om1a2b3c-...","role": "ADMIN"}