Floating licenses
Floating licenses with three API calls
Give a team a pool of seats instead of one key per machine. Your app leases a seat when it starts, keeps it with heartbeats, and gives it back when it exits. No license server to install.
Overview
How floating licensing works
A floating (concurrent) license lets any number of machines use the software, but only so many at the same time. A customer with 10 seats can install your app on 50 workstations; the 11th person to open it waits for a seat.
Keymint keeps the seat pool and the leases. Leases expire on their own, so a laptop that crashes or loses its connection doesn't hold a seat forever.
The flow
Checkout, heartbeat, checkin
- 01
Checkout
POST /key/checkout leases a seat for this hostId and returns a sessionId, a sessionSecret, the first nonce and the heartbeat interval. A full pool answers 403 floating_seats_full with the current and maximum seat counts.
Learn more - 02
Heartbeat
POST /key/heartbeat on the returned interval extends the lease. Each call is signed with HMAC-SHA256(sessionSecret, "sessionId:nonce") and returns the next nonce.
Learn more - 03
Expiry
If heartbeats stop, the seat is reclaimed when the lease runs out (plus a 15-second grace period). Nobody has to free it by hand.
- 04
Checkin
POST /key/checkin on a normal exit releases the seat at once for the next user.
Learn more
Code
Lease, keep and release a seat
The raw checkout request, and the whole session in Node.js.
curl -X POST https://api.keymint.dev/key/checkout \
-H "Authorization: Bearer YOUR_CLIENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"productId": "YOUR_PRODUCT_ID",
"licenseKey": "A8E2K-9F1BC-3D4GH-7J2KM",
"hostId": "build-agent-07"
}'
# 200 OK
# { "code": 0, "message": "Seat checked out",
# "sessionId": "Tq3bXhW9sYk2LmN4pR7sT9", "sessionSecret": "3f1c0e…",
# "nextNonce": "Vb2kQ9xLmN4pR7sT9vW1yZ3a", "heartbeatInterval": 60,
# "expiresAt": "2026-11-07T10:05:00.000Z", ... }
#
# Seats full: 403 { "errorCode": "floating_seats_full", "code": 4, ... }import { KeyMint } from 'keymint';
const keymint = new KeyMint('YOUR_CLIENT_API_KEY');
const ids = { productId: 'YOUR_PRODUCT_ID', licenseKey: 'A8E2K-9F1BC-3D4GH-7J2KM' };
// 1. Lease a seat
const session = await keymint.floatingCheckout({
...ids,
hostId: KeyMint.getOrCreateInstallationId(),
});
let nonce = session.nextNonce;
// Every heartbeat and checkin proves it holds the session secret.
const sign = () =>
KeyMint.generateSessionSignature(session.sessionId, nonce, session.sessionSecret);
// 2. Keep it alive; each response rotates the nonce
const timer = setInterval(async () => {
const res = await keymint.floatingHeartbeat({
...ids, sessionId: session.sessionId, timestamp: nonce, signature: sign(),
});
nonce = res.nextNonce;
}, session.heartbeatInterval * 1000);
// 3. Give the seat back on exit
process.on('SIGTERM', async () => {
clearInterval(timer);
await keymint.floatingCheckin({
...ids, sessionId: session.sessionId, timestamp: nonce, signature: sign(),
});
process.exit(0);
});Reference
Settings and rules
- Seats per key
- maxConcurrentSessions, from 1 to 1,000,000
- Heartbeat interval
- 60 seconds by default (60 to 86,400)
- Lease duration
- 300 seconds by default (300 to 31,536,000). Keep the heartbeat well under it so one missed beat doesn't lose the seat.
- Session security
- Proof of possession: a session secret plus a nonce that rotates on every response. Sessions aren't tied to an IP address, so users behind VPNs or shared offices keep working.
- Errors
- 403 floating_seats_full · 401 session_invalid (bad signature or stale nonce) · 410 session_expired (check out again)
- Admin
- See active sessions per license in the dashboard and revoke one to free its seat; the device finds out on its next heartbeat.
- Plans
- Floating licenses are on every plan, Free included. Startup $49/mo (1,000 licenses), Standard $149/mo (5,000 licenses). No cut of your sales.
Frequently asked questions
What is a floating license?
A license that limits how many people use the software at the same time, rather than which machines it's installed on. Seats are leased when the app starts and returned when it closes.
What happens if the app crashes and never checks in?
Its heartbeats stop, the lease runs out, and Keymint reclaims the seat automatically (the default lease is 5 minutes, plus a 15-second grace period). You can also revoke the session from the dashboard to free it at once.
Do I need to run a license server?
No. Keymint hosts the seat pool and the leases; your app only calls checkout, heartbeat and checkin over HTTPS.
Can someone steal another machine's session?
Every heartbeat, checkin and session extension has to be signed with the session secret and the latest nonce, which rotates on each response. A wrong signature or an old nonce is rejected with 401 session_invalid.
Which Keymint plans include floating licenses?
All of them, including the free plan. Paid plans start at $49/mo and add more licenses, products and API volume; floating licensing works the same on every plan.
Try it on the free plan
25 licenses, floating seats and offline licensing included. No credit card required.