Skip to main content

Knowledge > System Architecture > API Catalog

API Catalog

Canonical reference for every API route across all ChurchWiseAI codebases. All APIs are Next.js API routes (serverless functions on Vercel). No standalone backend servers.

API Taxonomy​

Overview​

184 total API routes across 3 active codebases:

CodebaseRoute FilesBase URLDeploy Branch
ChurchWiseAI Web128churchwiseai.com/apimain
PewSearch36pewsearch.com/apimaster
IllustrateTheWord20illustratetheword.com/apimaster

All routes are defined in src/app/api/.../route.ts files using the Next.js App Router convention. Each exported function name (GET, POST, PUT, PATCH, DELETE) maps to the corresponding HTTP method.


Authentication Patterns​

Auth TypeMechanismUsed By
Token (admin_token)x-admin-token header or ?token= query param; validated against premium_churches.admin_tokenChurch admin dashboard APIs
Token (access_token)x-access-token header; validated against church_team_members.access_tokenTeam member dashboard APIs
FOUNDER_TOKENx-founder-token header; matches FOUNDER_TOKEN env varFounder-only dashboard & tools
SUPABASE_AUTHsupabase.auth.getUser() via cookie/sessionSermonWise, ITW, ShareWiseAI user-facing
STRIPE_SECRETstripe.webhooks.constructEvent() with webhook signing secretStripe webhook endpoints
TWILIO_SECRETTwilio request signature validationSMS/voice webhooks
CRON_SECRETAuthorization: Bearer <CRON_SECRET> headerVercel Cron jobs, ops pipelines
ADMIN_SECRETADMIN_SECRET env var checkInternal admin tools (voices)
SOCIAL_AUTHresolveOwner() via Supabase Auth sessionShareWiseAI user-facing
SIGNED_TOKENHMAC-signed download token with expiryStarter kit download
Rate-limited publicIP-based rate limiting, no authPublic chatbot, contact forms
None (public)No authentication requiredHealth checks, public data

ChurchWiseAI Web (128 routes)​

Code: churchwiseai-web/src/app/api/

Admin Dashboard & Knowledge Base (22 routes)​

MethodPathPurposeAuthProduct
GET/api/admin/adopt-templatesList available denomination FAQ templatesadmin_tokenChatbot
POST/api/admin/adopt-templatesAdopt FAQ templates into church knowledge baseadmin_tokenChatbot
GET/api/admin/agentsGet agent config (personality, handoff rules)admin_tokenChatbot
POST/api/admin/agentsUpdate agent configadmin_tokenChatbot
GET/api/admin/analytics-proxyChatbot analytics (conversations, satisfaction)admin_tokenChatbot
GET/api/admin/auditList recent audit events for churchadmin_tokenDashboard
GET/api/admin/backup-ownerList backup owners for churchadmin_tokenDashboard
POST/api/admin/backup-ownerAdd a backup owneradmin_tokenDashboard
DELETE/api/admin/backup-ownerRemove a backup owneradmin_tokenDashboard
GET/api/admin/founder-statsAggregate stats across all churchesFOUNDER_TOKENFounder
GET/api/admin/kb-proxyList FAQs or documents in knowledge baseadmin_tokenChatbot
POST/api/admin/kb-proxyCreate FAQ or document entryadmin_tokenChatbot
PUT/api/admin/kb-proxyUpdate FAQ or document entryadmin_tokenChatbot
DELETE/api/admin/kb-proxyDelete FAQ or document entryadmin_tokenChatbot
POST/api/admin/kb-proxy/uploadUpload document to Supabase Storageadmin_tokenChatbot
GET/api/admin/moderationGet violations, restrictions, and statsadmin_tokenChatbot
POST/api/admin/moderationAdd content restriction ruleadmin_tokenChatbot
DELETE/api/admin/moderationRemove content restriction ruleadmin_tokenChatbot
POST/api/admin/moderation/moderate-documentRun moderation scan on uploaded documentadmin_tokenChatbot
POST/api/admin/photo-extractExtract info from bulletin/card image via AIadmin_tokenOnboarding
GET/api/admin/provision-numberList available Twilio numbersFOUNDER_TOKENVoice
POST/api/admin/provision-numberProvision Twilio number for churchFOUNDER_TOKENVoice
DELETE/api/admin/provision-numberRelease Twilio numberFOUNDER_TOKENVoice
GET/api/admin/resourcesList care resources (crisis hotlines, etc.)admin_tokenDashboard
POST/api/admin/resourcesAdd care resourceadmin_tokenDashboard
PUT/api/admin/resourcesUpdate care resourceadmin_tokenDashboard
DELETE/api/admin/resourcesDelete care resourceadmin_tokenDashboard
POST/api/admin/revoke-sessionsRevoke all active sessions for churchadmin_tokenSecurity
GET/api/admin/safety-statsModeration violations summary (monthly)admin_tokenChatbot
GET/api/admin/search-churchesSearch churches in directory (founder only)FOUNDER_TOKENFounder
GET/api/admin/theologyGet theological lens and doctrinal configadmin_tokenChatbot
POST/api/admin/theologyUpdate theological lens and custom rulesadmin_tokenChatbot
GET/api/admin/toolsGet chatbot tool toggle configadmin_tokenChatbot
POST/api/admin/toolsUpdate chatbot tool togglesadmin_tokenChatbot
GET/api/admin/trainingList training examples (user corrections)admin_tokenChatbot
POST/api/admin/trainingSubmit training correctionadmin_tokenChatbot
POST/api/admin/translateTranslate text to target language via AIadmin_tokenChatbot
POST/api/admin/voicesManage TTS voice options (add/toggle/delete)ADMIN_SECRETVoice
GET/api/admin/voices/libraryBrowse available Cartesia TTS voicesNoneVoice

