API

The API surface covers health checks, auth, analytics, contact, billing, webhooks, waitlist, scheduler, cron, and admin billing tasks.

CategoryMethodPathAuthenticationPurposeImportant behavior
HealthGET/api/health/readyPublicDatabase readiness probe.Checks the server database dependency and fails when it is unavailable.
AuthGET/api/auth/meSupabase sessionReturn the current authenticated profile.No-store identity read; fail closed when no active profile exists.
AnalyticsGET/api/analytics/platform/rangeSession + insights accessLoad platform metrics for a bounded range.Validates date range, masks sensitive values by permission, and returns no-store data.
AnalyticsGET/api/analytics/revenue/rangeSession + insights accessLoad revenue metrics for a bounded range.Validates date range, masks sensitive values by permission, and returns no-store data.
BillingPOST/api/billing/checkoutSupabase sessionCreate a provider checkout session.Validates catalog-owned selection and rate-limits provider session creation.
BillingPOST/api/billing/portalSupabase sessionCreate a customer portal session.Resolves the signed-in billing customer and rate-limits provider calls.
BillingGET/api/billing/statusSupabase sessionReturn customer billing status.Reads account-owned local billing projection and provider readiness.
ContactPOST/api/contactPublic or session-awareValidate, rate-limit, and store a contact message.Normalizes input, enforces abuse controls, persists the message, and queues notification work.
CronGET/api/cron/data-retentionCRON_SECRET bearerRun protected operational cleanup.Rejects invalid secrets and deletes bounded batches according to retention policy.
CronGET/api/cron/notification-outboxCRON_SECRET bearerProcess a protected notification batch.Atomically claims bounded work, retries transient failures, and exposes dead letters.
NotificationsPOST/api/notifications/webhooks/resendResend signatureApply verified Resend delivery updates.Verifies before processing and applies provider delivery state to local records.
SchedulerPOST/api/scheduler/publishCRON_SECRET bearerPublish scheduled content.Publishes a bounded eligible set and rejects unsupported scheduler calls.
Billing adminPOST/api/system/billing/customers/[providerCustomerId]/syncSession + billing operationsRefresh supported provider customer state.Validates provider customer identity and performs a guarded provider sync.
Billing adminGET/api/system/billing/exportSession + billing operationsExport guarded billing records.Rate-limits, bounds, filters, and spreadsheet-sanitizes financial exports.
Billing adminPOST/api/system/billing/refundsSession + billing operationsCreate a guarded provider refund.Validates amount and provider capability; records auditable financial action.
Billing adminPATCH/api/system/billing/subscriptions/[providerSubscriptionId]Session + billing operationsApply a guarded subscription operation.Validates operation and provider subscription identity before mutation.
WaitlistGET/api/waitlist/confirmPublic signed tokenConfirm a double-opt-in token.Rate-limits and consumes a validated confirmation token without exposing signup data.
WaitlistGET/api/waitlist/exportSession + waitlist operationsExport guarded waitlist records.Rate-limits, bounds, and spreadsheet-sanitizes personal-data export.
WaitlistPOST/api/waitlist/signupPublicValidate and store a public signup.Rate-limits, handles duplicate signup state, and queues configured follow-up.
WebhooksPOST/api/webhooks/lemonsqueezyLemon Squeezy signatureVerify and process Lemon Squeezy events.Claims provider event identity and projects retry-safe local billing state.
WebhooksPOST/api/webhooks/stripe/billingStripe signatureVerify and process Stripe billing events.Claims provider event identity and projects retry-safe local billing state.