API
The API surface covers health checks, auth, analytics, contact, billing, webhooks, waitlist, scheduler, cron, and admin billing tasks.
| Category | Method | Path | Purpose |
|---|---|---|---|
| Health | GET | /api/health | Deployment and uptime probe. |
| Health | GET | /api/health/ready | Database readiness probe. |
| Auth | GET | /api/auth/me | Return the current authenticated profile. |
| Analytics | GET | /api/analytics/platform/range | Load platform metrics for a bounded range. |
| Analytics | GET | /api/analytics/revenue/range | Load revenue metrics for a bounded range. |
| Billing | POST | /api/billing/checkout | Create a provider checkout session. |
| Billing | POST | /api/billing/portal | Create a customer portal session. |
| Billing | GET | /api/billing/status | Return customer billing status. |
| Contact | POST | /api/contact | Validate, rate-limit, and store a contact message. |
| Cron | GET | /api/cron/data-retention | Run protected operational cleanup. |
| Cron | GET | /api/cron/notification-outbox | Process a protected notification batch. |
| Notifications | POST | /api/notifications/webhooks/resend | Apply verified Resend delivery updates. |
| Scheduler | POST | /api/scheduler/publish | Publish scheduled content. |
| Billing admin | POST | /api/system/billing/customers/[providerCustomerId]/sync | Refresh supported provider customer state. |
| Billing admin | GET | /api/system/billing/export | Export guarded billing records. |
| Billing admin | POST | /api/system/billing/refunds | Create a guarded provider refund. |
| Billing admin | PATCH | /api/system/billing/subscriptions/[providerSubscriptionId] | Apply a guarded subscription operation. |
| Waitlist | GET | /api/waitlist/confirm | Confirm a double-opt-in token. |
| Waitlist | GET | /api/waitlist/export | Export guarded waitlist records. |
| Waitlist | POST | /api/waitlist/signup | Validate and store a public signup. |
| Webhooks | POST | /api/webhooks/lemonsqueezy | Verify and process Lemon Squeezy events. |
| Webhooks | POST | /api/webhooks/stripe/billing | Verify and process Stripe billing events. |