K8 HQ

Account — K8 HQ Sign-in API

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

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

Base URL

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

Endpoints

Account

Get the account

GET/v1/account

The person's user ID and display name: the name every organization they're in shows for them (in List members). Not available to an assistant's delegated token. Includes any waiting recovery and when the limits after account recovery end.

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

Response body (JSON)

FieldTypeDescription
name requiredstringTheir display name; empty if they chose none.
userId requiredstringThe person (usr_).
recoveredUntilintegerUnix time when the seven-day limits end, or zero when they do not apply. Expired records do not extend the limits.
recoveryanyThe waiting recovery from the account recovery lock, or null. Use this for the banner on every page and the notice shown after passkey sign-in. The address is masked; no cancel token or pending credential is returned.

Responses

StatusBodyMeaning
200JSONThe account.
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.

Change the display name

PATCH/v1/account

Changes the person's display name, the same in every organization they're in, or clears it with "". Spaces are collapsed; up to 100 characters, without control characters. Only the person can change it, never an assistant's delegated token. A change records user.name.changed in their own scope.

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

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
name requiredstringThe new name, or "" to clear it.
{"name":"Dee Porter"}

Response body (JSON)

FieldTypeDescription
name requiredstringThe name as stored; empty if cleared.

Responses

StatusBodyMeaning
200JSONChanged (or unchanged): the name as stored.
400application/problem+jsonThe request is malformed or a field is invalid (invalid).
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.
409application/problem+jsonYour account changed meanwhile (another passkey, session or name change won the race), so nothing was changed (conflict); reload and try again.
500application/problem+jsonA temporary problem (unavailable); retry.