Skip to main content

Update member

PATCH https://api.rollstack.com/public/v1/members/{userId}

Changes a member's role, authentication role or insights access. Send only the fields to change, at least one. The role can be admin or member: a key never makes anyone an owner.

Requires the users:write scope. Only owners and admins of the organization may call it.

Operation ID: updateMember. Only owners and admins can call it.

Path parameters

  • userId (integer, required): The member to act on, by the id from listMembers. An id that is not a member of the organization returns user-not-in-organization.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • role (string): The member's new role: admin to let them manage the organization's settings, members and invites, or member to take that away. A key can't make anyone an owner, admins can't change an owner's role, and you can't change your own. One of admin, member.
  • authenticationRole (string or null): The member's access to the organization's Authentication settings, where Single Sign-On (SSO) and SCIM provisioning are set up: viewer can see them, editor can also change them, and null gives no access. Owners always have full access, whatever this value. Only owners can change it, not admins. One of viewer, editor.
  • insightsEnabled (boolean): Whether the member can use Insights while the organization restricts them to the members it picks (restrictInsightUsers in updateOrganization). It has no effect while Insights are open to every member or turned off.

Response 200

Success

application/json

  • id (number, required): Unique identifier for the member. Pass it as userId to updateMember, deactivateMember or reactivateMember.
  • email (string, required): The email address of the member's Rollstack account.
  • name (string, required): The member's name, as shown in Rollstack.
  • role (string, required): The member's role in the organization. owner can do everything, including turning the organization's features on or off, choosing who can access its Authentication settings and, in the app, making other members owners. admin manages the organization's settings, members and invites, but can't turn features such as Insights or email analytics on or off, or change, deactivate or reactivate owners. member uses Rollstack without managing the organization. One of owner, admin, member.
  • authenticationRole (string or null, required): The member's access to the organization's Authentication settings, where Single Sign-On (SSO) and SCIM provisioning are set up: viewer can see them, editor can also change them, and null gives no access. Owners always have full access, whatever this value. One of viewer, editor.
  • insightsEnabled (boolean, required): Whether the member can use Insights while the organization restricts them to the members it picks (restrictInsightUsers in updateOrganization). It has no effect while Insights are open to every member or turned off.
  • status (string, required): Whether the member has access to the organization. active members do. deactivated members were removed from it, which revoked their API keys; reactivateMember restores their access, but not their keys. One of active, deactivated.
  • deactivatedAt (string (date-time) or null, required): When the member was deactivated. null while they're active.
  • deactivationReason (string or null, required): Why the member was deactivated: the reason an admin gave, or sso_deprovisioned when SSO removed them. null while they're active, or when no reason was given. One of left_company, no_longer_needs_access, not_using_enough, too_expensive, switching_tool, duplicate_account, sso_deprovisioned, other.
  • deactivationReasonDetails (string or null, required): What the admin wrote when deactivationReason is other. null otherwise.