---
title: "Licensing API · whatdoyouwant.io"
description: "Versioned REST API for entitlements, offline license keys, SSO, and per-product export."
canonical_url: "https://leaderboard.whatdoyouwant.io/docs/api"
meta:
  "og:description": "Versioned REST API for entitlements, offline license keys, SSO, and per-product export."
  "og:image": "https://leaderboard.whatdoyouwant.io/_og/d/c_OgDefault%2Ctitle_Licensing%2BAPI%2Cdescription_~VmVyc2lvbmVkIFJFU1QgQVBJIGZvciBlbnRpdGxlbWVudHMsIG9mZmxpbmUgbGljZW5zZSBrZXlzLCBTU08sIGFuZCBwZXItcHJvZHVjdCBleHBvcnQu%2Ceyebrow_whatdoyouwant.io%2Cp_Ii9kb2NzL2FwaSI%2Cs_H7_MZyfmIu0tHvIh.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Licensing API"
  "twitter:description": "Versioned REST API for entitlements, offline license keys, SSO, and per-product export."
  "twitter:image": "https://leaderboard.whatdoyouwant.io/_og/d/c_OgDefault%2Ctitle_Licensing%2BAPI%2Cdescription_~VmVyc2lvbmVkIFJFU1QgQVBJIGZvciBlbnRpdGxlbWVudHMsIG9mZmxpbmUgbGljZW5zZSBrZXlzLCBTU08sIGFuZCBwZXItcHJvZHVjdCBleHBvcnQu%2Ceyebrow_whatdoyouwant.io%2Cp_Ii9kb2NzL2FwaSI%2Cs_H7_MZyfmIu0tHvIh.png"
  "twitter:title": "Licensing API"
---

> Index of every page on this site: [llms.txt](https://leaderboard.whatdoyouwant.io/llms.txt)

# **Licensing API v1**

Central purchase and license authority. OpenAPI is at /api/v1/openapi.json.

## Online entitlements

Hosted apps send a product API key and a user, email, or license key to `POST /api/v1/entitlements/check`.

## Device activations

Activate with a stable install id via `POST /api/v1/licenses/activate`. Some plans include a base device count; extra devices are a second Stripe subscription item when the product supports them. The server sets the effective limit from `customer.subscription.created` / `updated` / `deleted` webhooks. Never send a client-supplied seat count.

If extras drop below the devices already activated, existing activations stay. New activations are blocked until the customer deactivates devices over the limit. Canceled or past-due subscriptions end entitlement the same way as other base plans.

## Desktop + web products

Each product has a stable slug in the catalog (for example `sudo-sync` for a desktop app). Licenses are `WDW1` keys. Perpetual desktop plans may enforce a `machine_limit`; hosted SaaS plans may leave it unset so entitlement is per account. Subscription plans follow Stripe period and status. Manual or free tiers may have no Stripe price and no checkout.

Desktop: `POST /api/v1/licenses/activate`, `verify`, and `deactivate` with `licenseKey` and `machineId`. When a plan has a machine limit, enforce it server-side. Honor `onlineVerifyGraceMs` (72 hours). Offline `verifyLicense` uses the Ed25519 public key only. Web: `POST /api/v1/entitlements/check` with a product API key from `pnpm keys:product <your-product-slug>`. `activate` does not block subscription plans. Do not send location.

## Offline keys

Desktop and mobile apps can verify an Ed25519-signed token with the embedded public key. The token carries product, plan, customer, expiry or perpetual, and machine limit. Activation and deactivation still hit the API. Embed only the public key in the client; keep the product API key on your server.

```
import { verifyLicense } from 'whatdoyouwant/licensing'

const payload = await verifyLicense(process.env.LICENSE_KEY, process.env.WDW_PUBLIC_KEY)
if (payload.prd !== 'sudo-sync') throw new Error('wrong product')
```

## SSO

Redirect users to `/oauth/authorize?client_id=&redirect_uri=`. Exchange the code at `/api/v1/oauth/token`.

## Stripe Tax

Checkout collects the billing address and VAT/GST ID. Product apps do not send location. Pass only the usual `productSlug`, `planId`, and optional extra-device fields. The server sets `automatic_tax`, required billing address, tax ID collection, and the catalog `tax_code`. Prices are exclusive: tax is added on top.

## Export

`GET /api/v1/export/:productSlug` returns only that product's customers and licenses so a single app can be sold later.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://leaderboard.whatdoyouwant.io/#website","@type":"WebSite","description":"Joe Seeley builds whatever software anyone wants at the lowest prices ever. Apps, custom proposals, licenses, and AI automation consulting from $200/hour.","name":"whatdoyouwant.io","url":"https://leaderboard.whatdoyouwant.io/","publisher":{"@id":"https://leaderboard.whatdoyouwant.io/#identity"}},{"@id":"https://leaderboard.whatdoyouwant.io/docs/api#webpage","@type":"WebPage","description":"Versioned REST API for entitlements, offline license keys, SSO, and per-product export.","name":"Licensing API","url":"https://leaderboard.whatdoyouwant.io/docs/api","isPartOf":{"@id":"https://leaderboard.whatdoyouwant.io/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://leaderboard.whatdoyouwant.io/docs/api"]}]},{"@id":"https://leaderboard.whatdoyouwant.io/#identity","@type":"Person","jobTitle":"Founder, AI systems builder","logo":"https://leaderboard.whatdoyouwant.io/favicon.svg","name":"Joe Seeley","url":"https://whatdoyouwant.io/about","sameAs":["https://github.com/codescrapbook","https://wevibing.com","https://github.com/codescrapbook","https://wevibing.com"]},{"@id":"https://leaderboard.whatdoyouwant.io/docs/api#/schema/organization/1","@type":"Organization","description":"We build whatever software anyone wants at the lowest prices ever.","logo":"https://whatdoyouwant.io/favicon.svg","name":"whatdoyouwant.io","url":"https://whatdoyouwant.io","sameAs":["https://github.com/codescrapbook","https://wevibing.com"]}]}
```

## Sitemap

See the full [sitemap](https://leaderboard.whatdoyouwant.io/sitemap.md) for all pages.
