K8 HQ

Passkeys — K8 HQ Sign-in API

Passkeys 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.

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

Base URL

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

Endpoints

Passkeys

List passkeys

GET/v1/passkeys

The person's passkeys, oldest first.

For a person's own session (x-k8hq-token) only: assistants' delegated tokens and API tokens are refused.

Response body (JSON)

FieldTypeDescription
passkeys requiredPasskey[]

Responses

StatusBodyMeaning
200JSONThe passkeys.
401application/problem+jsonNo session, or it expired or was revoked (unauthenticated): refresh, or sign in again.
403application/problem+jsonNot allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's.
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
500application/problem+jsonA temporary problem (unavailable); retry.

Add a passkey

POST/v1/passkeys/begin

Starts registering another passkey for the signed-in person (ones they already have are excluded). Pass options to navigator.credentials.create() and send the result to Finish adding a passkey.

Needs a passkey confirmation of this change (x-k8hq-confirm: passkey.add). Until confirmations are enforced, a passkey sign-in in the last five minutes also works.

For a person's own session (x-k8hq-token) only: assistants' delegated tokens and API tokens are refused. The session needs a recent passkey: if its last passkey confirmation is more than 5 minutes old, the answer is 401 step_up_required.

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.
401application/problem+jsonNo session or it expired (unauthenticated), or confirm this change with your passkey (confirmation_required; until confirmations are enforced, step_up_required with action, which a passkey use in the last 5 minutes also satisfies): the answer carries the action to confirm and a short summary.
403application/problem+jsonNot allowed (forbidden); or the confirmation isn't this session's (confirmation_invalid), or an API token or assistant asked (needs_person).
409application/problem+jsonThe confirmation is for a different change, or what it changes is different now (confirmation_mismatch), was already used (confirmation_used) or timed out (confirmation_expired).
500application/problem+jsonA temporary problem (unavailable); retry.

Finish adding a passkey

POST/v1/passkeys/finish

Stores the new passkey; it can sign in at once. The person gets an account notice.

The registration challenge must come from a confirmed passkey addition. Until confirmations are enforced, a recent passkey sign-in also works.

For a person's own session (x-k8hq-token) only: assistants' delegated tokens and API tokens are refused. The session needs a recent passkey: if its last passkey confirmation is more than 5 minutes old, the answer is 401 step_up_required.

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).
{"challengeId":"chl_01J...","credential":{"id":"...","response":{},"type":"public-key"}}

Response body (JSON)

FieldTypeDescription
ok requiredtrue

Responses

StatusBodyMeaning
200OkAdded.
400application/problem+jsonMalformed, or the challenge is unknown, expired or used, or the passkey's answer couldn't be read (invalid).
401application/problem+jsonNo session or it expired (unauthenticated), or confirm this change with your passkey (confirmation_required; until confirmations are enforced, step_up_required with action, which a passkey use in the last 5 minutes also satisfies): the answer carries the action to confirm and a short summary.
403application/problem+jsonNot allowed (forbidden); or the confirmation isn't this session's (confirmation_invalid), or an API token or assistant asked (needs_person).
409application/problem+jsonThe confirmation is for a different change, or what it changes is different now (confirmation_mismatch), was already used (confirmation_used) or timed out (confirmation_expired).
500application/problem+jsonA temporary problem (unavailable); retry.

Remove a passkey

DELETE/v1/passkeys/{id}

Removes a passkey, and any copy of the person's key sealed with it. The last passkey can't be removed (the account would be unreachable). The person gets an account notice.

Needs a passkey confirmation of this change (x-k8hq-confirm: passkey.remove). Until confirmations are enforced, a passkey sign-in in the last five minutes also works.

For a person's own session (x-k8hq-token) only: assistants' delegated tokens and API tokens are refused. The session needs a recent passkey: if its last passkey confirmation is more than 5 minutes old, the answer is 401 step_up_required.

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.
id (path) requiredstringPasskey ID.

Response body (JSON)

FieldTypeDescription
ok requiredtrue

Responses

StatusBodyMeaning
200OkRemoved.
400application/problem+jsonThe request is malformed or a field is invalid (invalid).
401application/problem+jsonNo session or it expired (unauthenticated), or confirm this change with your passkey (confirmation_required; until confirmations are enforced, step_up_required with action, which a passkey use in the last 5 minutes also satisfies): the answer carries the action to confirm and a short summary.
403application/problem+jsonNot allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's.
404application/problem+jsonNo such passkey (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
409application/problem+jsonIt's the only passkey; add another first, or your account changed meanwhile (another passkey, session or name change won the race) and nothing was removed: reload and try again (conflict).
500application/problem+jsonA temporary problem (unavailable); retry.