The UserInvitation object tracks invitation links sent to users to join an organization. It manages invitation lifecycle including expiration and usage tracking.
invitation_id string required
Unique invitation identifier. Format: inv_ followed by alphanumeric characters.
invitation_key string required
Unique invitation key sent in email. This is the token users use to accept invitations.
is_new_user boolean required
Whether this invitation is for a new user (true) or existing user (false).
user_id string required
Reference to the User being invited. User record is created before invitation is sent.
organization_id string required
Reference to the Organization the user is being invited to.
role_id string required
Reference to the Role that will be assigned when the invitation is accepted.
email string required
Email address where the invitation was sent.
expires_at string required
Timestamp when the invitation expires. Format: ISO 8601 datetime string. Default: 7 days from creation.
- Created: Admin invites user, invitation record created with unique
invitation_key - Sent: Email sent to user with invitation link containing
invitation_key - Pending: User has 7 days to accept invitation
- Accepted: User clicks link and completes registration
- Expired: If not accepted within 7 days, invitation becomes invalid
- Each invitation has a unique cryptographically secure
invitation_key - Invitations automatically expire after 7 days
- Email address is validated before sending