POST /v1/client/validate

POST /v1/client/validate

Validate a licence

Checks a licence key for one device. Your app calls it through the SDK: the SDK makes the handshake, sends the key inside an encrypted packet and checks the server's signature before your code sees the result. Do not call it with curl.

Session

handshake first
The SDK calls POST /v1/client/handshake, then encrypts this request with the session key. A plain request is refused.

Request, inside the encrypted packet

licence_key string required
The key the customer typed. Case-sensitive; spaces at the ends are removed.
device_identifiers string[] required
1 to 16 SHA-256 digests of typed device identifiers. Never raw hardware serials.
app_version string | null required
The running version, or null. The server records it with the session.
session_token string | null required
null on the first check, which redeems the key. Later checks send the token from the last result.

Result, after the SDK checks and decrypts it

status string
Always "active". Every other state is a refusal with its own code.
tier string
The level the purchase grants, for example pro.
features string[]
What this licence unlocks, for example export and presets.
entitlement_expires_at string | null
UTC ISO 8601 time, or null for a lifetime licence.
session_token string
Send it with the next check in this session. It lasts at most 15 minutes.
X-Authfence-Proof header
Ed25519 signature over the exact reply bytes, from a key in your app's keyset. The SDK checks it before it decrypts. Never check a rebuilt JSON object.

Refusals

licence_invalid refusal
Unknown or revoked key. Both get the same code, so a guessed key reveals nothing.
licence_expired, licence_paused, licence_banned refusal
The licence existed and access stopped. Your app can tell the customer why.
device_limit_reached refusal
This licence has no free device slot. A HWID reset frees one.
rate_limited wait
Too many checks from this address or session. Wait for the time in Retry-After, then try again.