← All use cases
INV

SaaS Invitation Flows

Verify team invitation emails and magic links

Automatically E2E test invitation-based flows in your SaaS app: team member invitations, magic link authentication, shared links, and more. Verify email deliverability, link validity, and permission accuracy.

Why MailBrew for this use case

01

Full invitation flow automation

Auto-test the complete flow: send invite email, receive, click link, create account.

02

Magic link verification

Extract magic links from emails and verify validity, expiration, and single-use enforcement.

03

Permission testing

Verify that invited users receive the correct permissions (admin/member/viewer).

04

Parallel multi-invite testing

Test multiple invitation scenarios simultaneously with independent addresses per test.

Sample code

cURL

cURL
# cURL + MailBrew: SaaS invitation flow test
ADDRESS=$(curl -sS -X POST https://mailbrew.dev/api/mailbrew/addresses \
  -H "X-API-Key: $MAILBREW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ttl": 600}' | jq -r '.data.address')

curl -X POST https://myapp.com/api/team/invite \
  -H "Content-Type: application/json" \
  -d "{\"email\": \"$ADDRESS\", \"role\": \"member\"}"

curl -sS "https://mailbrew.dev/api/mailbrew/addresses/$ADDRESS/emails/wait?timeout=30" \
  -H "X-API-Key: $MAILBREW_API_KEY" | jq '.data[0]'

Ready to try this use case?

Get started with the free plan today. No credit card required.

Create free account →