Skip to main content

API: Magic Link Emails and Unsubscribe Verification

non-critical   Property: ChurchWiseAI   Category: API / Integration Tier: all Persona: devops Touchpoint: /api/email/*, magic links, unsubscribe endpoints

Preconditions

  • Email service configured (SendGrid, Mailgun, etc.)
  • Magic link generation implemented

Steps

#ActionExpected Result
1Trigger email with magic link (e.g., password reset)Email sent within 5 seconds. Email received with valid magic link.
2Click magic link in emailLink works. Redirects to authenticated state. Expires after 24 hours.
3Try to reuse expired magic linkReturns 401 or 'link expired'. Doesn't grant access.
4Send email with unsubscribe linkEmail includes List-Unsubscribe header and unsubscribe link.
5Click unsubscribe linkUser unsubscribed. Future emails don't send to this address.
6Test deliverability (check spam folder)Email arrives in inbox, not spam folder. SPF/DKIM configured.
7Verify email sending rate limitsCan send up to 100 emails/min without throttling. Rate limit enforced beyond that.
8Check for PII in emailsNo passwords, API keys, or sensitive data in email body.

Known Failure Modes

  • Magic links don't work — password resets fail
  • Magic links never expire — security risk
  • Unsubscribe doesn't work — GDPR violation
  • Emails marked as spam — poor deliverability
  • PII in emails — privacy breach

References

Notes

Tests email deliverability and magic link security. Emails are critical for password resets, onboarding, and notifications. Bad email infrastructure means users locked out and poor onboarding. Must verify deliverability, link expiry, unsubscribe compliance, and no PII leaks.