K8 HQ

Members — K8 HQ Sign-in API

Members 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 an organization's members and change their roles, suspend, remove or leave.

Base URL

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

Endpoints

Members

Check a people change

GET/v1/members/check

Whether an invite, a role change or a removal would be allowed for the person asking, with the same checks as inviting, changing a role and removing a member, changing nothing and needing no passkey. K8 Admin asks it before proposing a change for the person to approve (design note 0010); the change is checked again when it's made. Today's invite limit is checked only then. Send the inputs as query parameters, with no request body. Unknown parameters and repeated single values are refused. The query string may be at most 8192 bytes. Repeat containerIds for each inbox.

For a person's own session (x-k8hq-token), or K8 Admin's delegated token in the organization it was made for.

Parameters

NameTypeDescription
orgId (query) requiredstring
action (query) requiredinvite | role | remove
memberId (query)string
role (query)guest | member | developer | admin | owner
containerIds (query)string[]

Response body (JSON)

FieldTypeDescription
pending requiredboolean
rolestring

Responses

StatusBodyMeaning
200JSONAllowed. pending: it would wait for an owner's approval (design note 0009, 3.2). role: the member's current role (role changes).
400application/problem+jsonUnknown action or role, or the request is malformed (invalid).
401application/problem+jsonNo session, or it expired or was revoked (unauthenticated): refresh, or sign in again.
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+jsonTheir role or permissions don't allow it (forbidden); or a delegated token for another organization, or a foreign origin.
404application/problem+jsonNot a member, or no such member (not_found).
409application/problem+jsonIt would leave a container nobody can open (conflict).
500application/problem+jsonA temporary problem (unavailable); retry.
503application/problem+jsonWhether K8 is available couldn't be checked (unavailable); retry.

Report an inbox's keys as possibly exposed

POST/v1/members/compromise

An owner reports that a zero-access inbox's keys may be exposed (design note 0032 B.2), naming 0 to 4 of its key holders whose encryption key may be. In one change: the people named are suspended for 24 hours, their keys are refused in every K8 HQ organization from now on, and every zero-access inbox of the organization they hold gets one request to update its encryption. It is refused when it would leave any of those inboxes with nobody who can open it. To get access again, a person named replaces their key and a holder gives the new key access. Send Idempotency-Key: <operationId>:compromise; the same report again answers replayed: true. Only an owner's own session.

Needs a passkey confirmation of this report (x-k8hq-confirm: member.compromise). Until confirmations are enforced, a passkey sign-in in the last five minutes also works. Off unless zero-access is turned on (404). Responses use Cache-Control: no-store.

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.
Idempotency-Key (header) requiredstring<operationId>:compromise.

Request body (JSON)

FieldTypeDescription
inboxId requiredstringPattern: ^ibx_.
operationId requiredstringA new operation ID for this report (akr_...). Pattern: ^akr_.
orgId requiredstringPattern: ^org_.
schemaVersion required1
suspectMemberIds requiredstring[]The holders whose key may be exposed; empty when only the inbox key is suspected.
{"inboxId":"ibx_01J...","operationId":"akr_01J...","orgId":"org_01J...","schemaVersion":1,"suspectMemberIds":["mem_01J..."]}

Response body (JSON)

FieldTypeDescription
exposedKeyCount requiredintegerHow many keys this report newly recorded as exposed.
operationId requiredstring
replayed requiredboolean
schemaVersion required1
suspended requiredstring[]The members named, all suspended now.

Responses

StatusBodyMeaning
200JSONReported (or the same report replayed).
400application/problem+jsonThe body or the Idempotency-Key isn't valid (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 an owner (owner_only); a suspension the report would make isn't allowed, or it names two owners (forbidden); an API token or assistant asked (needs_person); or the confirmation isn't this session's (confirmation_invalid).
404application/problem+jsonOff, or the caller isn't a current member with access to the inbox (not_found).
409application/problem+jsonThe inbox isn't zero-access (zero_access) or its switch isn't finished (in_progress); the operation was used for another report, someone named can't be, or something changed meanwhile (conflict); an inbox would be left with nobody who can open it (last_holder); the report is too large (report_too_large); or the confirmation doesn't match (confirmation_*).
426application/problem+jsonK8 HQ has been updated. Reload this page.
500application/problem+jsonA temporary problem (unavailable); retry.
503application/problem+jsonAn affected inbox still has 32 encryption updates waiting (rotation_backlog, with Retry-After), or reports aren't available yet: K8 HQ hasn't finished recording who owns each key (unavailable).

