API Reference
Internal API endpoints used by the OBSERVE platform. These are the same endpoints the frontend calls — useful if you want to automate refreshes, manage credentials, or integrate OBSERVE data into your own workflows.
401 Unauthorized. Subscriber-only endpoints additionally require an active Stripe subscription.Base URL
Data Refresh
Trigger on-demand data ingestion for platform sources.
/api/refreshRun all platform ingestion pipelines in sequence
{ ok: true, usgs, noaa, gdelt, crypto, fx }Credentials (BYOK)
Manage encrypted third-party API keys stored in your account.
/api/credentialsList all saved credential slugs for the authenticated user
{ credentials: [{ source_slug, has_key }] }/api/credentialsSave or update an API key for a given source slug
{ source_slug: "newsapi", api_key: "your-key" }{ ok: true }/api/credentialsDelete a saved API key
{ source_slug: "newsapi" }{ ok: true }Stripe Billing
Manage subscriptions via Stripe.
/api/stripe/checkoutCreate a Stripe Checkout session for the Pro plan
{ plan: "pro" }{ url: "https://checkout.stripe.com/..." }/api/stripe/portalCreate a Stripe Customer Portal session to manage billing
{ url: "https://billing.stripe.com/..." }/api/stripe/sync-subscriptionSync subscription status from Stripe into the user profile
{ ok: true, status: "active" | "canceled" | "none" }Briefings
Generate and retrieve AI intelligence briefings.
/api/briefingsGenerate a new AI briefing using Perplexity AI
{ topic?: string, region?: string }{ id, content, created_at }Auth
Authentication callback — handled automatically by Supabase.
/api/auth/callbackOAuth and magic link callback — exchanges code for session
Redirect to /dashboard or /reset-password