PATCH
/api/organizations/{organization_id}/members/{uid}/roleAuthenticatedChange a member's role
Promotes a member to owner or demotes an owner to member. Only organization owners and platform administrators may change roles; the last owner cannot be demoted, the virtual admin role cannot be assigned, and roles in system organizations cannot be changed.
operationId
patch_api_organizations_organization_id_members_uid_roleOrganizationsAuthentication & permissionsAuthenticated
Any authenticated user
- Accepted credentials
- Auth server session (refresh token cookie)
cookie "refresh_token_<auth_server_app_id>" - Access token (cookie)
cookie "access_token_<auth_server_app_id>" - Access token (Bearer)
Authorization: Bearer <JWT>
- Auth server session (refresh token cookie)
- Who may call
- Any authenticated user
- Notes
- The caller must be an owner of the organization or a platform administrator.
Path parameters
| Name | Type | Description |
|---|---|---|
| organization_id* | string | Organization id (URL-safe slug) |
| uid* | string (uuid) | User id of the member |
Request body
Required
application/json
UpdateOrganizationMemberRoleRequest
| Property | Type | Description |
|---|---|---|
| role* | string | Membership role in the organization: |
JSONExample
"role""member"
Responses
application/json
SuccessMessageResponse
| Property | Type | Description |
|---|---|---|
| success* | true | |
| message* | string |
JSONExample
"success"true
"message""string"
Example request
bashcurl
curl -X PATCH 'https://auth.schemavaults.com/api/organizations/<organization_id>/members/<uid>/role' \
-b 'refresh_token_<auth_server_app_id>=<value>' \
-H 'Content-Type: application/json' \
-d '{
"role": "member"
}'