Documentation

API Documentation

RESTful API documentation for developers

Quick Info
Base URL
https://api.lotstech.com
Authentication

API Key (Bearer token or X-API-Key header)

Total Endpoints

14

Getting Started

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_id

account

DELETE
/api/v1/lotstech/connected-apps/:client_id

Disconnect App

lotstech_disconnect_app

Disconnect 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.

GET
/api/v1/lotstech/connected-apps

List Connected Apps

lotstech_list_connected_apps

List 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

POST
/api/v1/lotstech/entitlements/acquire

Acquire Resource Entitlement

lotstech_entitlement_acquire

Atomically acquire a named resource and assess its current UTC service day.

POST
/api/v1/lotstech/create-checkout-link

Create Checkout Link

lotstech_create_checkout_link

Create 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.

POST
/api/v1/lotstech/create-customer-portal-link

Create Customer Portal Link

lotstech_create_customer_portal_link

Create 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.

GET
/api/v1/lotstech/project-products

Get Project Products

lotstech_get_project_products

Get all available products for a specific project (SaaS). Returns product listings with pricing details for monthly, yearly, and one-time purchases.

GET
/api/v1/lotstech/user-subscription

Get User Subscription

lotstech_get_user_subscription

Get the authenticated user's active subscription for a specific project. Returns subscription status, billing cycle, and product details.

GET
/api/v1/lotstech/entitlements

List Resource Entitlements

lotstech_entitlement_resources

List active resource holdings owned by the authenticated payer.

POST
/api/v1/lotstech/entitlements/project

Project Resource Entitlements

lotstech_entitlement_projection

Project every held resource against the contract active at a timestamp; use for cancellation and renewal previews.

POST
/api/v1/lotstech/entitlements/quote

Quote Resource Entitlement

lotstech_entitlement_quote

Quote plan coverage and credit-funded overflow without changing state.

POST
/api/v1/lotstech/entitlements/release

Release Resource Entitlement

lotstech_entitlement_release_v2

Release a named resource; future daily billing stops and the product resource is not deleted.

credits

POST
/api/v1/lotstech/deduct-user-credits

Deduct User Credits

lotstech_deduct_user_credits

Deduct 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.

GET
/api/v1/lotstech/credit-history

Get Credit History

lotstech_get_credit_history

Get 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.

GET
/api/v1/lotstech/user-credits

Get User Credits

lotstech_get_user_credits

Get the authenticated user's current credit balance. Credits are shared across all LOTS products and never expire.