Billing
24 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
Start checkout to add a payment method or plan#
/v1/billing/checkoutscope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
JSON bodyplanstringyearlybooleancurl -s -X POST https://api.kosa8.com/v1/billing/checkout \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Open the billing portal (invoices, payment method)#
/v1/billing/portalscope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
Responsescurl -s -X POST https://api.kosa8.com/v1/billing/portal \ -H "Authorization: Bearer $KOSA8_API_KEY"
Re-check the payment provider for this org's subscription#
/v1/billing/syncscope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
Responsescurl -s -X POST https://api.kosa8.com/v1/billing/sync \ -H "Authorization: Bearer $KOSA8_API_KEY"
Change plan (Solo, Pro, Team, Scale; seats for Team and Scale, yearly or monthly); the prorated difference is charged now#
/v1/billing/planscope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
Responsescurl -s -X POST https://api.kosa8.com/v1/billing/plan \ -H "Authorization: Bearer $KOSA8_API_KEY"
Add-on packs: each pack, its price, the limit it adds to and how many are in force. available is false when none is sold here#
/v1/billing/addonsscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/billing/addons \ -H "Authorization: Bearer $KOSA8_API_KEY"
Buy add-on packs ({addon: hours_100 | running_10, quantity}): monthly, stackable on any plan. Answers {url} for a checkout (the first of a kind) or {quantity} when added to the pack subscription. Needs a plan (402 plan_required)#
/v1/billing/addonsscope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
JSON bodyaddonrequired"hours_100" | "running_10"quantityintegercurl -s -X POST https://api.kosa8.com/v1/billing/addons \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Remove add-on packs (?quantity, default 1); the last one stops at the end of the month paid for (ends_at)#
/v1/billing/addons/{addon}scope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
Parametersaddonrequiredpath · stringquantityquery · integercurl -s -X DELETE https://api.kosa8.com/v1/billing/addons/$ADDON \ -H "Authorization: Bearer $KOSA8_API_KEY"
Burst Passes: the pass (null when none is sold here; available false), the passes held, those running and when each ends#
/v1/billing/burstscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/billing/burst \ -H "Authorization: Bearer $KOSA8_API_KEY"
Activate Burst Passes ({quantity}, default 1): each raises the running limit for its hours from now, stacking up to max_active. Holding fewer than asked, answers {url}, a checkout for the rest, activated once paid. 404 not_available when none is sold here; 409 burst_cap past max_active; needs a plan (402 plan_required)#
/v1/billing/burstscope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
JSON bodyquantityintegercurl -s -X POST https://api.kosa8.com/v1/billing/burst \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Pay what is owed now (after a declined charge, once the card is fixed)#
/v1/billing/charge-nowscope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
Responsescurl -s -X POST https://api.kosa8.com/v1/billing/charge-now \ -H "Authorization: Bearer $KOSA8_API_KEY"
Link a kosa8 licence to the org#
/v1/billing/licencescope admin · ownerOwner only: an owner member or the organization's own admin key; an admin member gets 403.
Responsescurl -s -X POST https://api.kosa8.com/v1/billing/licence \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
The plan's licence keys, for kosa8 login to activate on a member's own machine (a person only)#
/v1/billing/machine-licencescope sandboxes:writecurl -s -X POST https://api.kosa8.com/v1/billing/machine-licence \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Prepaid credit balance and packs#
/v1/billing/creditsscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/billing/credits \ -H "Authorization: Bearer $KOSA8_API_KEY"
Redirect to checkout for a plan#
/v1/checkout/planpublicplanquery · stringcurl -s -X GET https://api.kosa8.com/v1/checkout/plan
This month's bill so far#
/v1/usagescope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/usage \ -H "Authorization: Bearer $KOSA8_API_KEY"
The running-sandbox limit: how many are active, the limit, and the last request for more#
/v1/limitsscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/limits \ -H "Authorization: Bearer $KOSA8_API_KEY"
Ask kosa8 for a higher running-sandbox limit; kosa8 answers the owner by email. Once a day#
/v1/limits/requestscope adminmax_runningrequiredintegerreasonstringcurl -s -X POST https://api.kosa8.com/v1/limits/request \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Daily spend, top sandboxes, credit left and projected month-end spend#
/v1/usage/insightsscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/usage/insights \ -H "Authorization: Bearer $KOSA8_API_KEY"
Up to two upgrade moments for this org, most urgent first, each grounded in the org's own usage and the real price tables#
/v1/recommendationsscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/recommendations \ -H "Authorization: Bearer $KOSA8_API_KEY"
Hide a moment for this org for 14 days#
/v1/recommendations/{id}/dismissscope sandboxes:readidrequiredpath · stringcurl -s -X POST https://api.kosa8.com/v1/recommendations/$SBX/dismiss \ -H "Authorization: Bearer $KOSA8_API_KEY"
Refer and earn link and invitations#
/v1/referralscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/referral \ -H "Authorization: Bearer $KOSA8_API_KEY"
Affiliate program status#
/v1/affiliatescope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/affiliate \ -H "Authorization: Bearer $KOSA8_API_KEY"
Apply to the affiliate program#
/v1/affiliate/applyscope admincurl -s -X POST https://api.kosa8.com/v1/affiliate/apply \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Set affiliate payout details (method, email, country, legal name)#
/v1/affiliate/payoutscope admincurl -s -X POST https://api.kosa8.com/v1/affiliate/payout \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json