Skip to content
Dashboard
Theme
Theme

Organizations, memberships and invitations

Put end users in your customers' organizations, invite them by email and let them switch organizations.

View Markdown

A membership joins one end user to one organization of the same environment, with a role slug and a state (active, pending or inactive).

  • POST /v1/organizations/{org}/memberships adds a user.
  • GET /v1/organizations/{org}/memberships lists them.
  • PATCH /v1/organizations/{org}/memberships/{membership} changes the role or state.
  • DELETE /v1/organizations/{org}/memberships/{membership} removes the user from the organization.

The role works with authorization: it becomes the role claim, and role assignments add more roles and permissions.

POST /v1/invites emails an invitation, to an organization or to the environment. An invitation lasts 7 days and works once; POST /v1/invites/{invite}/revoke 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.

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.

Set a user’s state to blocked with PATCH /v1/users/{user}. A blocked user cannot sign in (user_blocked).