Health Checks (No Auth Required)
# Liveness check
curl http://localhost:3000/api/v1/health
# Readiness check (includes DB & Redis)
curl http://localhost:3000/api/v1/ready
# Metrics
curl http://localhost:3000/api/v1/metrics
Admin Authentication Test
# Generate API key first
npm run gen-key "Test Key"
# Then test auth endpoint
curl -X GET http://localhost:3000/api/v1/admin/keys \\
-H "Authorization: Bearer YOUR_API_KEY"
Rate Limiting Test
# Send 101 requests (should fail after 100)
for i in {1..101}; do
curl http://localhost:3000/api/v1/health
done
# Should see: Too many requests (429 status)
Email Batch Test
curl -X POST http://localhost:3000/api/v1/batches \\
-H "Authorization: Bearer YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"template_id": "YOUR_TEMPLATE_ID",
"recipients": [
{"email": "user1@example.com", "name": "User 1"},
{"email": "user2@example.com", "name": "User 2"}
]
}'