Software licensing API
A software licensing API you can call from any language
Issue license keys from your backend, activate them on your customers' devices, and check them from the app. One REST API at api.keymint.dev, with SDKs for Node.js, Python, Go and C#.
Overview
What a licensing API does
When someone buys your app, something has to create their license key, remember which devices it's used on, and tell the app whether the key is still good. A licensing API does that over HTTP, so you don't build and run the key server yourself.
With Keymint, your backend creates keys with an admin API key (for example from a Stripe webhook), and your app activates them with a client key that is safe to ship. Activations are tied to a device identifier, so a key can't run on more machines than you allow.
The API
Everything a license needs
- 01
Issue keys
POST /key creates one or many keys with an expiry, activation limit, metadata and customer. Call it from your backend when a purchase completes.
Learn more - 02
Activate on a device
POST /key/activate binds the key to a hostId and enforces the activation limit. Activating again from the same hostId doesn't use another slot, so it doubles as the check at startup.
Learn more - 03
Floating seats
Checkout, heartbeat and checkin lease a seat from a shared pool, and a crashed client's seat comes back on its own when the lease runs out.
Learn more - 04
Offline licenses
POST /key/sign returns an Ed25519-signed .lic file bound to one machine. The app verifies it with your public key, with no network.
Learn more - 05
Manage and revoke
Update, block, unblock and delete keys, change expiry and limits, and free a device with POST /key/deactivate.
Learn more - 06
Webhooks
Get a signed callback when a license is created, a device is activated or deactivated, or a key is disabled, to keep your own records in step.
Learn more
Code
Activate a key
One request from the app at startup. The same call works from any language that can send HTTP; the SDKs add a stable installation ID and typed responses.
curl -X POST https://api.keymint.dev/key/activate \
-H "Authorization: Bearer YOUR_CLIENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"productId": "YOUR_PRODUCT_ID",
"licenseKey": "A8E2K-9F1BC-3D4GH-7J2KM",
"hostId": "mac-studio-m2"
}'
# 200 OK
# { "code": 0, "message": "License valid",
# "expirationDate": "2027-03-01T00:00:00.000Z", ... }import { KeyMint } from 'keymint';
// A client key: safe to ship inside your app.
const client = new KeyMint('YOUR_CLIENT_API_KEY');
const result = await client.activateKey({
productId: 'YOUR_PRODUCT_ID',
licenseKey: 'A8E2K-9F1BC-3D4GH-7J2KM',
hostId: KeyMint.getOrCreateInstallationId(),
});
console.log(result.message); // "License valid"from keymint import KeyMint, identity
client = KeyMint(api_key="YOUR_CLIENT_API_KEY")
result = client.activate_key({
"productId": "YOUR_PRODUCT_ID",
"licenseKey": "A8E2K-9F1BC-3D4GH-7J2KM",
"hostId": identity.get_or_create_installation_id(),
})
print(result["message"]) # "License valid"Reference
The details
- Base URL
- https://api.keymint.dev, JSON over HTTPS
- Authentication
- Authorization: Bearer <API key>. Client keys can only activate, deactivate and run floating sessions, so they can ship in your app; admin keys stay on your server.
- SDKs
- npm install keymint · pip install keymint · go get github.com/keymint-dev/keymint-go · dotnet add package KeyMint
- Starter templates
- Electron, Tauri, PyQt and Next.js SaaS
- Pricing
- Free plan: 25 licenses, 1 product, 10,000 API requests a month, with floating and offline licensing included. Startup $49/mo (1,000 licenses), Standard $149/mo (5,000 licenses). No cut of your sales.
Frequently asked questions
What is a software licensing API?
It's a web service your software calls to create license keys, activate them on devices and check whether they're still valid. Instead of writing and hosting a key server, you send HTTP requests and keep your own code to a few calls.
Can I put the API key inside my app?
Yes, if it's a client key. Client keys can only activate and deactivate keys and run floating sessions for your products, so a leaked one can't create, read or revoke licenses. Keep admin keys on your server.
How do I stop one license key from being used on many computers?
Set an activation limit on the key. Each activation is tied to the device's hostId, and once the limit is reached new devices are refused until you or the customer free a slot with deactivate.
Does the licensing work without internet?
Yes. For air-gapped machines you sign an offline .lic file bound to that machine, and the app verifies it locally with your public key. See offline license activation.
Which languages can I use?
Any language that can make an HTTPS request. Keymint has SDKs for Node.js, Python, Go and C#, and starter templates for Electron, Tauri, PyQt and Next.js.
How much does the Keymint API cost?
There is a free plan with 25 licenses and 10,000 API requests a month. Paid plans are flat monthly prices: Startup at $49/mo for 1,000 licenses and Standard at $149/mo for 5,000. Keymint takes no cut of your sales.
Try it on the free plan
25 licenses, floating seats and offline licensing included. No credit card required.