{"openapi":"3.1.0","info":{"title":"Fortress license server","version":"0.1.0"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin":{"get":{"summary":"Admin Page","operationId":"admin_page_admin_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/config":{"get":{"summary":"Admin Config","operationId":"admin_config_admin_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/summary":{"get":{"summary":"Admin Summary","description":"Counts only (fast) — the stat cards + live refresh. Rows come from /admin/list.","operationId":"admin_summary_admin_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/list":{"get":{"summary":"Admin List","description":"One paginated table. Returns {rows, total, offset, limit} for the given kind.","operationId":"admin_list_admin_list_get","parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/activate/start":{"post":{"summary":"Activate Start","operationId":"activate_start_v1_activate_start_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartResp"}}}}}}},"/v1/activate/approve":{"post":{"summary":"Activate Approve","description":"Called by the activate web page. Bearer = the user's Supabase access token.","operationId":"activate_approve_v1_activate_approve_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/activate/poll":{"post":{"summary":"Activate Poll","operationId":"activate_poll_v1_activate_poll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/license/refresh":{"post":{"summary":"License Refresh","description":"Re-issue the same identity's token. Accepts a token that is still valid or\nrecently expired (so a dev who let a 365d free key lapse still refreshes).","operationId":"license_refresh_v1_license_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"summary":"Billing Checkout","description":"Create a Stripe Checkout Session for the enterprise plan and return its URL.\nThe /pricing page POSTs here and redirects the buyer to `url`.","operationId":"billing_checkout_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/key":{"get":{"summary":"Billing Key","description":"After checkout, the success page calls this (Bearer = Supabase token) to\nfetch the org's pro key. The buyer MUST be signed in: we verify their Supabase\nsession (email magic-link / Google / GitHub) and record them against the org,\nthen return the key. This gives us the enterprise buyer record AND stops the\nkey being fetched by anyone who merely has the checkout session id.\nResolves session -> customer -> the org row the webhook provisioned.","operationId":"billing_key_v1_billing_key_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/session":{"get":{"summary":"Billing Session","description":"Public, minimal: the checkout email + paid state, so the enterprise success\npage can show 'your key is on its way to <email>' without a sign-in. Returns NO\nlicense (that stays behind /v1/billing/key) -- only the buyer's own checkout\nemail, keyed to their own session id.","operationId":"billing_session_v1_billing_session_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stripe/webhook":{"post":{"summary":"Stripe Webhook","operationId":"stripe_webhook_v1_stripe_webhook_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"type":"string","default":"","title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ApproveReq":{"properties":{"user_code":{"type":"string","title":"User Code"}},"type":"object","required":["user_code"],"title":"ApproveReq"},"CheckoutReq":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"seats":{"type":"integer","title":"Seats","default":1}},"type":"object","title":"CheckoutReq"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PollReq":{"properties":{"device_code":{"type":"string","title":"Device Code"}},"type":"object","required":["device_code"],"title":"PollReq"},"RefreshReq":{"properties":{"license":{"type":"string","title":"License"}},"type":"object","required":["license"],"title":"RefreshReq"},"StartResp":{"properties":{"device_code":{"type":"string","title":"Device Code"},"user_code":{"type":"string","title":"User Code"},"verification_uri":{"type":"string","title":"Verification Uri"},"interval":{"type":"integer","title":"Interval"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["device_code","user_code","verification_uri","interval","expires_in"],"title":"StartResp"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}