Cloudflare Pages Functions ยท Firebase

SMTP API Backend

Server-managed authentication, domain allowlisting, encrypted SMTP credentials, email delivery, key usage counters, and administrator endpoints.

One send endpoint

POST /api/send/{apikey} resolves the API key to one whitelisted domain and, for Paid/Admin keys, one SMTP account.

Managed authentication

Use POST /api/auth for signup/signin. The function returns an opaque session token; clients do not access Firestore directly.

Server-side secrets

SMTP passwords are encrypted with one AES-256-GCM key stored as a Cloudflare Secret. No secrets are committed to the repository.

Check API health

Quick request example

POST /api/send/sk_live.{uid}.{keyId}.{secret}
Content-Type: application/json

{
  "to": "customer@example.com",
  "subject": "Welcome",
  "message": "Welcome to our service."
}

See the project README.md for Firebase setup, Cloudflare variables and secrets, Firestore rules, complete endpoint payloads, and deployment steps.