Authentication & Security (3 routes)​

MethodPathPurposeAuthProduct
POST/api/auth/verify-captchaVerify hCaptcha/Turnstile tokenNoneAll
GET/api/premium/requestsList pending premium access requestsadmin_tokenDashboard
PATCH/api/premium/requestsApprove or reject access requestadmin_tokenDashboard

Premium & Team Management (4 routes)​

MethodPathPurposeAuthProduct
POST/api/premium/updateUpdate church profile/settingsadmin_tokenDashboard
POST/api/premium/teamAdd/remove/update team membersadmin_tokenDashboard
GET/api/premium/team-linkGet team member dashboard linkaccess_tokenDashboard

Care Messaging (3 routes)​

MethodPathPurposeAuthProduct
POST/api/care/broadcastSend SMS broadcast to care groupTWILIOCare
GET/api/care/membersList care group membersadmin_tokenCare
DELETE/api/care/membersRemove member from care groupadmin_tokenCare
POST/api/care/subscribeSubscribe visitor to care groupNone (public)Care

Chatbot (4 routes)​

MethodPathPurposeAuthProduct
POST/api/chatbot/streamRAG chatbot conversation (church-specific)Rate-limited publicChatbot
POST/api/chatbot/unifiedUnified chatbot endpoint (cross-site CORS)Rate-limited publicChatbot
OPTIONS/api/chatbot/unifiedCORS preflight for unified chatbotNoneChatbot
POST/api/chat/proxyServer-side proxy to unified chatbot APINoneChatbot
POST/api/chat/supportSite support chatbot (CWA marketing site)Rate-limited publicSupport

Contact & Outreach (2 routes)​

MethodPathPurposeAuthProduct
POST/api/contactContact form submissionRate-limited publicMarketing
GET/api/churches/searchSearch church directoryNoneMarketing

Cron & Background (1 route)​

MethodPathPurposeAuthProduct
GET/api/cron/daily-auditDaily audit: Stripe sync, stale data cleanupCRON_SECRETOps

Founder Tools (16 routes)​

