{"openapi":"3.1.0","info":{"title":"Keyvane API","version":"1.0.0","description":"Licenses, plans, feature access and usage limits for software you sell, kept in sync with Stripe. Business outcomes (limit reached, invalid key) return 200 with `allowed`/`valid` false and a `code`.","license":{"name":"MIT (SDK and docs)","url":"https://opensource.org/license/mit"}},"servers":[{"url":"https://keyvane.dev/v1"}],"externalDocs":{"description":"API reference","url":"https://keyvane.dev/docs/api-reference"},"tags":[{"name":"Entitlements"},{"name":"Usage"},{"name":"Customers"},{"name":"Licenses"},{"name":"Products"}],"paths":{"/entitlements":{"get":{"operationId":"getEntitlements","summary":"Get a customer's entitlements","tags":["Entitlements"],"security":[{"secretKey":[]}],"parameters":[{"name":"customer","in":"query","required":true,"description":"Your user ID or a Keyvane customer ID.","schema":{"type":"string"}},{"name":"product","in":"query","required":false,"description":"Product key or ID (optional with one product).","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlements"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/entitlements/check":{"get":{"operationId":"checkEntitlement","summary":"Check a single feature","tags":["Entitlements"],"security":[{"secretKey":[]}],"parameters":[{"name":"customer","in":"query","required":true,"description":"Your user ID or a Keyvane customer ID.","schema":{"type":"string"}},{"name":"feature","in":"query","required":true,"description":"Feature key.","schema":{"type":"string"}},{"name":"product","in":"query","required":false,"description":"Product key or ID.","schema":{"type":"string"}},{"name":"quantity","in":"query","required":false,"description":"Units needed for metered features (default 1).","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementCheck"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/usage":{"post":{"operationId":"recordUsage","summary":"Check the limit and consume usage atomically","tags":["Usage"],"description":"Also accepts an `Idempotency-Key` header.","security":[{"secretKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["feature"],"properties":{"customer":{"type":"string","description":"Your user ID. Either customer or license_key is required."},"license_key":{"type":"string","description":"Meter against a license key instead."},"feature":{"type":"string","description":"Metered feature key."},"product":{"type":"string","description":"Product key or ID."},"quantity":{"type":"integer","minimum":1,"maximum":1000000,"default":1},"idempotency_key":{"type":"string","description":"Makes retries safe."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["feature"],"properties":{"customer":{"type":"string","description":"Your user ID. Either customer or license_key is required."},"license_key":{"type":"string","description":"Meter against a license key instead."},"feature":{"type":"string","description":"Metered feature key."},"product":{"type":"string","description":"Product key or ID."},"quantity":{"type":"integer","minimum":1,"maximum":1000000,"default":1},"idempotency_key":{"type":"string","description":"Makes retries safe."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResult"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/customers":{"get":{"operationId":"listCustomers","summary":"List customers","tags":["Customers"],"security":[{"secretKey":[]}],"parameters":[{"name":"external_id","in":"query","required":false,"description":"Exact match on your user ID.","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"Exact match on email.","schema":{"type":"string"}},{"name":"query","in":"query","required":false,"description":"Search ID, email or name.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100 (default 20).","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","required":false,"description":"Return objects after this ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"has_more":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"upsertCustomer","summary":"Create or update a customer by external_id","tags":["Customers"],"security":[{"secretKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{"type":"string","description":"Your user ID."},"email":{"type":"string"},"name":{"type":"string"},"metadata":{"type":"object","additionalProperties":true,"description":"Merged; set a key to null to remove it."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"external_id":{"type":"string","description":"Your user ID."},"email":{"type":"string"},"name":{"type":"string"},"metadata":{"type":"object","additionalProperties":true,"description":"Merged; set a key to null to remove it."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/customers/{id}":{"get":{"operationId":"getCustomer","summary":"Retrieve a customer","tags":["Customers"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Keyvane ID or your user ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"updateCustomer","summary":"Update a customer","tags":["Customers"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Keyvane ID or your user ID.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"external_id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"deleteCustomer","summary":"Delete a customer and their licenses, usage and history","tags":["Customers"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Keyvane ID or your user ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"customer"},"id":{"type":"string"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted":{"const":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/licenses":{"get":{"operationId":"listLicenses","summary":"List licenses","tags":["Licenses"],"security":[{"secretKey":[]}],"parameters":[{"name":"customer","in":"query","required":false,"description":"Your user ID or customer ID.","schema":{"type":"string"}},{"name":"product","in":"query","required":false,"description":"Product key or ID.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"active, suspended or revoked.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100 (default 20).","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","required":false,"description":"Return objects after this ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/License"}},"has_more":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createLicense","summary":"Create a license key","tags":["Licenses"],"security":[{"secretKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","description":"Plan key or ID."},"product":{"type":"string","description":"Product key or ID."},"customer":{"type":"string","description":"Your user ID; created if new."},"expires_at":{"type":"string","description":"ISO date-time or YYYY-MM-DD."},"duration_days":{"type":"integer","minimum":1},"max_activations":{"type":"integer","minimum":1},"metadata":{"type":"object","additionalProperties":true},"note":{"type":"string","description":"Internal note."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","description":"Plan key or ID."},"product":{"type":"string","description":"Product key or ID."},"customer":{"type":"string","description":"Your user ID; created if new."},"expires_at":{"type":"string","description":"ISO date-time or YYYY-MM-DD."},"duration_days":{"type":"integer","minimum":1},"max_activations":{"type":"integer","minimum":1},"metadata":{"type":"object","additionalProperties":true},"note":{"type":"string","description":"Internal note."}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/License"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/licenses/{id}":{"get":{"operationId":"getLicense","summary":"Retrieve a license","tags":["Licenses"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"License ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/License"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"updateLicense","summary":"Update a license","tags":["Licenses"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"License ID.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_activations":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"plan":{"type":"string"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_activations":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/License"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/licenses/{id}/suspend":{"post":{"operationId":"suspendLicense","summary":"Suspend a license (reversible)","tags":["Licenses"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"License ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/License"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/licenses/{id}/reinstate":{"post":{"operationId":"reinstateLicense","summary":"Reinstate a suspended license","tags":["Licenses"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"License ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/License"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/licenses/{id}/revoke":{"post":{"operationId":"revokeLicense","summary":"Revoke a license (permanent)","tags":["Licenses"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"License ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/License"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/licenses/validate":{"post":{"operationId":"validateLicense","summary":"Validate a license key","tags":["Licenses"],"security":[{"secretKey":[]},{"publishableKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key"],"properties":{"key":{"type":"string"},"fingerprint":{"type":"string","description":"Require this device to be activated."},"product":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["key"],"properties":{"key":{"type":"string"},"fingerprint":{"type":"string","description":"Require this device to be activated."},"product":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseValidation"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/licenses/activate":{"post":{"operationId":"activateLicense","summary":"Activate a device for a license key","tags":["Licenses"],"security":[{"secretKey":[]},{"publishableKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key","fingerprint"],"properties":{"key":{"type":"string"},"fingerprint":{"type":"string"},"name":{"type":"string"},"product":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["key","fingerprint"],"properties":{"key":{"type":"string"},"fingerprint":{"type":"string"},"name":{"type":"string"},"product":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseValidation"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/licenses/deactivate":{"post":{"operationId":"deactivateLicense","summary":"Free a device activation","tags":["Licenses"],"security":[{"secretKey":[]},{"publishableKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key","fingerprint"],"properties":{"key":{"type":"string"},"fingerprint":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["key","fingerprint"],"properties":{"key":{"type":"string"},"fingerprint":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"license_deactivation"},"deactivated":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/products":{"get":{"operationId":"listProducts","summary":"List products with plans and features","tags":["Products"],"security":[{"secretKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"has_more":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/products/{id}":{"get":{"operationId":"getProduct","summary":"Retrieve a product","tags":["Products"],"security":[{"secretKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Product ID or key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"secretKey":{"type":"http","scheme":"bearer","description":"Secret key (kv_sk_…). Server-side only."},"publishableKey":{"type":"http","scheme":"bearer","description":"Publishable key (kv_pk_…). License validate/activate/deactivate only."}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}},"schemas":{"Ref":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}}},"Feature":{"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["boolean","metered"]},"enabled":{"type":"boolean"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}]},"used":{"type":"integer"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}]},"reset_period":{"enum":["day","month","year","never"]},"resets_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Entitlements":{"type":"object","properties":{"object":{"const":"entitlements"},"customer":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"product":{"$ref":"#/components/schemas/Ref"},"plan":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"source":{"enum":["license","default_plan","none"]},"license":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"access_until":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"subscription":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"features":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Feature"}},"checked_at":{"type":"string"}}},"EntitlementCheck":{"type":"object","properties":{"object":{"const":"entitlement_check"},"allowed":{"type":"boolean"},"code":{"enum":["ok","not_included","limit_exceeded"]},"message":{"type":"string"},"feature":{"$ref":"#/components/schemas/Feature"},"plan":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]}}},"UsageResult":{"type":"object","properties":{"object":{"const":"usage"},"allowed":{"type":"boolean"},"code":{"enum":["ok","limit_exceeded","not_included","license_invalid"]},"message":{"type":"string"},"replayed":{"type":"boolean"},"feature":{"$ref":"#/components/schemas/Feature"},"plan":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]}}},"Customer":{"type":"object","properties":{"object":{"const":"customer"},"id":{"type":"string"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true},"last_seen_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"License":{"type":"object","properties":{"object":{"const":"license"},"id":{"type":"string"},"key":{"type":"string","description":"KV-XXXXX-XXXXX-XXXXX-XXXXX"},"valid":{"type":"boolean"},"status":{"enum":["active","trialing","past_due","canceled","expired","inactive","suspended","revoked"]},"status_message":{"type":"string"},"access_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"product":{"$ref":"#/components/schemas/Ref"},"plan":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"source":{"enum":["dashboard","api","stripe"]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_activations":{"anyOf":[{"type":"integer"},{"type":"null"}]},"activations":{"type":"integer"},"subscription":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true},"note":{"anyOf":[{"type":"string","description":"Secret keys only."},{"type":"null"}]},"last_validated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"LicenseValidation":{"type":"object","properties":{"object":{"const":"license_validation"},"valid":{"type":"boolean"},"code":{"enum":["valid","not_found","revoked","suspended","expired","subscription_canceled","payment_overdue","subscription_inactive","product_mismatch","not_activated","activation_limit_reached"]},"message":{"type":"string"},"license":{"anyOf":[{"$ref":"#/components/schemas/License"},{"type":"null"}]},"activation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"fingerprint":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"entitlements":{"anyOf":[{"$ref":"#/components/schemas/Entitlements"},{"type":"null"}]}}},"Product":{"type":"object","properties":{"object":{"const":"product"},"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"default_plan":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellation_policy":{"enum":["immediate","period_end"]},"grace_period_days":{"type":"integer"},"plans":{"type":"array","items":{"type":"object","additionalProperties":true}},"features":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}