API Documentation
RESTful API documentation for developers
https://api.lotstech.comAPI Key (Bearer token or X-API-Key header)
14
Authentication
All API requests require authentication using an API key. You can create an API key from your dashboard.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.lotstech.com/api/v1/lotstech/connected-apps/:client_idaccount
/api/v1/lotstech/connected-apps/:client_idDisconnect App
lotstech_disconnect_appDisconnect an AI agent app from your Lots account: every access and refresh token it holds for you is revoked at once. Pass the client_id from list_connected_apps; optional product limits it to one product. The app can only come back by asking you to approve it again.
/api/v1/lotstech/connected-appsList Connected Apps
lotstech_list_connected_appsList the AI agent apps (Claude, ChatGPT, Cursor and others) that can act on your Lots account right now, with the products each can reach, when it was first granted and last used. Covers every Lots product. Optional product limits the list to one product key, for example lotssocial.
billing
/api/v1/lotstech/entitlements/acquireAcquire Resource Entitlement
lotstech_entitlement_acquireAtomically acquire a named resource and assess its current UTC service day.
/api/v1/lotstech/create-checkout-linkCreate Checkout Link
lotstech_create_checkout_linkCreate a checkout link to buy a LotsTech plan or credits. Returns the checkout URL, where the buyer pays, and the price. To buy a LotsTech suite, send suite (business or founders), units and cycle instead of polar_product_id. LotsTech for Business is priced per business and LotsTech for Founders per product; the tier sizes, prices and what each app includes are at https://api.lotstech.com/api/v1/pricing-facts?project=LotsTech. The answer names the suite, the units, the cycle, the price and what each app includes. A suite comes with a 14-day free trial when the buyer can have one (up to 5 businesses or 3 products, one trial per person): the card is taken at checkout and nothing is charged today; the answer's trial gives the first charge and its date, or why there is no trial. When a few more businesses or products would cost less, the answer's suite.round_up says so; the link is always for the number sent. For anything else, send polar_product_id and success_url; for credits with a custom amount, also send custom_amount. discount_code applies a discount code, checked the same way as on the checkout page. The buyer's email is filled in.
/api/v1/lotstech/create-customer-portal-linkCreate Customer Portal Link
lotstech_create_customer_portal_linkCreate a Polar customer portal link for the signed-in user's paid plan, where they can upgrade, downgrade, switch billing cycle or cancel. Returns { available: false } for gift or credits-only accounts.
/api/v1/lotstech/project-productsGet Project Products
lotstech_get_project_productsGet all available products for a specific project (SaaS). Returns product listings with pricing details for monthly, yearly, and one-time purchases.
/api/v1/lotstech/user-subscriptionGet User Subscription
lotstech_get_user_subscriptionGet the authenticated user's active subscription for a specific project. Returns subscription status, billing cycle, and product details.
/api/v1/lotstech/entitlementsList Resource Entitlements
lotstech_entitlement_resourcesList active resource holdings owned by the authenticated payer.
/api/v1/lotstech/entitlements/projectProject Resource Entitlements
lotstech_entitlement_projectionProject every held resource against the contract active at a timestamp; use for cancellation and renewal previews.
/api/v1/lotstech/entitlements/quoteQuote Resource Entitlement
lotstech_entitlement_quoteQuote plan coverage and credit-funded overflow without changing state.
/api/v1/lotstech/entitlements/releaseRelease Resource Entitlement
lotstech_entitlement_release_v2Release a named resource; future daily billing stops and the product resource is not deleted.
credits
/api/v1/lotstech/deduct-user-creditsDeduct User Credits
lotstech_deduct_user_creditsDeduct credits from the authenticated user's balance for feature usage. Validates sufficient balance before deduction. Automatically calculates balance_after and sets transaction_type to 'usage'. Supports reference_type and reference_id for linking to external records.
/api/v1/lotstech/credit-historyGet Credit History
lotstech_get_credit_historyGet the authenticated user's credit transaction history with pagination. Can optionally filter by project_id to show only transactions for a specific SaaS. Returns all credit transactions including purchases, usage, refunds, bonuses, and admin adjustments. Shows which project consumed credits and when.
/api/v1/lotstech/user-creditsGet User Credits
lotstech_get_user_creditsGet the authenticated user's current credit balance. Credits are shared across all LOTS products and never expire.