K8 HQ

Sign-up and sign-in — K8 HQ Sign-in API

Sign-up and sign-in operations for K8 HQ Sign-in API. Requests, permissions and responses.

Version 1OpenAPI description (JSON)

Browse operation groups

Before making requests, read the authentication and request requirements.

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

Base URL

Base URLFor
https://api.k8hq.com/authThe K8 HQ web app, and programs acting with a person's session

Endpoints

Sign-up and sign-in

Start signing in

POST/v1/login/begin

Starts a passkey sign-in. No username: the person picks one of their K8 HQ passkeys in the browser's prompt. Pass options to navigator.credentials.get(); send the result to Finish signing in.

No sign-in needed.

Parameters

NameTypeDescription
x-amz-content-sha256 (header) requiredstringThe body's SHA-256, lowercase hex. CloudFront signs requests to this service and refuses a POST without it (403, not a problem detail). For {}: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a.
{}

Response body (JSON)

FieldTypeDescription
challengeId requiredstringSend it back with the passkey's answer. Valid 5 minutes, once. Pattern: ^chl_.
options requiredobjectOptions for navigator.credentials.create() or .get(). The relying party is k8hq.com; user verification is required, and new passkeys are discoverable (signing in needs no username).

Responses

StatusBodyMeaning
200ChallengeThe ceremony's options. Pass options to the browser, then send its answer to the matching finish call within 5 minutes.
403application/problem+jsonNot allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's.
500application/problem+jsonA temporary problem (unavailable); retry.

Finish signing in

POST/v1/login/finish

Checks the passkey's answer and starts a session. A sign-in from a network the account hasn't used in 90 days writes an account notice (see Notices). Each failure counts against the caller's address: 20 in 15 minutes and it gets 429 until the window passes. policiesNeeded lists the Terms of Service or Privacy Policy versions that took effect since the person last accepted one: the web app asks them to accept before going on (Accept policy versions). Access tokens, IMAP and SMTP never ask.

No sign-in needed.

Parameters

NameTypeDescription
x-amz-content-sha256 (header) requiredstringThe body's SHA-256, lowercase hex. CloudFront signs requests to this service and refuses a POST without it (403, not a problem detail). For {}: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a.

Request body (JSON)

FieldTypeDescription
challengeId requiredstring
credential requiredobjectThe passkey's answer: the PublicKeyCredential from the browser as JSON (id, rawId, type, response with binary fields as base64url; PublicKeyCredential.toJSON() gives this shape).
devicestringA short name for the device, shown in the person's sessions and notices (Mac, iPhone, ...).
partitionSecretstringThis browser's secret for signing out: 32 random bytes in base64url (no padding), made once per browser storage partition and kept there. K8 HQ keeps only a hash of it, so knowing a browser's ID never lets another sign-in join that browser. Sent with every sign-in from the web app, so Forget this browser can end them all (DELETE /v1/account/browser-sessions); the session keeps it through refreshes. Leave it out from anything but the web app. A value that isn't one is refused (invalid) before the passkey answer is used. Pattern: ^[A-Za-z0-9_-]{43}$.
{"challengeId":"chl_01J...","credential":{"id":"...","rawId":"...","response":{"authenticatorData":"...","clientDataJSON":"...","signature":"...","userHandle":"..."},"type":"public-key"},"device":"iPhone"}

Response body (JSON)

FieldTypeDescription
tokens requiredTokens
userId requiredstringThe account (usr_...). Pattern: ^usr_.
policiesFirstbooleanThe person has accepted no version yet: ask them to review and accept, rather than saying the policies were updated.
policiesNeededPolicyVersion[]Versions to accept before using the web app; empty when none.
recoveryobject | null
releaseTicketstringFor people with K8 HQ's copy of their key: a release ticket for Unlock with K8 HQ's copy, single use, valid 5 minutes, for this session only.

Responses

StatusBodyMeaning
200JSONSigned in: the account and its new session.
400application/problem+jsonMalformed, or the challenge is unknown, expired or used, or the passkey's answer couldn't be read (invalid).
401application/problem+jsonThe passkey isn't recognized, or looks cloned and is refused (unauthenticated).
403application/problem+jsonNot allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's.
409application/problem+jsonThis browser was signed out while this sign-in completed (browser_changed), so no session started; sign in again.
429application/problem+jsonToo many failed passkey ceremonies from this address (rate_limited); wait 15 minutes.
500application/problem+jsonA temporary problem (unavailable); retry.

Start signing up

POST/v1/signup/begin

