Get Invitation
Get an invitation by token (public endpoint, no auth required).
Description
The Get Invitation endpoint retrieves invitation details using an invitation token. This is a public endpoint that does not require authentication, making it accessible to users who receive invitation links via email. The endpoint validates the invitation token and returns comprehensive invitation information including organization, workspace, role, and expiration details.
This endpoint is part of the Invitations API and is typically the first step in the invitation acceptance workflow. Users can view invitation details before deciding to accept, allowing them to understand what organization, workspace, and role they're being invited to.
Use Cases
- Invitation Preview: Users can preview invitation details before accepting
- Email Link Handling: Process invitation links received via email
- Invitation Validation: Verify invitation token validity and expiration status
- User Decision Making: Review organization, workspace, and role details before acceptance
Workflow Context
This endpoint is used in the following invitation acceptance workflow:
- User receives invitation email with invitation token
- User clicks invitation link or uses token to call this endpoint
- User reviews invitation details (organization, workspace, role)
- User decides to accept the invitation or decline
- If accepting, user must be authenticated to complete acceptance
Prerequisites
- Valid invitation token (received via email or invitation link)
- No authentication required (public endpoint)
- Invitation must not be expired or already accepted
Quick Navigation
Endpoint
GET /api/v1/invitations/{invitation_token}
Headers
None required (public endpoint)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invitation_token | string | Yes | Unique invitation token received via email or invitation link. This token is generated when an invitation is created via the Invite Member endpoint. |
Response
Success (200)
{
"success": true,
"data": {
"invitation": {
"id": 1,
"email": "user@example.com",
"organization": {
"id": 1,
"name": "Acme Corp"
},
"workspace": {
"id": 1,
"name": "Main Workspace"
},
"role": {
"id": 2,
"name": "Developer"
},
"expires_at": "2024-01-08T00:00:00Z"
},
"message": "Invitation retrieved successfully."
},
"message": "Invitation retrieved successfully."
}
Features
- Public Access: No authentication required, making it accessible to users who haven't yet created accounts
- Token Validation: Validates invitation token and checks expiration status
- Complete Details: Returns comprehensive invitation information including organization, workspace, role, and expiration
- Status Checking: Indicates if invitation is valid, expired, or already accepted
- Security: Token-based access ensures only users with valid invitation tokens can view details
Response Fields
| Field | Type | Description |
|---|---|---|
invitation | object | Invitation details object |
invitation.id | integer | Unique invitation identifier |
invitation.email | string | Email address the invitation was sent to |
invitation.organization | object | Organization details including ID and name |
invitation.workspace | object | Workspace details including ID and name where the user will be added |
invitation.role | object | Role details including ID and name assigned to the invited user |
invitation.expires_at | string (ISO 8601) | Timestamp when the invitation expires (typically 7 days from creation) |
Error Handling
If the invitation token is invalid, expired, or already accepted, the endpoint will return an appropriate error response. For more information on error handling, see Error Handling.
Related Endpoints
- Accept Invitation - Accept the invitation (requires authentication)
- List Invitations - List invitations (requires authentication and permissions)
- Invite Member - Create a new invitation (prerequisite)
See Also
- Invitations API Overview - Complete guide to invitation management workflows
- Organizations API Overview - Organization and member management
- Roles & Permissions API - Understanding roles and permissions
- Error Handling - Understanding API error responses