K8 HQ

K8 HQ Sign-in API

Sign up and sign in with passkeys, and manage a person's sessions, passkeys, tokens, invitations and organization members.

Version 1OpenAPI description (JSON)

Operation groups

Sign-up and sign-in

Create an account or sign in with a passkey. Each ceremony is two calls: start, then finish with the browser's passkey response.

4 operations

Sessions

Refresh, confirm and end sessions. Use these to keep an access token fresh and to confirm a recent passkey before sensitive changes.

8 operations

Account

Read the signed-in person's account and change their display name.

2 operations

Policies

See which terms and policy versions the person still has to accept, and accept them.

3 operations

Passkeys

List, add and remove the passkeys that sign a person in.

4 operations

User keys

Create and unlock the person's own encryption key, and choose whether K8 HQ keeps a copy for recovery.

7 operations

Access tokens

Create and revoke your own access tokens for scripts, AI agents and integrations. Owners and admins can also list and revoke any token in the organization.

5 operations

Sign-up invitations

Make and revoke invitations that let someone new create a K8 HQ account.

3 operations

Members

List an organization's members and change their roles, suspend, remove or leave.

9 operations

Invites

Invite people to an organization, and preview or accept an invite you were sent.

5 operations

Pending changes

Changes to people that wait for an owner: list them, approve, decline or cancel.

3 operations

K8

K8, the built-in assistant: its settings and the delegated token it acts with.

10 operations

Notices

The person's account notices: list them, mark them read, follow their links and delete them.

4 operations

Notifications

Where notices are sent besides the web app (email addresses), and which kinds each destination gets.

9 operations

Service

The public keys session access tokens are signed with, for services that verify tokens offline.

1 operation

Sign-in recovery

Recover a K8 HQ account after losing every passkey, using an outside address and a copy of the key kept by K8 HQ.

7 operations

Agent key bindings

Apps connected by a person prove they hold the keys K8 HQ may later share with them, and the person confirms them.

5 operations

Find an operation by name

Using this API

Passkey sign-in for K8 HQ, and everything about a person's account: sessions, passkeys, access tokens, invitations, the members of their organizations, K8 settings and account notices. The Content API reads and sends messages; the Setup API creates organizations, domains and inboxes.

Requests. Resource reads use GET without a body. JSON writes use POST, PUT, PATCH or DELETE as documented. Requests use these headers where applicable:

Sessions. Signing up or in with a passkey starts a session: an access token (a JWT, valid 15 minutes) and a refresh token (30 days). Exchange the refresh token at Refresh a session before the access token expires; each one works once, and presenting a spent one ends the session. The same access token works on the content API and the Setup API.

Recent passkey (step-up). Changes to credentials, people and settings need a passkey used in the last 5 minutes; each such call says so. Otherwise it answers 401 step_up_required: run Start a passkey confirmation and Finish it (the passkey prompt, on the same page), then retry with the new access token. Refreshing doesn't renew the confirmation.

A person's own session. Every call acts for the person signed in and none takes a user ID. API tokens (k8hq_...) aren't accepted here. Assistants' delegated tokens (Get a delegated token for K8) get 403 forbidden, except K8 Admin's on the three listings that say so, and only in the organization the token was made for.

Browsers. Only https://app.k8hq.com may call this API from a browser: CORS preflights from other origins are refused, and a request whose Origin names another site gets 403 forbidden (against cross-site request forgery). Programs that send no Origin aren't affected. No cookies are used.

Limits. Each network address may make 100 sign-in, sign-up and recovery POSTs in 5 minutes under /auth/v1/login/, /auth/v1/signup/ and /auth/v1/recovery/. A sign-in uses two requests; recovery uses a handful. Other /auth/ requests, excluding OPTIONS, have a separate limit of 300 per address in 5 minutes, including GET /auth/v1/recovery/status. Browser preflights count toward neither auth budget. Neither budget uses the other. For these limits, paths are URL-decoded, normalized and matched in lowercase. Both return 429 rate_limited with a problem body and Retry-After: 300. All requests still count toward the broader API limit of 3000 per address in 5 minutes, which can return 403. Edge enforcement is approximate. Separately, 20 failed passkey ceremonies in 15 minutes get 429 rate_limited until the window passes.

Errors are RFC 9457 problem details with a stable code; see Error codes.

Resource operations use GET for reads, POST for creation and workflows, PUT for whole resources, PATCH for partial updates, and DELETE for removal. Credential requirements are unchanged; this release does not add external-agent administrative authorization. JSON mutation bodies sent through CloudFront need their x-amz-content-sha256 hash; GET requests have no body.

Base URL

Base URLFor
https://api.k8hq.com/authThe K8 HQ web app, and programs acting with a person's session
curl https://api.k8hq.com/auth/v1/passkeys \
  -H "x-k8hq-token: $ACCESS_TOKEN"
Error reference

Error codes

Errors are RFC 9457 problem details (application/problem+json) whose type links here. Branch on code; detail is for people and may change.