MethodPathPurposeAuthProduct
GET/api/founder/action-itemsList pending founder action itemsFOUNDER_TOKENFounder
POST/api/founder/action-itemsCreate action itemFOUNDER_TOKENFounder
PATCH/api/founder/action-itemsUpdate action item statusFOUNDER_TOKENFounder
GET/api/founder/agentsList all church agent configsFOUNDER_TOKENFounder
POST/api/founder/agentsUpdate church agent config (founder override)FOUNDER_TOKENFounder
GET/api/founder/calendarFetch Google Calendar eventsFOUNDER_TOKENFounder
POST/api/founder/chatFounder AI assistant chatFOUNDER_TOKENFounder
GET/api/founder/customersList all customers and subscriptionsFOUNDER_TOKENFounder
PATCH/api/founder/customersUpdate customer recordFOUNDER_TOKENFounder
GET/api/founder/driveList Google Drive filesFOUNDER_TOKENFounder
GET/api/founder/google-authInitiate Google OAuth flowFOUNDER_TOKENFounder
GET/api/founder/google-auth/callbackGoogle OAuth callback handlerFOUNDER_TOKENFounder
GET/api/founder/metricsBusiness metrics (MRR, churn, growth)FOUNDER_TOKENFounder
GET/api/founder/response-reviewReview flagged chatbot responsesFOUNDER_TOKENFounder
POST/api/founder/response-reviewApprove/reject flagged responseFOUNDER_TOKENFounder
GET/api/founder/response-templatesList reusable response templatesFOUNDER_TOKENFounder
POST/api/founder/response-templatesCreate/update response templateFOUNDER_TOKENFounder
GET/api/founder/sales-callsList sales call logs and outcomesFOUNDER_TOKENFounder
GET/api/founder/sync-knowledgeSync product_knowledge to all consumersFOUNDER_TOKENFounder
GET/api/founder/watchtowerSystem health overview dashboardFOUNDER_TOKENFounder
GET/api/founder/watchtower/health-checksPer-service health check resultsFOUNDER_TOKENFounder
POST/api/founder/watchtower/refresh-viewsRefresh materialized views manuallyFOUNDER_TOKENFounder

Health & Monitoring (1 route)​

MethodPathPurposeAuthProduct
GET/api/health/stripeStripe connection health checkSTRIPE_SECRETOps

MailerLite (3 routes)​

MethodPathPurposeAuthProduct
POST/api/mailerlite/setupInitialize MailerLite groups only (automations replaced by lifecycle email system)CRON_SECRETMarketing
POST/api/mailerlite/subscribeAdd subscriber to MailerLite groupNone (public)Marketing
POST/api/mailerlite/webhookMailerLite event webhook receiverNoneMarketing

Newsletter (1 route)​

MethodPathPurposeAuthProduct
POST/api/newsletterNewsletter signup (email capture)Rate-limited publicMarketing

Onboarding (3 routes)​

MethodPathPurposeAuthProduct
POST/api/onboardCreate new premium church recordadmin_tokenOnboarding
POST/api/onboard/notifySend onboarding welcome emailadmin_tokenOnboarding
POST/api/onboard/resend-linkResend admin dashboard linkadmin_tokenOnboarding

Operations & Telemetry (4 routes)​

MethodPathPurposeAuthProduct
POST/api/ops/alertSend alert email + SMS for P0 issuesCRON_SECRETOps
GET/api/ops/collectCollect quota snapshots (Twilio, Resend, Supabase)CRON_SECRETOps
GET/api/ops/heartbeatPublic uptime health check endpointNone (public)Ops
POST/api/ops/ingestIngest error reports from external sourcesCRON_SECRETOps

Sermons / SermonWise (18 routes)​

