W021: Resend invitation
Re-delivers a pending invitation email and pushes the expiry forward. Triggered from Settings, Users, pending invitations row.
Steps
-
Load and extend the invitation. Call
Platform.resendInvitation(id, orgId). The L2 op verifies the invitation exists in this org and is still pending, setsexpires_at = NOW() + 7 days, and returns the hydrated invitation. If the invitation is missing, accepted, or revoked, the call returns null. -
Re-send the email. Same accept link, same token. The recipient gets a fresh 7-day window.
Returns
The hydrated invitation with the new expiresAt.
Business rules
- Token stays the same. Resending does not rotate the token; the invite is the same invite, just delivered again with a refreshed deadline.
- Expiry extends by 7 days. Each resend resets the expiry to seven days from now. Resending an already-expired invitation revives it.
- Owner or admin only. Authorization is enforced at the request boundary.
Errors
NotFoundError. The invitation does not exist in this org, or is no longer pending (accepted or revoked).