CodeMeaning
invalid400 (also 405 and 410): malformed or refused input; detail says what. 410 here is an invite link that isn't valid any more.
unauthenticated401: no session, or it expired or was revoked: refresh, or sign in again. Also a passkey that isn't recognized.
step_up_required401: the action needs a passkey used in the last 5 minutes. Run Start a passkey confirmation and Finish it, then retry with the new access token.
forbidden403: not allowed: the member's role or permissions, an assistant's delegated token where it isn't accepted, or a browser Origin other than the web app's.
approval_required403: This connection needs approval for that, and approval isn't available yet.
not_found404: no such record, or one you may not see (organizations you aren't in answer the same way).
conflict409: refused by the current state, such as the last passkey or the last owner.
service_disabled403: K8 is disabled for this organization; an owner or admin can enable it in Services settings.
read_only402: the organization is read-only because it's out of credit (design note 0024): nobody can be invited to it or join it until an owner adds credit.
rate_limited429: too many requests from this network (wait a few minutes), too many failed passkey ceremonies (wait 15 minutes), or today's invites are made.
invite_required403: signing up needs an invitation: a sign-up invitation or an organization's invite link.
invite_used410: the sign-up invitation was used, revoked or has expired.
org_invite_no_domain403: the organization's invite can't sign up new people until the organization proves a domain.
org_signup_limit429: the organization has signed up as many new people as it may today.
policy_acceptance_required400: accept the current Terms of Service and Privacy Policy: name each current version in accepted.
policy_outdated409: a policy version named isn't the current one (or isn't published): fetch the current versions and ask the person again.
no_invites_left409: the person has no sign-up invitations left; revoked and expired ones come back.
not_for_you404: a notice link that isn't for the signed-in person (or was changed, or made up). Every real notice is also in Notices.
exists409: that inbox or address is already one of the person's destinations.
too_many409: the person has as many destinations as allowed (3 outside addresses, 5 inboxes).
shared_inbox409: others use this inbox too: show detail (what they'd see) and retry with sharedOk if the person still wants it.
address_blocked409: whoever reads this address said a K8 HQ confirmation mail wasn't for them; K8 HQ won't email it again.
confirmations_limit429: the person has had today's 5 confirmation emails.
wrong_code400: the confirmation code isn't right (or hasn't arrived yet).
code_expired410: the confirmation code has expired: send a new one.
too_many_tries429: too many wrong codes: send a new one.
not_pending409: the destination isn't waiting for a confirmation code.
changes_limit429: the person has made today's 20 destination changes (each is a security notice to every destination).
no_server_copy404: K8 HQ keeps no copy of the person's key; unlock with a passkey that supports it, or the recovery kit.
zero_access409: the person uses a zero-access inbox, which needs their own key, so K8 HQ can't keep a copy of it.
wrap_exists409: the person's key already has a wrap with that ID. Wraps are never replaced; add the new one under a new ID.
unavailable500 or 503: a temporary problem on K8 HQ's side; retry with backoff.
confirmation_required401: the change needs a passkey confirmation of exactly it (design note 0013). The answer carries action (the description to confirm) and a short summary: send action to [Begin a confirmation](/auth/docs#confirmBegin), run the passkey prompt, [finish it](/auth/docs#confirmFinish) and retry the same request with the confirmation in x-k8hq-confirm. Asking with x-k8hq-confirm: ? gets this answer without the change being made.
confirmation_invalid403: the confirmation isn't valid for this session (another session's or person's, or not signed by K8 HQ): confirm again.
confirmation_expired409: the confirmation timed out (it lives 2 minutes): confirm again.
confirmation_mismatch409: the change isn't the one confirmed: the request, or what it changes, is different now. Show the current state and let the person confirm again; never retry silently.
confirmation_used409: the confirmation was already used (each confirms one change, once): confirm again.
needs_person403: only a person signed in to K8 HQ can make this change with a passkey confirmation, never an API token or an assistant.
invalid_action400: that isn't a change K8 HQ can confirm (not a route's description, another session's, or an invalid list). 409: the saved list of changes is no longer valid at confirmation finish.
recovery_unavailable400: The recovery code is wrong or expired, or the recovery no longer meets the checks. Ask for a new code.
challenge_expired409: the pairing request or the binding's confirmation deadline passed; start pairing again with new keys.
invalid_proof422: a proof of possession or a signature didn't verify.
keys_bound409: these public keys are already bound; generate new keys.
revoked409: the binding was revoked or replaced.
no_key409: the person has no key yet: set one up first.
key_retired409: the new key was this person's before and was replaced; a replaced key never comes back. Make a new one.
key_exposed409: the new key was reported as possibly exposed. Make a new one.
recently_recovered403: the person recovered their account by email in the last 7 days; until says when the change becomes possible.
owner_only403: only an owner of the organization may do this.
last_holder409: the change would leave a zero-access inbox with nobody who can open it.
rotation_backlog503: K8 HQ is still updating an inbox's encryption after earlier changes; retry after Retry-After seconds.
in_progress409: the inbox's switch to zero-access isn't finished yet.
report_too_large409: the report would be too large for one change: report at most two people at once, or one at a time.
key_in_use409: the new key belongs to another account; every key has one owner. Make a new one.
client_outdated426: K8 HQ has been updated. Reload this page.
browser_mismatch409: the session signed in from this browser before its storage was reset (DELETE /v1/account/browser-sessions): the browser's other sessions can't be found from it. Nothing was signed out; sign this session out with DELETE /v1/account/session and use Sign out everywhere for the rest.
browser_unbound409: the session is from before browser secrets (DELETE /v1/account/browser-sessions). Nothing was signed out; sign this session out with DELETE /v1/account/session instead.
browser_changed409: the browser was signed out (DELETE /v1/account/browser-sessions) while this sign-in completed, so no session started. Start the sign-in again.
Find a schema by nameBrowse schemas