{"openapi":"3.1.0","info":{"title":"DSNET Licensing","description":"Self-hosted licensing server. Desktop clients may only verify signatures, expiry, and machine identity. All entitlement decisions are made here.","version":"1.0.0"},"paths":{"/activate":{"post":{"tags":["licensing"],"summary":"Activate","operationId":"activate_activate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/refresh":{"post":{"tags":["licensing"],"summary":"Refresh","operationId":"refresh_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update-check":{"post":{"tags":["licensing"],"summary":"Update Check","description":"Called by the download gate on the website before it issues a link.","operationId":"update_check_update_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deactivate":{"post":{"tags":["licensing"],"summary":"Deactivate","operationId":"deactivate_deactivate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/validate":{"post":{"tags":["licensing"],"summary":"Validate","operationId":"validate_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/license-status":{"get":{"tags":["licensing"],"summary":"License Status","operationId":"license_status_license_status_get","parameters":[{"name":"license_key","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":64,"title":"License Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public-key":{"get":{"tags":["licensing"],"summary":"Public Key","operationId":"public_key_public_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicKeyResponse"}}}}}}},"/webhooks/payments":{"post":{"tags":["payment webhooks"],"summary":"Payment Webhook","operationId":"payment_webhook_webhooks_payments_post","parameters":[{"name":"x-dsnet-webhook-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Dsnet-Webhook-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentEvent"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Payment Webhook Webhooks Payments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/whmcs/lifecycle":{"post":{"tags":["WHMCS provisioning"],"summary":"Lifecycle","operationId":"lifecycle_integrations_whmcs_lifecycle_post","parameters":[{"name":"x-dsnet-timestamp","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Dsnet-Timestamp"}},{"name":"x-dsnet-signature","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Dsnet-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lifecycle Integrations Whmcs Lifecycle Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["ops"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"ActivateRequest":{"properties":{"license_key":{"type":"string","maxLength":64,"minLength":8,"title":"License Key"},"fingerprint":{"type":"string","maxLength":128,"minLength":16,"title":"Fingerprint"},"hostname":{"type":"string","maxLength":255,"title":"Hostname","default":""}},"type":"object","required":["license_key","fingerprint"],"title":"ActivateRequest"},"DeactivateRequest":{"properties":{"license_key":{"type":"string","maxLength":64,"minLength":8,"title":"License Key"},"fingerprint":{"type":"string","maxLength":128,"minLength":16,"title":"Fingerprint"}},"type":"object","required":["license_key","fingerprint"],"title":"DeactivateRequest"},"DeactivateResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"DeactivateResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LicenseStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["status","expires_at"],"title":"LicenseStatusResponse"},"PaymentEvent":{"properties":{"event":{"type":"string","pattern":"^subscription_(created|renewed|failed|cancelled)$","title":"Event"},"license_id":{"type":"integer","title":"License Id"},"days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Days","default":365}},"type":"object","required":["event","license_id"],"title":"PaymentEvent"},"PublicKeyResponse":{"properties":{"algorithm":{"type":"string","title":"Algorithm","default":"Ed25519"},"public_key":{"type":"string","title":"Public Key"},"token_lifetime_days":{"type":"integer","title":"Token Lifetime Days"},"warning_days_remaining":{"type":"integer","title":"Warning Days Remaining"}},"type":"object","required":["public_key","token_lifetime_days","warning_days_remaining"],"title":"PublicKeyResponse"},"RefreshRequest":{"properties":{"token":{"type":"string","minLength":16,"title":"Token"},"fingerprint":{"type":"string","maxLength":128,"minLength":16,"title":"Fingerprint"}},"type":"object","required":["token","fingerprint"],"title":"RefreshRequest"},"TokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"export_stamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Stamp"}},"type":"object","required":["token","expires_at"],"title":"TokenResponse"},"UpdateCheckRequest":{"properties":{"token":{"type":"string","maxLength":4096,"minLength":16,"title":"Token"},"fingerprint":{"type":"string","maxLength":128,"minLength":16,"title":"Fingerprint"}},"type":"object","required":["token","fingerprint"],"title":"UpdateCheckRequest"},"UpdateCheckResponse":{"properties":{"allowed":{"type":"boolean","title":"Allowed"}},"type":"object","required":["allowed"],"title":"UpdateCheckResponse"},"ValidateRequest":{"properties":{"license_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Key"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingerprint"}},"type":"object","title":"ValidateRequest"},"ValidateResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"}},"type":"object","required":["valid"],"title":"ValidateResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}