Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: KernelScan Billing API
description: 'Public REST API for KernelScan — the Linux kernel CVE analyzer. Upload a kernel .config and get a CycloneDX VEX report of affecting CVEs, query the CVE database, and manage product analyses. Authenticate with `Authorization: Bearer ks_live_` (create one at /api/auth/api-keys). The same surface is also available over MCP at /mcp/.'
version: 1.0.0
contact:
name: KernelScan Support
url: https://kernelscan.io/docs
email: support@kernelscan.io
termsOfService: https://kernelscan.io/agb
servers:
- url: https://kernelscan.io
tags:
- name: Billing
paths:
/api/billing/checkout:
post:
tags:
- Billing
summary: Start Checkout
description: 'Create a Stripe Checkout session and return its hosted URL.
Requires the paid-order legal data the upgrade form already collects
(``account_type`` + ``country``, §§ 13/14 BGB and the VAT jurisdiction). It
does not re-collect them: rejecting with a pointer at the existing form
keeps ONE place where that data is captured, which is also where
backend#145 will attach the § 312j/§ 356 V surface.'
operationId: start_checkout_api_billing_checkout_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Start Checkout Api Billing Checkout Post
/api/billing/checkout/abandon:
post:
tags:
- Billing
summary: Abandon Signup Checkout
description: Turn an explicitly cancelled paid signup into an ordinary Free account.
operationId: abandon_signup_checkout_api_billing_checkout_abandon_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Abandon Signup Checkout Api Billing Checkout Abandon Post
/api/billing/change-plan:
post:
tags:
- Billing
summary: Change Plan
description: 'Open Stripe''s hosted plan-change flow for an active subscription.
This route changes nothing itself. Stripe''s portal shows the exact price,
tax and proration before confirmation, then the normal subscription webhook
applies the resulting tier. It is management of an existing contract and
therefore remains available when the new-sales switch is off.'
operationId: change_plan_api_billing_change_plan_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Change Plan Api Billing Change Plan Post
/api/billing/portal:
post:
tags:
- Billing
summary: Open Portal
description: 'Return a one-time URL into Stripe''s hosted billing portal.
Configured-only, not sales-gated: the portal is where an existing customer
manages or ends what they are already paying for.'
operationId: open_portal_api_billing_portal_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Open Portal Api Billing Portal Post
/api/billing/cancel:
post:
tags:
- Billing
summary: Cancel Subscription
description: 'Stop the subscription renewing; the plan runs to the end of the period.
Deliberately not an immediate downgrade. The period is paid for, and taking
the plan away the moment someone clicks cancel would be charging for time
then withholding it. The drop to free happens when Stripe fires
``customer.subscription.deleted`` at the period end, on the same webhook
path as any other ending — one implementation, not two.
**This is the only path that cancels anything automatically.** The § 312k
BGB Kündigungsbutton (``app/routes/cancellation.py``, backend#372) is
login-free by law and therefore records a declaration and hands it to
support instead — an unauthenticated claim on an email address is not
evidence of who is asking. Here ``require_team_admin`` establishes identity
and authority together, which is what makes acting immediately safe.'
operationId: cancel_subscription_api_billing_cancel_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Cancel Subscription Api Billing Cancel Post
/api/billing/resume:
post:
tags:
- Billing
summary: Resume Subscription
description: 'Call off a scheduled cancellation, while the period is still running.
The counterpart to cancelling at period end: until that date arrives
nothing has actually happened, so undoing it is a flag flip rather than a
new purchase. After the period ends there is no subscription to resume and
the customer buys again through checkout.'
operationId: resume_subscription_api_billing_resume_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Resume Subscription Api Billing Resume Post
/api/billing/subscription:
get:
tags:
- Billing
summary: Get Subscription State
description: 'The account''s current subscription, for the account page.
Any member, not just team admins: what plan the team is on is not a secret
from the people sharing it. Not gated on the self-serve flag either — an
account that already has a subscription must always be able to see it.'
operationId: get_subscription_state_api_billing_subscription_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Get Subscription State Api Billing Subscription Get
/api/billing/webhook:
post:
tags:
- Billing
summary: Stripe Webhook
description: 'Receive a Stripe webhook.
Unauthenticated by necessity — Stripe has no credential to present — so the
HMAC signature over the raw body IS the authentication, and it is verified
before the payload is parsed, let alone acted on.
Always answers 200 once the signature checks out, including for events we
do not handle and for a subscription we cannot resolve to a team. A non-2xx
makes Stripe retry for three days and eventually disable the endpoint;
neither an unknown event type nor an orphaned customer is fixed by
redelivery, and both are already in the log.'
operationId: stripe_webhook_api_billing_webhook_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Stripe Webhook Api Billing Webhook Post
/api/cancellation:
post:
tags:
- Billing
summary: Submit Cancellation
description: 'Accept a cancellation declaration from the login-free page.
Validation is limited to what the *form* needs to be a valid declaration —
a type, an address to look up, and a reason when one is legally required.
Everything beyond that is recorded as typed, because § 312k Abs. 2 asks the
consumer for identifying details and it is not our place to reject their
answer.
A session, when the browser has one, is recorded alongside as evidence of
who sent it. It takes no part in any decision.'
operationId: submit_cancellation_api_cancellation_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Submit Cancellation Api Cancellation Post
externalDocs:
description: KernelScan documentation
url: https://kernelscan.io/docs