API Reference

Core application routes used by the dashboard, billing, provider connections, and monitoring workflows.

This is an implementation reference for the current product surface, not a public stable SDK contract.

Conventions

Auth model

Protected routes rely on the active Supabase session. Provider-specific auth is handled when creating or validating provider connections.

Response shape

Routes typically return JSON payloads for dashboard data, plan state, provider summaries, or error details suitable for the current UI.

Provider-aware fields

Returned fields depend on what each provider officially exposes. Cost, usage, credits, and validation details are not forced into fake parity.

Freshness expectations

Monitoring routes reflect scheduled ingestion and daily threshold evaluation rather than a guaranteed real-time stream.

Authentication

Use the active authenticated session for protected routes.

MethodPathDescription
GET/api/auth/[...supabase]Supabase auth handler for session and OAuth flow.
GET/api/auth/callbackOAuth callback and redirect handling.
POST/api/auth/signoutEnd the current authenticated session.

Providers

Provider routes back the integrations workflow, account list, summaries, and usage views.

MethodPathDescription
GET/api/providers/accountsList connected provider accounts for the current workspace.
POST/api/providers/{id}/connectCreate or validate a provider connection using server-side checks.
POST/api/providers/{id}/disconnectDisconnect a provider connection.
GET/api/providers/{id}/summaryReturn provider summary data based on officially exposed signals.
GET/api/providers/{id}/usageReturn provider usage or cost timeseries when supported.

Billing

Billing routes manage subscriptions, checkout, invoices, and portal access.

MethodPathDescription
GET/api/billing/subscriptionReturn current subscription and plan entitlements.
GET/api/billing/invoicesReturn invoice history for the current customer when available.
GET/api/billing/checkout?plan=pro|teamCreate a Stripe checkout session for plan upgrade.
POST/api/billing/portalOpen the Stripe customer portal.
POST/api/webhooksReceive Stripe webhook events.

Monitoring & alerts

Monitoring routes power dashboard state, threshold rules, alerts, and notification settings.

MethodPathDescription
GET/api/dashboardUnified dashboard payload including spend, alerts, and provider state.
GET/api/alertsReturn alert timeline data for the current account.
POST/api/alerts/checkRun alert checks against fetched provider data.
POST/api/thresholdsCreate or update threshold rules.
GET/api/notification-settingsReturn notification delivery settings.

Operations & governance

These routes support scheduled jobs, entitlements, and team-level controls.

MethodPathDescription
GET/api/entitlementsReturn plan capabilities and feature gating state.
GET/POST/api/team/governanceRead or update team governance state for Team plan workflows.
POST/api/cron/syncScheduled provider sync worker.
POST/api/cron/digest-dailyDaily digest job.
POST/api/cron/digest-weeklyWeekly digest job.
POST/api/cron/digest-monthlyMonthly digest job.

Need the broader context?

Use the support pages below when you need product-level behavior, not just route names.