Create Invitation
Create a new invitation to add a member to the account. Only the account owner can create invitations.Authentication
Requires authentication token and CSRF token.Path Parameters
The account ID (UUID)
Request Body
Email address of the user to invite
Encrypted account key to share with the invited user. This allows the invited user to decrypt account data.
Response
The created invitation object
Relative path to the invitation page (e.g.,
/invite/{token})Example Request
Example Response
Error Responses
400 Bad Request
403 Forbidden
List Invitations
Get all invitations for an account. Both owners and members can view invitations.Authentication
Requires authentication token.Path Parameters
The account ID (UUID)
Response
Array of invitation objects, ordered by creation date (newest first)
Example Request
Example Response
Get Invitation by Token
View invitation details using the invitation token. This endpoint is public and does not require authentication.Path Parameters
The invitation token (64-character hex string)
Response
Invitation details with account information
Whether the invitation has expired
Example Request
Example Response
Error Responses
404 Not Found
Accept Invitation
Accept an invitation and join the account. The authenticated user must have an email matching the invitation.Authentication
Requires authentication token.Path Parameters
The invitation token
Response
Success message
Updated invitation object with
accepted statusBasic account information
Example Request
Example Response
Error Responses
400 Bad Request
Update Invitation Key
Update the encrypted key for an existing pending invitation. Only the account owner can update invitation keys.Authentication
Requires authentication token and CSRF token.Path Parameters
The account ID (UUID)
The invitation ID (UUID)
Request Body
The new encrypted account key
Response
Indicates if the operation was successful
Example Request
Example Response
Error Responses
400 Bad Request
403 Forbidden
Revoke Invitation
Revoke a pending invitation. Only the account owner can revoke invitations.Authentication
Requires authentication token and CSRF token.Path Parameters
The account ID (UUID)
The invitation ID (UUID)
Response
Success message
Example Request
Example Response
Error Responses
403 Forbidden
404 Not Found
Invitation Flow
The invitation system follows this workflow:- Owner creates invitation: The account owner creates an invitation with the invitee’s email address and optionally includes an encrypted account key.
- Token generation: A unique 64-character hex token is generated, valid for 24 hours.
-
Invitation sent: The invitee receives the invitation link (
/invite/{token}). - Public verification: Anyone with the token can view basic invitation details (no auth required).
-
User accepts: The invited user (authenticated) accepts the invitation. The system verifies:
- The token is valid and not expired
- The user’s email matches the invitation email
- The user is not already a member
-
Member added: Upon acceptance, the user is added to the account with the
memberrole.
Key Sharing
TheencryptedKey field enables secure sharing of account encryption keys:
- The owner encrypts the account key before creating the invitation
- The encrypted key is stored with the invitation
- When the invitee accepts, they can decrypt the key and access encrypted account data
- Keys can be updated on pending invitations using the PATCH endpoint
Invitation States
- pending: Invitation created and waiting for acceptance
- accepted: User has joined the account
- expired: Invitation passed the 24-hour expiration time
- revoked: Owner cancelled the invitation before acceptance
Notes
- Invitations expire after 24 hours
- If a pending invitation exists for an email, creating a new one refreshes the token and expiration
- Only pending invitations can be revoked
- Users cannot accept invitations for accounts they’re already members of
- The invitation email must match the accepting user’s email
