API Reference
Every endpoint SaaSyBase exposes — grouped by domain, with auth requirements, rate-limit tiers, request/response shapes, and a changelog of recent contract updates.
190 endpoints across 27 categories
Authentication
Register, sign in, verify email, and reset passwords across the self-hosted auth lanes. Availability depends on the active auth provider for each route.
/api/auth/registerRegister a new user/api/auth/credentials-loginSign in with email and password/api/auth/login-statusCheck whether credentials can sign in/api/auth/magic-linkRequest Better Auth magic-link sign-in/api/auth/verify-emailVerify email address/api/auth/verify-emailComplete email verification link/api/auth/forgot-passwordRequest password reset/api/auth/reset-passwordReset password with token/api/auth/resend-verificationResend verification emailPublic & account utilities
Health checks, contact form, and authenticated self-service account endpoints used by the dashboard.
/api/healthHealth check/api/contactSubmit contact form/api/settings/formatRead public format preferences/api/site-infoRead site branding info/api/plan-previewDeprecated plan preview placeholder/api/billing/testDeprecated billing test placeholder/api/fix-statusDeprecated status fix placeholder/api/minimalMinimal health stub/api/user/export-account-dataDownload account data/api/user/delete-accountDelete my account/api/user/profileGet current user profileUser management
Fetch users, elevate access, adjust token balances, and inspect payment history without leaving the dashboard.
/api/admin/usersList users/api/admin/users/searchSearch users (typeahead)/api/admin/users/[userId]Get user details/api/admin/users/[userId]Perform a user admin action/api/admin/users/[userId]Delete a user/api/admin/users/[userId]/paymentsInspect user payments/api/admin/users/[userId]/roleChange user rolePayments & refunds
Manage invoices, trigger refunds, and backfill historical events.
/api/admin/paymentsList payments/api/admin/payments/[paymentId]/refundRefund a payment (full refund)/api/admin/payments/backfill-invoicesBackfill Stripe external payment IDsPlans & subscriptions
Create, activate, and audit subscription plans across the catalog.
/api/admin/plansList subscription plans/api/admin/plansCreate plan/api/admin/plans/[planId]Toggle plan active flag/api/admin/plans/[planId]Update plan metadata/api/admin/plans/[planId]Delete plan/api/admin/plans/[planId]/create-stripeCreate provider price for a plan/api/admin/plans/verifyVerify a provider price IDSupport & notifications
Drive the helpdesk, reply to tickets, and broadcast announcements.
/api/support/ticketsList my support tickets/api/support/ticketsCreate support ticket/api/support/tickets/[ticketId]Get my support ticket/api/support/tickets/[ticketId]Close my support ticket/api/support/tickets/[ticketId]/replyReply to my ticket/api/admin/support/ticketsList support tickets (admin)/api/admin/support/ticketsCreate ticket on behalf of a user/api/admin/support/tickets/[ticketId]Get support ticket (admin)/api/admin/support/tickets/[ticketId]Update ticket status (admin)/api/admin/support/tickets/[ticketId]/replyReply to ticket (admin)Team & organizations
Provision team workspaces, manage invites, and adjust shared-token settings.
/api/team/summaryTeam dashboard summary/api/user/active-orgGet active workspace state/api/user/active-orgSet or clear the active workspace/api/team/provisionProvision a team workspace/api/team/settingsUpdate workspace shared-token caps/api/organization/check-deletion-eligibilityCheck whether a workspace can be deleted/api/organization/deleteDelete a team workspace/api/team/members/cap-overrideOverride a member shared-token cap/api/team/inviteInvite a member/api/team/invite/acceptAccept invite/api/team/invite/declineDecline invite/api/team/invite/resendResend invite email/api/team/invite/revokeRevoke invite/api/team/members/removeRemove a memberCheckout
Initiate checkouts and confirm completion across payment providers.
/api/checkoutCreate hosted checkout session/api/checkout/confirmConfirm checkout completion/api/checkout/embeddedCreate embedded checkout intent (or redirect)/api/checkout/embeddedCreate embedded checkout intent (or redirect)/api/checkout/embedded/confirmConfirm embedded checkoutBilling & subscriptions
Manage billing portal access, cancellations, invoices, and subscription lifecycle (including proration upgrades).
/api/billing/customer-portalOpen customer billing portal/api/billing/cancelSchedule cancellation at period end/api/billing/undo-cancelUndo scheduled cancellation/api/billing/invoice/[paymentId]Download invoice PDF/api/billing/refund-receipt/[paymentId]Download refund receipt PDF/api/subscriptionGet subscription status/api/subscription/activateActivate a pending subscription/api/subscription/prorationPreview proration (recurring plan swap)/api/subscription/prorationApply proration (recurring plan swap)/api/admin/subscriptionsList subscriptions (admin/moderator)/api/admin/subscriptions/[id]/schedule-cancelSchedule cancellation (admin)/api/admin/subscriptions/[id]/undoUndo cancellation (admin)/api/admin/subscriptions/[id]/force-cancelForce cancel immediately (admin)/api/admin/subscriptions/[id]/expireExpire subscription (admin)/api/admin/subscriptions/[id]/editEdit subscription state and billing date/api/admin/billing/syncSync billing catalog (admin)/api/admin/billing/paddle-configPaddle config health check (admin)Organizations (admin)
Inspect and administer organization workspaces: seat limits, token pooling policies, and membership caps.
/api/admin/organizationsList organizations/api/admin/organizations/[orgId]Get organization detail/api/admin/organizations/[orgId]/suspendSuspend organization access/api/admin/organizations/[orgId]Update organization/api/admin/organizations/[orgId]/membersList organization members + invites/api/admin/organizations/[orgId]/members/[membershipId]Remove member from organization/api/admin/organizations/[orgId]/adjust-balanceAdjust organization token balance/api/admin/organizations/[orgId]/deleteDelete organizationNotifications
User inbox notifications and admin broadcast tooling.
/api/notificationsList my notifications/api/notifications/mark-all-readMark all notifications read/api/notifications/[id]/readMark a notification read/api/notifications/[id]/readMark a notification read/api/admin/notificationsList notifications (admin/moderator)/api/admin/notifications/createCreate notification (admin/moderator)Emails (admin)
Manage stored email templates and send test emails using rendered variables.
/api/admin/emailsList email templates/api/admin/emailsCreate email template/api/admin/emails/[templateId]Get email template/api/admin/emails/[templateId]Update email template/api/admin/emails/[templateId]Delete email template/api/admin/emails/seedSeed default templates/api/admin/emails/testSend test emailPayment providers
Inspect supported payment providers and configuration status without exposing secrets.
/api/admin/payment-providersList payment providers + configuration statusContent (pages & blog)
Create and manage site pages, blog posts, and blog categories.
/api/admin/pagesList site pages/api/admin/pagesCreate site page/api/admin/pages/[id]Read site page/api/admin/pages/[id]Update site page (replace fields)/api/admin/pages/[id]Update site page (partial)/api/admin/pages/[id]Trash site page/api/admin/pages/bulkBulk page action (trash/restore/delete)/api/admin/blogList blog posts/api/admin/blogCreate blog post/api/admin/blog/[id]Read blog post/api/admin/blog/[id]Update blog post (replace fields)/api/admin/blog/[id]Update blog post (partial)/api/admin/blog/[id]Trash blog post/api/admin/blog/bulkBulk blog action (trash/restore/delete)/api/admin/blog/categoriesList blog categories/api/admin/blog/categoriesCreate blog category/api/admin/blog/categories/[id]Update blog category/api/admin/blog/categories/[id]Delete blog categoryCoupons
Create and manage discount coupons, including provider artifacts and redemption safety rules.
/api/admin/couponsList coupons/api/admin/couponsCreate coupon/api/admin/coupons/[couponId]Update coupon (limited fields)/api/admin/coupons/[couponId]Delete couponOne-time purchases (admin)
Inspect and manage non-recurring purchases; supports refund + forced expiry flows.
/api/admin/purchasesList one-time purchases/api/admin/purchases/[id]/[action]Refund a purchase/api/admin/purchases/[id]/expireExpire a purchase subscriptionFiles & uploads (admin)
Upload and manage images/assets used by the dashboard and marketing pages.
/api/admin/file/listList uploaded admin files/api/admin/file/uploadUpload an image file/api/admin/file/deleteDelete an uploaded admin file/api/admin/logo/uploadLegacy logo upload endpoint (moved)/api/admin/uploadLegacy form-data upload (deprecated)Theme & branding (admin)
Manage theme links, footer text, and injected custom code snippets.
/api/admin/themeRead theme settings/api/admin/themeUpdate theme settings/api/admin/theme/exportExport theme settings/api/admin/theme/importImport theme settingsMaintenance & operations (admin)
Operational helpers for internal cache inspection and cleanup tasks.
/api/admin/maintenance/discounted-subscription-price-cacheInspect discounted subscription price cache/api/admin/maintenance/discounted-subscription-price-cacheClean discounted subscription price cacheLogs & audit (admin)
Inspect server logs and administrator/moderator actions for operational debugging and compliance.
/api/admin/logsList system logs/api/admin/logsClear system logs/api/admin/moderator-actionsList admin/moderator actions (admin only)/api/admin/moderator-actionsClear admin/moderator action log (admin only)Configuration & preferences
Read and update global settings, plus user preference storage.
/api/admin/settingsRead a setting by key/api/admin/settings/exportExport settings snapshot/api/admin/settings/importImport settings snapshot/api/admin/settingsSet a setting (cache-aware)/api/admin/settingsUpsert a setting (direct DB)/api/user/settingsList user settings/api/user/settingsUpdate a user setting/api/settings/tokensRead token reset policy flagsAccount & entitlements
Fetch current-user profile, token balances, and entitlement checks used by the app runtime.
/api/internal/spend-tokensSpend/deduct tokens (internal, server-to-server)/api/user/profileFetch current user profile + token balances/api/user/profileUpdate current user profile/api/user/active-orgGet active workspace selection/api/user/active-orgSet active workspace selection/api/user/change-passwordChange password/api/user/pending-email-changeCancel pending email change/api/user/sessionsList current user sessions/api/user/grace-statusCheck paid-token expiry grace window/api/user/ping-expiry-cleanupTrigger lazy paid-token cleanup check/api/user/validate-org-accessValidate workspace access against owner plan/api/user/spend-tokensSpend tokens for user actions/api/internal/payment-scriptsResolve active payment provider scripts/api/internal/track-visitRecord a visit log entry/api/user/welcomeSend welcome email (idempotent)/api/user/delete-accountDelete current user data (DB only)Sessions & security
Inspect and revoke active auth sessions for the signed-in user when the active auth provider supports session management.
/api/sessions/[sessionId]Get session detail/api/sessions/[sessionId]/revokeRevoke one session/api/sessions/revoke-othersRevoke all other sessions/api/recent-sessionsDeprecated recent sessions placeholder/api/sessions/[sessionId]Deprecated session detail alias/api/sessions/[sessionId]/revokeDeprecated session revoke alias/api/sessions/revoke-othersDeprecated revoke-others aliasDashboard utilities
Signed-in user helpers for redeemed coupons and payment history shown in the dashboard UI.
/api/dashboard/couponsList my redeemed coupons/api/dashboard/couponsRedeem coupon/api/dashboard/paymentsList my paymentsAnalytics & traffic
Query revenue, subscriber, and engagement dashboards programmatically.
/api/admin/analyticsAnalytics snapshot/api/admin/trafficTraffic snapshot/api/admin/traffic?group=devicesTraffic breakdownWebhook ingress
Inbound webhook endpoints for payments and auth providers. All payment webhooks enforce signature verification and shared routing behavior.
/api/webhooks/paymentsUnified payments webhook router/api/webhooks/stripeStripe webhook ingress/api/webhooks/paystackPaystack webhook ingress/api/webhooks/paddlePaddle webhook ingress/api/webhooks/clerkClerk webhook ingress/api/stripe/webhookLegacy Stripe webhook aliasCron & lifecycle jobs
Privileged maintenance endpoints intended for scheduled jobs and internal automation.
/api/cron/demo-refreshRefresh demo dataset timestamps and activity windows/api/cron/process-expiryProcess subscription expiry and org cleanupAPI changelog
Recent API contract and reference updates reflected on this page.
- Version 2026.05.05May 5, 2026, 12:00 AM
- Added curated docs for GET /api/organization/check-deletion-eligibility and DELETE /api/organization/delete.
- Expanded team API coverage for GET/POST /api/user/active-org, including personal-workspace clearing after organization deletion.
- Documented the team-dashboard organization deletion flow, including active-plan gating inside the confirmation modal.
- Version 2026.04.16Apr 16, 2026, 12:00 AM
- Added admin organization suspension endpoint coverage and documented suspended-workspace response fields.
- Expanded admin user endpoint docs to include suspension state and the new setSuspension/clearSuspension actions.
- Updated organization billingEmail docs to note owner-email fallback when no dedicated billing inbox is stored.
- Version 2026.04Apr 6, 2026, 12:00 AM
- Audited curated request, response, and auth notes against the live route handlers and corrected drift.
- Updated shared authentication guidance to describe provider-aware sessions instead of Clerk-specific behavior.
- Refreshed health, refund, and internal token-spend entries to match current response shapes, rate limits, and auth outcomes.
- This changelog now tracks API-reference changes only; broader product release notes belong in the app changelog.
- Version 2026.02Feb 7, 2026, 12:00 AM
- Added internal server-to-server token spend endpoint (POST /api/internal/spend-tokens).
- Added user token spend endpoint for SaaSyApp (POST /api/user/spend-tokens).
- Expanded token-spend coverage in the reference to distinguish browser and server-to-server callers.
- Expanded curated docs for token/account endpoints to reduce inventory drift.
- Hardened legacy admin upload endpoint (API admin guard + rate limiting).
- API docs UI: body schema rows wrap cleanly on narrow screens.
- Version 2025.09Sep 20, 2025, 12:00 AM
- Traffic API now exposes breakdown pagination.
- Notification broadcasts support INFO | SUCCESS | WARNING | ERROR types.
- Version 2025.07Jul 12, 2025, 12:00 AM
- User PATCH endpoint adds assignPlan action.
- Payments backfill can repair missing Stripe payment_intent IDs.