MethodPathPurposeAuthProduct
POST/api/sermons/generateGenerate sermon draft via AISUPABASE_AUTHSermonWise
GET/api/sermons/listList user's saved sermonsSUPABASE_AUTHSermonWise
GET/api/sermons/[id]Get single sermon by IDSUPABASE_AUTHSermonWise
DELETE/api/sermons/[id]Delete a sermonSUPABASE_AUTHSermonWise
GET/api/sermons/[id]/derivativesList derivatives (outlines, slides, etc.)SUPABASE_AUTHSermonWise
POST/api/sermons/deriveGenerate derivative content from sermonSUPABASE_AUTHSermonWise
POST/api/sermons/titlesGenerate sermon title suggestions via AINone (public)SermonWise
GET/api/sermons/titles/savedList user's saved titlesSUPABASE_AUTHSermonWise
POST/api/sermons/titles/savedSave a title to collectionSUPABASE_AUTHSermonWise
DELETE/api/sermons/titles/savedRemove saved titleSUPABASE_AUTHSermonWise
GET/api/sermons/usageGet user's monthly usage statsSUPABASE_AUTHSermonWise
GET/api/sermons/lectionaryGet current lectionary readingsNone (public)SermonWise
GET/api/sermons/methodsList available sermon methods/structuresNone (public)SermonWise
GET/api/sermons/statsUser's sermon generation statisticsSUPABASE_AUTHSermonWise
POST/api/sermons/portalCreate Stripe billing portal sessionSUPABASE_AUTHSermonWise
POST/api/sermons/checkoutCreate Stripe checkout sessionSUPABASE_AUTHSermonWise
GET/api/sermons/communityBrowse community-shared sermonsSUPABASE_AUTHSermonWise
POST/api/sermons/communityShare sermon to communitySUPABASE_AUTHSermonWise
GET/api/sermons/community/[id]Get community sermon detailSUPABASE_AUTHSermonWise
DELETE/api/sermons/community/[id]Remove shared sermonSUPABASE_AUTHSermonWise
GET/api/sermons/community/[id]/reviewsList reviews for community sermonSUPABASE_AUTHSermonWise
POST/api/sermons/community/[id]/reviewsSubmit review for community sermonSUPABASE_AUTHSermonWise
GET/api/sermons/community/moderateList sermons pending moderationFOUNDER_TOKENSermonWise
PATCH/api/sermons/community/moderateApprove/reject community sermonFOUNDER_TOKENSermonWise
POST/api/sermons/outreach-attributionStamp cold-outreach signup attribution (outreach_contacts.signed_up_at + signup_user_id) from the persisted ?ref=outreach-{token} CTA token; idempotent, constant responseNone (unguessable token)SermonWise

SMS & Webhooks (1 route)​

MethodPathPurposeAuthProduct
POST/api/sms/webhookTwilio inbound SMS webhook handlerTWILIOVoice/Care

ShareWiseAI / Social (28 routes)​

