Documentation

Organizations

Group your customers' people, invite them, and read the organization from the token.

All documentation

An organization is a group of a workspace's people that its applications treat as one customer. A person can belong to several. Accounts stay one per workspace; an organization is a membership, not a second account.

CallPurpose
POST /api/v1/auth/organizationsCreates one, with its roles (admin and member by default)
PUT /api/v1/auth/organizations/{id}/members/{userId}Adds a person or replaces their roles
POST /api/v1/auth/organizations/{id}/invitationsEmails an invitation link that works once, for 7 days
POST /api/v1/auth/organizations/{id}/domainsLists an email domain and returns its DNS verification record

In tokens

Tokens of a person acting in an organization carry org_id, org_slug and org_roles. Add organization=<id or slug> to the authorization request to sign in to one. Without it, a member of one organization gets that one, and a member of several chooses on the hosted page.

The OrganizationSwitcher component shows the current organization and switches by starting a new sign-in, so tokens always say which organization they are for.