Idempotent per instance_id; re-activating an instance answers 200
with the counts unchanged, so an app that activates on every launch
never burns its own slots. The count is taken under a lock
on the key, so two
clients cannot both take the last slot.
Unlike verify, an unknown or revoked key is a 404 here: activate is the write path, and there is nothing to learn from it that verify does not already say.
publishableKeyX-Sorai-Key<token>A store's publishable key, spk_….
application/jsonkey*stringlength <= 64instance_id*stringThe caller's own stable id for the machine or install being activated. Activating the same one twice consumes one slot, not two. Bounded because an unlimited key is otherwise an unbounded write.
length <= 200The key's state after the activation.
application/jsonThe key's state. Every field but valid is absent when no key
matched; the response for an unknown key is exactly {"valid": false}.
valid*booleanTrue only for a key that exists and is active.
product_id?stringuuidstatus?string"active""revoked"activation_count?integeractivation_limit?|null means unlimited.
curl -X POST 'https://api.sorai.ai/v1/public/licenses/activate' \ -H 'Content-Type: application/json' \ -d '{ "key": "string", "instance_id": "string"}'{ "valid": true, "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1", "status": "active", "activation_count": 0, "activation_limit": 0}