Organizations, memberships and invitations
Put end users in your customers' organizations, invite them by email and let them switch organizations.
A membership joins one end user to one organization of the same environment, with a role slug and a state (active, pending or inactive).
Memberships
Section titled “Memberships”POST /adds a user.v1/ organizations/ {org}/ memberships GET /lists them.v1/ organizations/ {org}/ memberships PATCH /changes the role or state.v1/ organizations/ {org}/ memberships/ {membership} DELETE /removes the user from the organization.v1/ organizations/ {org}/ memberships/ {membership}
The role works with authorization: it becomes the role claim, and role assignments add more roles and permissions.
Invitations
Section titled “Invitations”POST /v1/invites emails an invitation, to an organization or to the environment. An invitation lasts 7 days and works once; POST / cancels it. An invalid, used or expired one answers invite_invalid. The answer to accepting an invitation does not reveal whether the address already had an account.
Organization switcher
Section titled “Organization switcher”When a user belongs to several organizations, the hosted login asks which one to use. Your app can also pass organization_id on the authorize request; the hosted pages then apply that organization’s sign-in method rules. The SDKs offer a switchOrganization call that runs the hosted login again; a live hosted session completes it without asking for credentials.
Blocking a user
Section titled “Blocking a user”Set a user’s state to blocked with PATCH /v1/users/{user}. A blocked user cannot sign in (user_blocked).