JavaScript
const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: JSON.stringify({role_ids: ['<string>']}) }; fetch('https://api.keystoneos.xyz/v1/platforms/me/members/{user_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "user_id": "<string>", "email": "<string>", "name": "<string>", "picture": "<string>", "roles": [] }
Replace a member’s roles within the organization. All current roles are removed and replaced with the provided role_ids. You cannot change your own roles.
Auth0 JWT access token. See Authentication for details.
Successful Response
Show child attributes