Skip to content
Last updated

The UserInvitation object tracks invitation links sent to users to join an organization. It manages invitation lifecycle including expiration and usage tracking.

Properties

Identity

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).

Relationships

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.

Invitation Details

email string required

Email address where the invitation was sent.

Expiration

expires_at string required

Timestamp when the invitation expires. Format: ISO 8601 datetime string. Default: 7 days from creation.

Invitation Lifecycle

  1. Created: Admin invites user, invitation record created with unique invitation_key
  2. Sent: Email sent to user with invitation link containing invitation_key
  3. Pending: User has 7 days to accept invitation
  4. Accepted: User clicks link and completes registration
  5. Expired: If not accepted within 7 days, invitation becomes invalid

Security

  • Each invitation has a unique cryptographically secure invitation_key
  • Invitations automatically expire after 7 days
  • Email address is validated before sending