Base URL
Your store’s own address:Create an API key
1
Open the API page
In your admin panel, go to API.
2
Create a key
Give it a name that says where it’s used —
Desktop app production, License server. Keys
carry the licenses scope.3
Copy it now
The key is shown once, at creation. Keyplar stores only a hash of it, so it can’t be
shown again. Lose it and you create a new one.
ak_ followed by 64 hex characters. Revoking a key from the same page stops it
working immediately.
Authentication
Send the key as a bearer token:Rate limits
60 requests per minute per API key. Exceeding it returns429 with a Retry-After header
saying how many seconds to wait.
Validating on every launch is fine. Validating in a loop, or on every keystroke, is not.
Endpoints
Validate
Is this key good?
Activate
Claim a seat for this machine.
Deactivate
Release a seat.
POST, take JSON, and return JSON.
How responses work
A rejected license is not an HTTP error. “This key expired” comes back as
200 OK with
valid: false and a message in error. HTTP status codes are reserved for problems with the
request.object
object | null
The activation this call concerns, when there is one.
object
id and status of the order the license came from.object
id and name of the product — useful for gating features by tier.object
id and email of the license holder.object
id, name and type of the benefit that issued the key.HTTP errors
400 response
The usual integration
1
Activate once, on first run
Call activate with the customer’s key and a name for the
machine — hostname, device name, whatever helps them recognise it later in their portal.Persist the
instance.id you get back.2
Validate on launch
Call validate with the key and the stored
instance.id.
Act on valid.3
Deactivate on the way out
On uninstall or sign-out, call
deactivate so the seat goes back to the customer.