Endpoint
Authentication
This endpoint supports optional authentication:- Public invites: No authentication required
- Private invites: Authentication required, and the logged-in user’s email must match the invitation email
Query Parameters
The invitation token to look up.
Response
Success Response (200)
Always
true on success.Information about the user who created the invitation.
Information about the invitation itself.
Examples
Get Public Invite Details
Request:Get Private Invite Details
Request:[email protected] to become an “editor”. The requester must be logged in with that email to access this information.
Get Invite for Existing User Upgrade
Request:newAccount: false) to upgrade to the “admin” role.
Get Invite with Anonymous Inviter
Request:shareInviterName was set to false, the inviter’s name is not shared (returns null).
Error Responses
Invalid Token (400)
- Token doesn’t exist in the database
- Token has expired
- For private invites: Requester is not authenticated
- For private invites: Requester’s email doesn’t match the invitation email
- Invitation has been canceled or rejected
Inviter Not Found (400)
- The user who created the invitation no longer exists in the database
Behavior
Public Invites (no email)
- Validates the invitation token exists
- Retrieves inviter information
- Returns invitation and inviter details
- Anyone can access public invite details
Private Invites (with email)
- Validates the invitation token exists
- Checks if the requester is authenticated
- Verifies the requester’s email matches the invitation email
- Retrieves inviter information
- Returns invitation and inviter details
- Only the invited user can access private invite details
Use Cases
Display Invitation Information
Before activating an invitation, you can use this endpoint to show the user:- Who invited them
- What role they’ll receive
- Whether they need to create a new account or upgrade existing one
Validate Invitation Before Accepting
Check if an invitation is valid before proceeding with the activation flow:Display Inviter Information
Show a personalized message with the inviter’s details:Privacy Considerations
- The
shareInviterNamesetting controls whether the inviter’s name is shared - Private invites can only be viewed by the intended recipient
- Public invite details are accessible to anyone with the token
Source Code Reference
Implementation:src/routes/get-invite.ts:9-137
Related
- Create Invite - Create a new invitation
- Activate Invite - Activate an invitation token
- InviteType - Invitation data structure
- InviteOptions - Plugin configuration options