Account
27 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.
The organization and the calling key#
/v1/meany keycurl -s -X GET https://api.kosa8.com/v1/me \ -H "Authorization: Bearer $KOSA8_API_KEY"
Change your display name (a member's session or key; an org key gets 409 member_required)#
/v1/meany keynamerequiredstring | nullcurl -s -X PATCH https://api.kosa8.com/v1/me \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Your profile: name, email, role, how you sign in, newsletter#
/v1/me/profileany keycurl -s -X GET https://api.kosa8.com/v1/me/profile \ -H "Authorization: Bearer $KOSA8_API_KEY"
Change your password; ends your sessions in other browsers and returns a fresh cookie#
/v1/me/passwordany keyDashboard session only, never an API key. Five wrong current passwords in 15 minutes answer 429.
JSON bodycurrent_passwordrequiredstringnew_passwordrequiredstringsign_out_keysbooleancurl -s -X POST https://api.kosa8.com/v1/me/password \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
End your dashboard sessions in every other browser#
/v1/me/sign-out-othersany keyDashboard session only.
Responsescurl -s -X POST https://api.kosa8.com/v1/me/sign-out-others \ -H "Authorization: Bearer $KOSA8_API_KEY"
Your two-factor sign-in: enabled, recovery codes left, whether the organization requires it#
/v1/me/mfaany keyDashboard session only (403 member_session_required for an API key). TOTP authenticator apps; passkeys are not offered yet. Applies to password, emailed code or link, and GitHub sign-in. Single sign-on (OIDC, SAML) is exempt: the identity provider's MFA applies. A dashboard session opened with an API key is exempt: the key is the credential.
Responsescurl -s -X GET https://api.kosa8.com/v1/me/mfa \ -H "Authorization: Bearer $KOSA8_API_KEY"
Start setting up an authenticator app: a new secret and otpauth:// URI, kept 15 minutes until verified#
/v1/me/mfa/totpany keyDashboard session only. The secret is shown here once and stored encrypted.
Responsescurl -s -X POST https://api.kosa8.com/v1/me/mfa/totp \ -H "Authorization: Bearer $KOSA8_API_KEY"
Turn two-factor sign-in off, proved with a current code or a recovery code#
/v1/me/mfa/totpany key409 mfa_required_by_org while the organization requires two-factor. Five wrong codes lock code checks for 15 minutes (429 mfa_locked).
JSON bodycodestringrecovery_codestringcurl -s -X DELETE https://api.kosa8.com/v1/me/mfa/totp \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Turn two-factor sign-in on with a code from the new authenticator; answers ten recovery codes, once#
/v1/me/mfa/totp/verifyany keycoderequiredstringcurl -s -X POST https://api.kosa8.com/v1/me/mfa/totp/verify \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Ten new recovery codes (the old ones stop working), proved with a current code#
/v1/me/mfa/recovery-codesany keycoderequiredstringcurl -s -X POST https://api.kosa8.com/v1/me/mfa/recovery-codes \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Your live CLI, desktop app and personal key sign-ins; revoke one with DELETE /v1/api-keys/{id}#
/v1/me/sessionsany keycurl -s -X GET https://api.kosa8.com/v1/me/sessions \ -H "Authorization: Bearer $KOSA8_API_KEY"
The organizations you belong to, and whether this sign-in can switch to each (a password, emailed code or link, or GitHub sign-in can; an organization's own SSO cannot)#
/v1/me/orgsany keycurl -s -X GET https://api.kosa8.com/v1/me/orgs \ -H "Authorization: Bearer $KOSA8_API_KEY"
Open a session in another organization you belong to; the answer sets the new session cookie#
/v1/me/orgs/switchany keyorg_idrequiredstringcurl -s -X POST https://api.kosa8.com/v1/me/orgs/switch \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Report a problem, ask a question or suggest something to the kosa8 team (at most 5 an hour per person)#
/v1/feedbackany keykindrequired"bug" | "question" | "idea"messagerequiredstringpagestringcurl -s -X POST https://api.kosa8.com/v1/feedback \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Subscribe to or leave the kosa8 weekly#
/v1/me/newsletterany keysubscribedrequiredbooleancurl -s -X POST https://api.kosa8.com/v1/me/newsletter \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
The kosa8 emails you turned off (the weekly digest, usage alerts, getting-started notes)#
/v1/me/emailsany keycurl -s -X GET https://api.kosa8.com/v1/me/emails \ -H "Authorization: Bearer $KOSA8_API_KEY"
Turn kosa8 emails off or back on: {off: [onboarding, alerts, digest, winback]} or {off: "all"}#
/v1/me/emailsany keycurl -s -X PUT https://api.kosa8.com/v1/me/emails \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
The rate card#
/v1/pricingpubliccurl -s -X GET https://api.kosa8.com/v1/pricing
Whether self-serve sign-up is open#
/v1/signuppubliccurl -s -X GET https://api.kosa8.com/v1/signup
Create an organization (the dashboard's sign-up form)#
/v1/signuppubliccurl -s -X POST https://api.kosa8.com/v1/signup \ -H 'Content-Type: application/json' -d @body.json
Org settings#
/v1/settingsscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/settings \ -H "Authorization: Bearer $KOSA8_API_KEY"
Change default_region, default_template, sleep_after_s, placement, spending_cap_usd#
/v1/settingsscope admindefault_regionstring | nulldefault_templatestring | nullsleep_after_sintegerplacement"auto" | "own" | "shared"spending_cap_usdnumber | nullcurl -s -X PATCH https://api.kosa8.com/v1/settings \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Whether this member has finished the dashboard tour (member: false for an API-key session)#
/v1/tourany keycurl -s -X GET https://api.kosa8.com/v1/tour \ -H "Authorization: Bearer $KOSA8_API_KEY"
Mark the dashboard tour done or skipped, or reset it to show again#
/v1/tourany keyactionrequired"done" | "skip" | "reset"curl -s -X POST https://api.kosa8.com/v1/tour \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Get started progress for this org#
/v1/onboardingany keycurl -s -X GET https://api.kosa8.com/v1/onboarding \ -H "Authorization: Bearer $KOSA8_API_KEY"
Skip, resume or finish a Get started step#
/v1/onboardingscope sandboxes:writeactionstringstepstringcurl -s -X POST https://api.kosa8.com/v1/onboarding \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Record an allowed product event (referral_link_copied, moment_shown, moment_clicked); rate-limited#
/v1/eventsany keynamerequiredstringmomentstringcurl -s -X POST https://api.kosa8.com/v1/events \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json