Starts creating an account from a passkey alone: no email address or password, just an optional display name. Signing up needs an invitation: a sign-up invitation's secret (k8hq_sinv_..., from a link https://app.k8hq.com/#invite=...) or an organization invite's (k8hq_inv_..., from #join=...), checked here, before any passkey is made. The invitation is used up only when the account is created.

Pass options to navigator.credentials.create(); send the result to Finish signing up.

Signing up also needs the current Terms of Service and Privacy Policy: send the versions the person agreed to in accepted. They're recorded with the account when it's created, with the time, IP address and browser.

No sign-in needed.

Parameters

NameTypeDescription
x-amz-content-sha256 (header) requiredstringThe body's SHA-256, lowercase hex. CloudFront signs requests to this service and refuses a POST without it (403, not a problem detail). For {}: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a.

Request body (JSON)

FieldTypeDescription
accepted requiredAccepted
invite requiredstringThe invitation's secret.
attributionAttribution
displayNamestringThe person's name as others in their organizations see it; optional, up to 100 characters.
{"accepted":{"privacy":"2026-10-16","terms":"2026-10-16"},"attribution":{"landing":"/","referrer":"news.example.com","utm_campaign":"launch","utm_source":"newsletter"},"displayName":"Dee Porter","invite":"k8hq_sinv_EXAMPLE"}

Response body (JSON)

FieldTypeDescription
challengeId requiredstringSend it back with the passkey's answer. Valid 5 minutes, once. Pattern: ^chl_.
options requiredobjectOptions for navigator.credentials.create() or .get(). The relying party is k8hq.com; user verification is required, and new passkeys are discoverable (signing in needs no username).

Responses

StatusBodyMeaning
200ChallengeThe ceremony's options. Pass options to the browser, then send its answer to the matching finish call within 5 minutes.
400application/problem+jsonThe display name is over 100 characters (invalid), or accepted doesn't name every current version (policy_acceptance_required).
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nobody can be invited to it or join it until an owner adds credit.
403application/problem+jsonNo invitation (invite_required), or an organization invite from an organization without a proven domain (org_invite_no_domain).
409application/problem+jsonA version in accepted isn't the current one, or isn't published (policy_outdated): fetch the current versions and ask again.
410application/problem+jsonThe invitation was used, revoked or has expired (invite_used).
429application/problem+jsonThe organization has signed up as many new people as it may today (org_signup_limit).
500application/problem+jsonA temporary problem (unavailable); retry.

Finish signing up

POST/v1/signup/finish

Checks the new passkey, creates the account, uses up the invitation and starts a session. The account's only credential is this passkey: add another soon (Add a passkey), and keep a recovery kit for zero-access inboxes. The policy versions accepted when it began are recorded now, with this request's IP address and user agent; a version that stopped being current since then is refused.

No sign-in needed.

Parameters

NameTypeDescription
x-amz-content-sha256 (header) requiredstringThe body's SHA-256, lowercase hex. CloudFront signs requests to this service and refuses a POST without it (403, not a problem detail). For {}: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a.

Request body (JSON)

FieldTypeDescription
challengeId requiredstring
credential requiredobjectThe passkey's answer: the PublicKeyCredential from the browser as JSON (id, rawId, type, response with binary fields as base64url; PublicKeyCredential.toJSON() gives this shape).
devicestringA short name for the device, shown in the person's sessions and notices (Mac, iPhone, ...).
partitionSecretstringThis browser's secret for signing out: 32 random bytes in base64url (no padding), made once per browser storage partition and kept there. K8 HQ keeps only a hash of it, so knowing a browser's ID never lets another sign-in join that browser. Sent with every sign-in from the web app, so Forget this browser can end them all (DELETE /v1/account/browser-sessions); the session keeps it through refreshes. Leave it out from anything but the web app. A value that isn't one is refused (invalid) before the passkey answer is used. Pattern: ^[A-Za-z0-9_-]{43}$.
{"challengeId":"chl_01J...","credential":{"id":"...","rawId":"...","response":{"attestationObject":"...","clientDataJSON":"..."},"type":"public-key"},"device":"Mac"}

Response body (JSON)

FieldTypeDescription
tokens requiredTokens
userId requiredstringThe account (usr_...). Pattern: ^usr_.

Responses

StatusBodyMeaning
200JSONSigned in: the account and its new session.
400application/problem+jsonMalformed, or the challenge is unknown, expired or used, or the passkey's answer couldn't be read (invalid).
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nobody can be invited to it or join it until an owner adds credit.
403application/problem+jsonThe invitation is no longer enough (invite_required, org_invite_no_domain).
409application/problem+jsonA policy version accepted at the start isn't current any more (policy_outdated): start again. Or: This browser was signed out while this sign-in completed (browser_changed), so no session started; sign in again.
410application/problem+jsonThe invitation was used meanwhile (invite_used).
429application/problem+jsonToo many failed ceremonies from this address (rate_limited), or the organization's sign-ups for today are used (org_signup_limit).
500application/problem+jsonA temporary problem (unavailable); retry.