Skip to content

Organization Members & Invitations ​

Organizations add members through an email invitation flow. The inviter selects a role, the invitee receives a link, and accepting the invitation creates their account and organization membership in one step.

Invitation Lifecycle ​

Key Behaviors ​

Role hierarchy enforcement — an inviter can only assign a role strictly lower than their own: an Admin can invite a Dev or a Viewer, not another Admin, and an Owner can invite an Admin, a Dev or a Viewer.

Invitations and member role changes are refused for roles without a level, that is, for any role outside the standard organization roles.

Duplicate detection — if the email already belongs to an organization member, or has a pending invitation, the request is rejected.

Account creation on accept — if the invitee is new to Grant, accepting the invitation creates their user record and an Organization-type account. Users can have at most two accounts: one Personal and one Organization.

Token-based authorization — the accept endpoint is not guarded by RBAC permissions since the invitee is not yet an organization member. Instead, the secure token itself serves as authorization.

Invitation States ​

StatusDescription
pendingInvitation sent, waiting for acceptance
acceptedInvitee accepted and joined the organization
expiredToken expiration passed (default: 7 days)
revokedInvitation revoked by an admin

Expired invitations can be renewed (generates a new token and expiration). Pending invitations can have their email resent.

REST Endpoints ​

MethodPathPermissionDescription
POST/inviteOrganizationInvitation:CreateSend an invitation email
POST/accept(token-based)Accept an invitation
GET/:tokenOrganizationInvitation:ReadLook up invitation by token
GET/OrganizationInvitation:QueryList invitations (filterable by status)
POST/:id/resend-emailOrganizationInvitation:ResendEmailResend the invitation email
POST/:id/renewOrganizationInvitation:RenewRenew an expired invitation
DELETE/:idOrganizationInvitation:RevokeRevoke a pending invitation

All mutating endpoints (except accept) require the inviter's email to be verified.

Permissions ​

Invitation management permissions are assigned to the OrganizationOwner and OrganizationAdmin roles by default:

GroupActions
OrganizationInvitationCommonQuery
OrganizationInvitationOwnerCreate, Revoke, ResendEmail, Renew
OrganizationInvitationAdminCreate, Revoke, ResendEmail, Renew

Member Management ​

Once a user has joined an organization, they appear in the organization members list. Members can be managed with the OrganizationMember resource:

ActionPermissionDescription
ReadOrganizationMember:ReadView member details
UpdateOrganizationMember:UpdateChange a member's role
RemoveOrganizationMember:RemoveRemove a member from the organization
QueryOrganizationMember:QueryList members (with optional status filter for invitations)

Related:

  • RBAC System — Roles and permission evaluation
  • Resources — OrganizationInvitation and OrganizationMember resource actions
  • Security — Email verification requirements

Released under the MIT License.