Update Role
PUThttps://api.confident-ai.com/v2/organization/members/{userId}
Replaces a member's organization role, which changes what they may do across the organization from their next request onwards. Assigning the Owner role transfers ownership: the member becomes Owner and the previous Owner is demoted to Admin in the same transaction. That is the only way the Owner's role changes — moving the Owner onto any other role directly is refused. A role id belonging to another organization is rejected, and the member's project roles are left untouched.
curl -X PUT "https://api.confident-ai.com/v2/organization/members/{userId}" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"roleId": "<ROLE-ID>"
}'{
"success": true,
"data": {
"id": "<USER-ID>",
"email": "jane@acme.com",
"name": "Jane Doe",
"image": null,
"organizationRole": {
"id": "<ROLE-ID>",
"name": "Admin"
}
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Path parameters
userIdstringRequiredThe id of the user whose organization membership to change.
Request body
roleIdstringRequiredThe id of the role to assign. It must be a Confident AI built-in role or one of the roles the organization or project owns.
Response
Update Role succeeded.
successbooleanIndicates if the request was successful.
dataobjectA user who belongs to your organization, with the role that decides what they can do in it. Organization membership alone grants no access to any project's data.
Show 5 propertiesHide 5 properties
idstringThis is the id of the user.
emailstringThis is the email address of the user.
namestring | nullThis is the display name of the user, or null when they have not set one.
imagestring | nullThis is the URL of the user's avatar, or null when they have none.
organizationRoleobject | nullThe role a member holds, as referenced from the member. Retrieve the role by id from the roles endpoint of the same scope to see the policies behind it.
Show 2 propertiesHide 2 properties
idstringThe id of the role.
namestringThe name of the role.
deprecatedbooleanIndicates if this endpoint is deprecated.