MethodPathPurposeAuthProduct
POST/api/social/ai/generateGenerate AI social media contentSOCIAL_AUTHShareWiseAI
POST/api/social/ai/repurposeRepurpose content across platformsSOCIAL_AUTHShareWiseAI
POST/api/social/ai/suggestAI content suggestions for topicsSOCIAL_AUTHShareWiseAI
GET/api/social/analyticsSocial media analytics dashboardSOCIAL_AUTHShareWiseAI
GET/api/social/billingGet billing/subscription statusSUPABASE_AUTHShareWiseAI
GET/api/social/campaignsList campaignsSOCIAL_AUTHShareWiseAI
POST/api/social/campaignsCreate campaignSOCIAL_AUTHShareWiseAI
GET/api/social/campaigns/[id]Get campaign detailSOCIAL_AUTHShareWiseAI
PUT/api/social/campaigns/[id]Update campaignSOCIAL_AUTHShareWiseAI
DELETE/api/social/campaigns/[id]Delete campaignSOCIAL_AUTHShareWiseAI
GET/api/social/checkoutCreate Stripe checkout sessionSUPABASE_AUTHShareWiseAI
GET/api/social/content-sourcesList connected content sourcesSOCIAL_AUTHShareWiseAI
GET/api/social/cron/analytics-syncSync analytics from connected platformsCRON_SECRETShareWiseAI
GET/api/social/cron/auto-draftAuto-generate draft postsCRON_SECRETShareWiseAI
GET/api/social/cron/publishPublish scheduled postsCRON_SECRETShareWiseAI
GET/api/social/cron/token-refreshRefresh expiring OAuth tokensCRON_SECRETShareWiseAI
GET/api/social/cron/trial-expiryProcess expired trial subscriptionsCRON_SECRETShareWiseAI
GET/api/social/cron/usage-resetReset monthly usage countersCRON_SECRETShareWiseAI
POST/api/social/media/uploadUpload media file for postSOCIAL_AUTHShareWiseAI
GET/api/social/platformsList connected social platformsSOCIAL_AUTHShareWiseAI
GET/api/social/platforms/[id]Get platform connection detailSOCIAL_AUTHShareWiseAI
DELETE/api/social/platforms/[id]Disconnect a platformSOCIAL_AUTHShareWiseAI
GET/api/social/platforms/callbackOAuth callback from social platformaccess_tokenShareWiseAI
POST/api/social/platforms/connectInitiate OAuth connection to platformSUPABASE_AUTHShareWiseAI
GET/api/social/platforms/data-deletionFacebook data deletion status checkNoneShareWiseAI
POST/api/social/platforms/data-deletionFacebook data deletion callbackNoneShareWiseAI
GET/api/social/postsList posts (with filters, pagination)SOCIAL_AUTHShareWiseAI
POST/api/social/postsCreate new postSOCIAL_AUTHShareWiseAI
GET/api/social/posts/[id]Get post detailSOCIAL_AUTHShareWiseAI
PUT/api/social/posts/[id]Update post contentSOCIAL_AUTHShareWiseAI
DELETE/api/social/posts/[id]Delete postSOCIAL_AUTHShareWiseAI
POST/api/social/posts/[id]/publishPublish post immediatelySOCIAL_AUTHShareWiseAI
POST/api/social/posts/[id]/retryRetry failed post publicationSOCIAL_AUTHShareWiseAI
GET/api/social/scheduleGet posting scheduleSOCIAL_AUTHShareWiseAI
POST/api/social/scheduleCreate schedule slotSOCIAL_AUTHShareWiseAI
PUT/api/social/scheduleUpdate schedule slotSOCIAL_AUTHShareWiseAI
DELETE/api/social/scheduleDelete schedule slotSOCIAL_AUTHShareWiseAI
GET/api/social/settingsGet subscription and brand voice configSOCIAL_AUTHShareWiseAI
PUT/api/social/settingsUpdate brand voice configSOCIAL_AUTHShareWiseAI
GET/api/social/webhookWebhook verification (platform challenge)NoneShareWiseAI
POST/api/social/webhookInbound webhook from social platformsNoneShareWiseAI

Stripe Payments (5 routes)​

MethodPathPurposeAuthProduct
GET/api/stripe/checkoutCreate Stripe Checkout session (redirect)NoneBilling
POST/api/stripe/checkout-embeddedCreate embedded Stripe Checkout sessionNoneBilling
GET/api/stripe/church-checkoutCreate Checkout for existing church (upsell)admin_tokenBilling
POST/api/stripe/portalCreate Stripe billing portal sessionadmin_tokenBilling
POST/api/stripe/webhookStripe webhook handler (subscription lifecycle)STRIPE_SECRETBilling

Test Reports (5 routes)​

MethodPathPurposeAuthProduct
GET/api/test-reportsList QA test reportsNoneInternal
POST/api/test-reportsCreate test reportNoneInternal
PATCH/api/test-reports/[id]Update test report statusNoneInternal
GET/api/test-reports/[id]/commentsList comments on test reportNoneInternal
POST/api/test-reports/[id]/commentsAdd comment to test reportNoneInternal
POST/api/test-reports/agent-runRecord agent test run resultsNoneInternal
POST/api/test-reports/uploadUpload test artifacts/screenshotsNoneInternal

Training (4 routes)​

MethodPathPurposeAuthProduct
POST/api/training/evaluateEvaluate chatbot response qualityNoneInternal
GET/api/training/scenariosList training scenariosNoneInternal
GET/api/training/sessionsList training sessionsNoneInternal
POST/api/training/sessionsCreate training sessionNoneInternal
POST/api/training/simulateSimulate chatbot conversationNoneInternal

Utilities (2 routes)​

