# Subscription Manager ## User Guide ### Start - [Introduction](https://docs.sub.jerrylu.xyz/en/index.md): Subscription Manager helps you track recurring subscriptions, renewal dates, and spending, with multi-currency analytics, AI capture, reminders, and multi-device sync. ### Using the app - [User guide](https://docs.sub.jerrylu.xyz/en/user-guide/overview.md): Learn how to use Subscription Manager to track renewals, spending, reminders, AI capture, and backups. - [Subscriptions](https://docs.sub.jerrylu.xyz/en/user-guide/subscriptions.md): Add, edit, filter, sort, and delete subscription records. - [AI capture](https://docs.sub.jerrylu.xyz/en/user-guide/ai-capture.md): Use natural language or screenshots to propose subscription changes. - [Categories](https://docs.sub.jerrylu.xyz/en/user-guide/categories.md): Organize subscriptions with built-in and custom categories. - [Currencies](https://docs.sub.jerrylu.xyz/en/user-guide/currencies.md): Understand base currency, exchange rates, monthly totals, and yearly totals. - [Reports and PDF export](https://docs.sub.jerrylu.xyz/en/user-guide/reports.md): Review spending analytics in the Advanced Report and export print-ready A4 PDF reports. - [Reminders](https://docs.sub.jerrylu.xyz/en/user-guide/reminders.md): Set up Bark renewal reminders and per-subscription notification toggles. - [Import and export](https://docs.sub.jerrylu.xyz/en/user-guide/import-export.md): Back up, restore, and move subscription data with JSON files. - [Account and sync](https://docs.sub.jerrylu.xyz/en/user-guide/account-sync.md): Understand local data, sign-in, cloud sync, and account settings. - [Developer API keys](https://docs.sub.jerrylu.xyz/en/user-guide/developer-api-keys.md): Create and revoke API keys for trusted scripts, agents, and automations. - [FAQ](https://docs.sub.jerrylu.xyz/en/user-guide/faq.md): Common user questions about storage, sync, AI capture, reminders, currencies, and backups. ## Self-hosting ### Setup - [Getting started](https://docs.sub.jerrylu.xyz/en/getting-started.md): Run Subscription Manager locally and understand the default local-first behavior. - [Configuration](https://docs.sub.jerrylu.xyz/en/configuration.md): Environment variables and feature flags for local-first, hosted, payment, notification, and public API deployments. - [Deployment](https://docs.sub.jerrylu.xyz/en/deployment.md): Deploy the Vite frontend, Netlify Functions, Supabase migrations, Stripe webhooks, and scheduled jobs. ### Integrations - [Cloud sync with Supabase](https://docs.sub.jerrylu.xyz/en/integrations/supabase.md): Configure Supabase for authentication, cloud sync, user profiles, notification settings, payments, API keys, and AI capture quotas. - [AI capture](https://docs.sub.jerrylu.xyz/en/integrations/ai-capture.md): Configure AI-assisted subscription capture for text, screenshots, creates, updates, deletes, quotas, and privacy. - [Renewal reminders with Bark](https://docs.sub.jerrylu.xyz/en/integrations/notifications.md): Configure scheduled Bark push notifications for upcoming subscription renewals. - [Payments with Stripe](https://docs.sub.jerrylu.xyz/en/integrations/payments.md): Configure Stripe Checkout and webhooks for premium activation. ## Public API ### API Guide - [Public API overview](https://docs.sub.jerrylu.xyz/en/api/overview.md): Use Developer API keys to automate subscription lifecycle, analytics, and audit access through the v1 public API. - [Authentication](https://docs.sub.jerrylu.xyz/en/api/authentication.md): Create Developer API keys and authenticate public API requests with Bearer tokens. - [Subscription CRUD](https://docs.sub.jerrylu.xyz/en/api/subscriptions.md): Create, read, update, and delete subscriptions with task semantics for AI agents. - [Analytics](https://docs.sub.jerrylu.xyz/en/api/analytics.md): Computed spend summaries, duplicate detection, and optimization candidates for AI agents. - [Audit log](https://docs.sub.jerrylu.xyz/en/api/audit.md): Read the audit trail of write operations performed through the public API. - [AI tool usage](https://docs.sub.jerrylu.xyz/en/api/ai-tools.md): Use the public API as AI agent tools with operation semantics, confirmation rules, and recovery guidance. - [Errors and limits](https://docs.sub.jerrylu.xyz/en/api/errors-and-limits.md): Understand error responses, request IDs, rate-limit headers, and CORS behavior. ## API Reference ### Subscriptions - [List subscriptions](https://docs.sub.jerrylu.xyz/api-reference/subscriptions/list.md): Returns subscriptions owned by the authenticated API key owner, newest first. Use the limit and offset query parameters to page through results. - [Create a subscription](https://docs.sub.jerrylu.xyz/api-reference/subscriptions/create.md): Creates a subscription for the authenticated API key owner. Server-managed fields are rejected if supplied. - [Preflight subscriptions collection](https://docs.sub.jerrylu.xyz/api-reference/subscriptions/options.md): Returns CORS headers for browser preflight requests. - [Get a subscription](https://docs.sub.jerrylu.xyz/api-reference/subscriptions/get.md): Returns one subscription if it belongs to the authenticated API key owner. - [Delete a subscription](https://docs.sub.jerrylu.xyz/api-reference/subscriptions/delete.md): Deletes one subscription if it belongs to the authenticated API key owner. - [Preflight subscription item](https://docs.sub.jerrylu.xyz/api-reference/subscriptions/options-item.md): Returns CORS headers for browser preflight requests. - [Update a subscription](https://docs.sub.jerrylu.xyz/api-reference/subscriptions/update.md): Updates a non-empty subset of writable fields. nextPaymentDate is authoritative. Monthly schedules preserve billingAnchorDay across short months. ### Analytics - [Spend summary](https://docs.sub.jerrylu.xyz/api-reference/analytics/spend-summary.md): Returns subscription counts by status, monthly and yearly totals grouped per currency (never converted across currencies), spend by category, and upcoming renewals within a horizon. - [Duplicate subscriptions](https://docs.sub.jerrylu.xyz/api-reference/analytics/duplicate-subscriptions.md): Returns groups of non-cancelled subscriptions that share a normalized name, indicating likely duplicate tracking or double billing. - [Optimization candidates](https://docs.sub.jerrylu.xyz/api-reference/analytics/optimization-candidates.md): Returns factual optimization candidates - active monthly subscriptions with their current annualized cost, and subscriptions whose monthly cost exceeds twice the per-currency average. No discount rates are invented. ### Audit - [List audit log](https://docs.sub.jerrylu.xyz/api-reference/audit/list-audit-log.md): Returns the audit trail of write operations performed through the API, newest first, with before/after state in metadata. ## OpenAPI Specs - [openapi](/api/openapi.yaml) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Simplified Chinese (37 pages)](https://docs.sub.jerrylu.xyz/_llms/zh-hans.md): Documentation for Simplified Chinese.