Docs

Access and authentication

Validakey has two authentication paths. Licences use the sealed token path so your private key never has to live on a customer machine.

Two paths

Path Endpoints Authenticated by
Token /v1/i/ /v1/r/ /v1/t/ /v1/m/ /v1/policy/ /v1/v/ /v1/p/ Sealed envelope under App ID or Instance ID
Account /v1/u/ /v1/billing/* /v1/apps/ /v1/instance/ /v1/usage/ /v1/payout/* Authorization: Bearer <api_pkey>

No keys ever transmit cleartext on a wire. After sealing the encryption envelope, no originating keys ever hit the wire again.

Identity chain

  1. Account UUID → create a User App ID (dashboard or account API with private key).
  2. User App ID + account UUID + subject + fingerprint → handshake for an Instance ID (POST /v1/i/).
  3. Instance ID → mint, validate, renew, revoke, rotate, and manage the customer card.

Subject names the end customer inside one app and is required on handshake. validakey-php generates a Subject ID when the caller does not set one.

Token routes

POST /v1/i/ — Handshake

Issue an Instance ID for a User App ID, machine fingerprint, and subject. The request is sealed under the User App ID. Repeat handshakes for the same subject rotate that instance in place. No account key is involved.

POST /v1/r/ — Rotate

Your app can retire its own instance at any time by sealing a request with the instance_id it currently holds. No account key is involved.

POST /v1/m/ — Make

Mint a vKey after payment or for testing. Seal the request under the current Instance ID. No account key is involved.

Limited is one shape: optional expiry (duration or expires_at) and/or optional uses. Send uses alone for a use-only vKey with no clock limit; send no_expiry without uses for a Transactional vKey that lasts until revoked. An empty body still defaults to a one-hour time limit.

When mint policy is enabled on the User App (dashboard or PATCH /v1/apps/), omitted mint fields use the app defaults and values outside the configured limits are rejected with mint_policy_violation. Do not trust client-supplied prices for distributed licensing — enable policy and set a fixed price range.

POST /v1/policy/ — Mint policy

Read the effective public mint defaults and limits for this instance’s app. Seal an empty (or any) request under the Instance ID. No account private key is involved. Use this before minting when the app enforces policy so clients discover required prices and shapes from the server.

Why the private key stays home

The private key can change billing details and read usage for your account. Nothing on the licence path accepts it or needs it. Software you ship to end users should not carry it at all — use the dashboard for account tasks, or call account endpoints from a server you control.

Validation scope

Validating a vKey matches the calling instance’s account, application, and subject. A mismatch returns not_found, so one customer of your app cannot validate or spend another customer’s vKey.

Machine locks and transfers

You can lock an Instance Entity to its current machine from the dashboard or account API. Moving a locked instance fails with instance_locked. Transferring an Instance Entity to a different subject requires a one-shot window you authorize, then POST /v1/t/ — which rotates the Instance ID and clears the stored customer card so payment methods are not inherited.

See how the PHP client uses these paths →