MethodPathPurposeAuthProduct
GET/api/starter-kit/downloadDownload AI Starter Kit PDF (signed URL)SIGNED_TOKENMarketing
GET/api/v1/conversationsPlaceholder for future Suite API accessNone (stub)API

Voice Agent (1 route)​

MethodPathPurposeAuthProduct
POST/api/voice/twimlGenerate TwiML for Twilio voice call routingTWILIOVoice

PewSearch (36 routes)​

Code: pewsearch/web/src/app/api/

Admin & Management (8 routes)​

MethodPathPurposeAuthProduct
GET/api/admin/overview-statsDashboard overview statisticsadmin_tokenPremium Page
GET/api/admin/team-linkGet team member dashboard linkadmin_tokenPremium Page
POST/api/admin/voicesManage TTS voice optionsADMIN_SECRETVoice
POST/api/church-updatesSubmit church info update requestNone (public)Directory
POST/api/church-updates/reviewReview/approve church updateadmin_tokenDirectory
POST/api/upload/logoUpload church logo imageadmin_tokenPremium Page
POST/api/upload/staff-photoUpload staff member photoadmin_tokenPremium Page
GET/api/test-emailSend test welcome email (dev only)admin_tokenDev

Chat & Chatbot (4 routes)​

MethodPathPurposeAuthProduct
POST/api/chatbot/streamChurch chatbot conversation (PewSearch-hosted)Rate-limited publicChatbot
POST/api/chat/proxyServer-side proxy to CWA unified chatbotNoneChatbot
POST/api/chat/supportSite support chatbot (PewSearch marketing)Rate-limited publicSupport
POST/api/demo/chatDemo chatbot conversation (no church context)Rate-limited publicDemo

Care Messaging (3 routes)​

MethodPathPurposeAuthProduct
POST/api/care/broadcastSend SMS broadcast to care groupTWILIOCare
GET/api/care/membersList care group membersadmin_tokenCare
DELETE/api/care/membersRemove member from care groupadmin_tokenCare
POST/api/care/subscribeSubscribe visitor to care groupNone (public)Care

Contact & Requests (4 routes)​

MethodPathPurposeAuthProduct
POST/api/contactGeneral contact form submissionRate-limited publicDirectory
POST/api/contact/churchContact specific church via directoryRate-limited publicDirectory
POST/api/premium/request-accessRequest access to existing premium pageNone (public)Premium Page
POST/api/reportReport incorrect church listingRate-limited publicDirectory

Lead Capture (2 routes)​

MethodPathPurposeAuthProduct
POST/api/leads/captureCapture lead from claim flowadmin_tokenPremium Page
POST/api/subscribeNewsletter email subscriptionRate-limited publicMarketing

Premium Pages (7 routes)​

MethodPathPurposeAuthProduct
GET/api/premium/requestsList pending premium access requestsadmin_tokenPremium Page
PATCH/api/premium/requestsApprove/reject access requestadmin_tokenPremium Page
POST/api/premium/resend-linkResend dashboard access link to adminadmin_tokenPremium Page
POST/api/premium/rotate-tokenRotate admin token (security)admin_tokenPremium Page
POST/api/premium/teamAdd/remove team membersadmin_tokenPremium Page
POST/api/premium/updateUpdate church premium profileadmin_tokenPremium Page
POST/api/premium/update-adminUpdate admin name and emailadmin_tokenPremium Page

Search (1 route)​

MethodPathPurposeAuthProduct
POST/api/search/aiAI-powered natural language church searchRate-limited publicDirectory

SMS (1 route)​

MethodPathPurposeAuthProduct
POST/api/sms/webhookTwilio inbound SMS webhook handlerTWILIOCare

Stripe (4 routes)​

MethodPathPurposeAuthProduct
GET/api/stripe/checkoutCreate Stripe Checkout sessionadmin_tokenBilling
GET/api/stripe/portalCreate Stripe billing portal sessionadmin_tokenBilling
POST/api/stripe/pre-checkoutPre-checkout: validate claim, create recordRate-limited publicBilling
POST/api/stripe/webhookStripe webhook handler (subscription lifecycle)STRIPE_SECRETBilling

