Skip to main content
Solved

Can a user's Primary Role be updated via the API?

  • October 18, 2023
  • 3 replies
  • 48 views

DannyPancratz
Forum|alt.badge.img+9

I don’t see it called out as an option in the PUT action for Update a field in user's profile, but maybe it’s possible. 

If so, what are the details for adding that into the call? 

(@leo-inspired / Gainsight DH team)

Best answer by ravi.kurma

Hi @DannyPancratz!

You can use this API Call:

https://api2-us-west-2.insided.com/docs/user/#operation/addRole

For example with this payload you can set the primary role as “super-user”. 

 

Some most used example roles:

roles.registered

roles.moderator

roles.community-manager

3 replies

ravi.kurma
  • Helper ⭐️⭐️⭐️
  • Answer
  • October 18, 2023

Hi @DannyPancratz!

You can use this API Call:

https://api2-us-west-2.insided.com/docs/user/#operation/addRole

For example with this payload you can set the primary role as “super-user”. 

 

Some most used example roles:

roles.registered

roles.moderator

roles.community-manager


DannyPancratz
Forum|alt.badge.img+9
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • October 19, 2023

Thanks, @ravi.kurma!

What’s the role for Unregistered / not logged in?  


ravi.kurma
  • Helper ⭐️⭐️⭐️
  • October 19, 2023

Thanks, @ravi.kurma!

What’s the role for Unregistered / not logged in?  

No problem! @DannyPancratz 

That would be:

roles.guest