List members

GET/v1/organizations/{orgId}/members

The organization's members and their roles, by name, for anyone in it who can see it (org.view).

For a person's own session (x-k8hq-token), or K8 Admin's delegated token in the organization it was made for.

Parameters

NameTypeDescription
orgId (path) requiredstringOrganization ID.

Response body (JSON)

FieldTypeDescription
members requiredMember[]

Responses

StatusBodyMeaning
200JSONThe members.
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.
404application/problem+jsonNot a member, or suspended (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
500application/problem+jsonA temporary problem (unavailable); retry.
503application/problem+jsonWhether K8 is available couldn't be checked (unavailable); retry.

See which members can recover their accounts

GET/v1/organizations/{orgId}/members/recovery

Owners only (members.recovery.view), using their own session. Lists only this organization's members, with their member ID, display name and whether they have a way to recover their account. A member is recoverable with two or more passkeys. No passkey names, devices, counts or key material are returned. Suspended owners are refused.

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

Parameters

NameTypeDescription
orgId (path) requiredstringOrganization ID.

Response body (JSON)

FieldTypeDescription
members requiredobject[]

Responses

StatusBodyMeaning
200JSONThe members and whether they can recover their accounts.
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+jsonThe caller lacks the recovery permission or is suspended, or is using an assistant’s token (forbidden).
404application/problem+jsonNot a member of this organization, or the organization is closed (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
500application/problem+jsonA temporary problem (unavailable); retry.

Change a member's role

PATCH/v1/organizations/{orgId}/members/{memberId}

Changes a member's role. A non-owner giving or taking people-power doesn't apply it but asks the owners (202). Owners can't be demoted yet; they leave instead.

Needs a passkey confirmation of this change (x-k8hq-confirm: member.role). 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.
orgId (path) requiredstringOrganization ID.
memberId (path) requiredstringMember ID.

Request body (JSON)

FieldTypeDescription
role requiredguest | member | developer | admin | ownerThe member's organization role: guest, member, developer, admin or owner. Guest has no organization permissions and cannot list members, domains or roles.
{"role":"admin"}

Response body (JSON)

FieldTypeDescription
ok requiredtrue

Responses

StatusBodyMeaning
200OkChanged.
202JSONOwners must approve it: a pending change (see Pending changes).
400application/problem+jsonThe role isn't member, developer, admin or owner, or the request is malformed (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+jsonTheir role or permissions don't allow it (forbidden); or a delegated token or foreign origin.
404application/problem+jsonThey aren't a member of the organization (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
409application/problem+jsonRefused by the organization's state, such as the last holder of a container, or who can do what in the organization changed while this ran: reload and try again (conflict).
500application/problem+jsonA temporary problem (unavailable); retry.

Remove a member

DELETE/v1/organizations/{orgId}/members/{memberId}

Removes a member: their access ends and their tokens in the organization are revoked; they get an account notice. A non-owner removing someone with people-power asks the owners (202). Removing owners is refused. Refused when it would leave a container nobody can open; a board handed to an owner doesn't count.

Boards left without a full member: preview with a bodyless DELETE and x-k8hq-confirm: ?. The 401 confirmation_required answer includes action, summary and boards, an array of {boardId, zeroAccess} (zeroAccess only when true) for the boards that would lose their last full member, sorted by board ID; view-and-comment, guest, expired and item-only access don't count as full access. Board names aren't included: show the names you know, else the ID. ownerMemberId is the owner who gets full access to the boards that aren't zero-access: the owner removing them, else the earliest-joined owner who isn't suspended (any owner if all are; member ID breaks ties). A removal the owners must approve has no ownerMemberId but approverReceives: true: the owner who approves it gets them. Zero-access boards are never handed over and no owner's key copy changes: an owner joins them later through key sharing. The probe makes no changes. Confirm the returned action through the Sign-in API and retry with the resulting x-k8hq-confirm token. The action binds a hash of the board list, how many boards are handed over and how many are zero-access, and the recipient; a changed list needs a fresh confirmation (409 confirmation_mismatch).

Each handoff writes an access.board.granted audit event (reason member_removed, departingMemberId) in the same transaction as that board's revocation. Apps and agents can't confirm a board list: their removal is refused (403 needs_person).

Needs a passkey confirmation of this change (x-k8hq-confirm: member.remove), always when boards are listed. Otherwise, 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.
orgId (path) requiredstringOrganization ID.
memberId (path) requiredstringMember ID.

Response body (JSON)

FieldTypeDescription
ok requiredtrue

Responses

StatusBodyMeaning
200OkRemoved.
202JSONOwners must approve it: a pending change (see Pending changes).
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+jsonTheir role or permissions don't allow it (forbidden); or a delegated token or foreign origin.
404application/problem+jsonThey aren't a member of the organization (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
409application/problem+jsonIt would leave a container nobody can open (a board handed to an owner doesn't count), or who can do what in the organization changed while this ran: reload and try again (conflict).
500application/problem+jsonA temporary problem (unavailable); retry.

Suspend a member

PUT/v1/organizations/{orgId}/members/{memberId}/suspension

Suspends a member for 24 hours: no access to the organization until it ends or is lifted (members.suspend, and only members whose permissions are within the caller's).

Needs a passkey confirmation of this change (x-k8hq-confirm: member.suspend). 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.
orgId (path) requiredstring
memberId (path) requiredstring

Response body (JSON)

FieldTypeDescription
suspension requiredSuspension

Responses

StatusBodyMeaning
200JSONThe suspension.
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+jsonTheir role or permissions don't allow it (forbidden); or a delegated token or foreign origin.
404application/problem+jsonThey aren't a member of the organization (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
409application/problem+jsonThey're already suspended (conflict). The 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.

Lift a suspension

DELETE/v1/organizations/{orgId}/members/{memberId}/suspension

Lifts a suspension early: owners, or whoever suspended them.

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.
orgId (path) requiredstring
memberId (path) requiredstring

Response body (JSON)

FieldTypeDescription
ok requiredtrue

Responses

StatusBodyMeaning
200OkLifted.
400application/problem+jsonThe request is malformed or a field is invalid (invalid).
401application/problem+jsonNo session or it expired (unauthenticated), or its passkey confirmation is more than 5 minutes old (step_up_required).
403application/problem+jsonTheir role or permissions don't allow it (forbidden); or a delegated token or foreign origin.
404application/problem+jsonThey aren't a member of the organization (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
409application/problem+jsonThey aren't suspended (conflict).
500application/problem+jsonA temporary problem (unavailable); retry.

Leave an organization

DELETE/v1/organizations/{orgId}/membership

The person leaves the organization; their tokens there are revoked. The last owner can't leave. Boards they would leave without a full member are listed as for removing a member: the 401 confirmation_required answer includes boards and ownerMemberId (the earliest-joined owner who isn't suspended), the confirmation is always needed then, and confirming gives that owner full access to the boards that aren't zero-access (access.board.granted, reason member_left). A changed list needs a fresh confirmation (409 confirmation_mismatch).

Needs a passkey confirmation of this change (x-k8hq-confirm: member.leave). 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.
orgId (path) requiredstring

Response body (JSON)

FieldTypeDescription
ok requiredtrue

Responses

StatusBodyMeaning
200OkLeft.
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+jsonTheir role or permissions don't allow it (forbidden); or a delegated token or foreign origin.
404application/problem+jsonThey aren't a member of the organization (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
409application/problem+jsonThey're the last owner, or the last who can open a container (a board handed to an owner doesn't count), or who can do what in the organization changed while this ran: reload and try again (conflict).
500application/problem+jsonA temporary problem (unavailable); retry.