Utilities (4 routes)​

MethodPathPurposeAuthProduct
POST/api/add-churchSubmit new church listing to directoryRate-limited publicDirectory
GET/api/health/stripeStripe connection health checkSTRIPE_SECRETOps
POST/api/voice/twimlGenerate TwiML for voice call routingTWILIOVoice

IllustrateTheWord (20 routes)​

Code: sermon-illustrations/src/app/api/

Account & Auth (2 routes)​

MethodPathPurposeAuthProduct
POST/api/account/deleteDelete user account and dataSUPABASE_AUTHAccount
POST/api/auth/verify-captchaVerify captcha tokenNoneAuth

Chat & Support (2 routes)​

MethodPathPurposeAuthProduct
POST/api/chat/proxyServer-side proxy to CWA unified chatbotNoneSupport
POST/api/chat/supportSite support chatbot (ITW marketing)SUPABASE_AUTHSupport

Collections (3 routes)​

MethodPathPurposeAuthProduct
GET/api/collectionsList user's illustration collectionsSUPABASE_AUTHPremium
POST/api/collectionsCreate new collectionSUPABASE_AUTHPremium
GET/api/collections/[id]Get collection detailSUPABASE_AUTHPremium
PATCH/api/collections/[id]Update collection (name, description)SUPABASE_AUTHPremium
DELETE/api/collections/[id]Delete collectionSUPABASE_AUTHPremium
POST/api/collections/[id]/itemsAdd illustration to collectionSUPABASE_AUTHPremium
DELETE/api/collections/[id]/itemsRemove illustration from collectionSUPABASE_AUTHPremium

Contact (1 route)​

MethodPathPurposeAuthProduct
POST/api/contactContact form submissionRate-limited publicMarketing

Favorites (1 route)​

MethodPathPurposeAuthProduct
GET/api/favoritesList user's favorited illustrationsSUPABASE_AUTHPremium
POST/api/favoritesAdd illustration to favoritesSUPABASE_AUTHPremium
DELETE/api/favoritesRemove illustration from favoritesSUPABASE_AUTHPremium

Health (1 route)​

MethodPathPurposeAuthProduct
GET/api/health/stripeStripe connection health checkSTRIPE_SECRETOps

Newsletter (1 route)​

MethodPathPurposeAuthProduct
POST/api/newsletterNewsletter email subscriptionRate-limited publicMarketing

Personalization (1 route)​

MethodPathPurposeAuthProduct
POST/api/personalizePersonalize illustration for audience/contextSUPABASE_AUTHPremium

Slides & Media (2 routes)​

MethodPathPurposeAuthProduct
GET/api/slides/downloadCheck download allowance for current weekSUPABASE_AUTHPremium
POST/api/slides/downloadGenerate and download presentation slideSUPABASE_AUTHPremium

Stripe (3 routes)​

MethodPathPurposeAuthProduct
POST/api/stripe/checkoutCreate Stripe Checkout sessionSUPABASE_AUTHBilling
POST/api/stripe/portalCreate Stripe billing portal sessionSUPABASE_AUTHBilling
POST/api/stripe/webhookStripe webhook handler (subscription lifecycle)STRIPE_SECRETBilling

Third-Party Integrations (3 routes)​

MethodPathPurposeAuthProduct
GET/api/surpriseRandom high-quality illustration for discoveryNone (public)Free
GET/api/tmdbFetch movie data from TMDB for media illustrationsRate-limited publicFree
GET/api/unsplashSearch Unsplash photos for illustration imageryRate-limited publicFree
GET/api/unsplash/downloadTrack Unsplash download (API compliance)Rate-limited publicFree

See Also​

  • System Overview -- Architecture diagrams and deployment topology
  • Database Schema -- Table ownership, key tables, and relationships
  • Infrastructure -- Vercel, Supabase, Stripe, Twilio, Cartesia config
  • C:\dev\PRICING.md -- Stripe product/price IDs for all checkout routes
  • C:\dev\CLAUDE.md -- Cross-project rules, agent tooling, and product ownership