Members — K8 HQ Sign-in API
Members operations for K8 HQ Sign-in API. Requests, permissions and responses.
Version 1OpenAPI description (JSON)
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 URL | For |
https://api.k8hq.com/auth | The 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
| Name | Type | Description |
orgId (query) required | string | |
action (query) required | invite | role | remove | |
memberId (query) | string | |
role (query) | guest | member | developer | admin | owner | |
containerIds (query) | string[] | |
Response body (JSON)
| Field | Type | Description |
pending required | boolean | |
role | string | |
Responses
| Status | Body | Meaning |
| 200 | JSON | Allowed. pending: it would wait for an owner's approval (design note 0009, 3.2). role: the member's current role (role changes). |
| 400 | application/problem+json | Unknown action or role, or the request is malformed (invalid). |
| 401 | application/problem+json | No session, or it expired or was revoked (unauthenticated): refresh, or sign in again. |
| 402 | application/problem+json | The 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. |
| 403 | application/problem+json | Their role or permissions don't allow it (forbidden); or a delegated token for another organization, or a foreign origin. |
| 404 | application/problem+json | Not a member, or no such member (not_found). |
| 409 | application/problem+json | It would leave a container nobody can open (conflict). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
| 503 | application/problem+json | Whether 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
| Name | Type | Description |
x-amz-content-sha256 (header) required | string | The 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) required | string | <operationId>:compromise. |
Request body (JSON)
| Field | Type | Description |
inboxId required | string | Pattern: ^ibx_. |
operationId required | string | A new operation ID for this report (akr_...). Pattern: ^akr_. |
orgId required | string | Pattern: ^org_. |
schemaVersion required | 1 | |
suspectMemberIds required | string[] | 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)
| Field | Type | Description |
exposedKeyCount required | integer | How many keys this report newly recorded as exposed. |
operationId required | string | |
replayed required | boolean | |
schemaVersion required | 1 | |
suspended required | string[] | The members named, all suspended now. |
Responses
| Status | Body | Meaning |
| 200 | JSON | Reported (or the same report replayed). |
| 400 | application/problem+json | The body or the Idempotency-Key isn't valid (invalid). |
| 401 | application/problem+json | No 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. |
| 403 | application/problem+json | Not 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). |
| 404 | application/problem+json | Off, or the caller isn't a current member with access to the inbox (not_found). |
| 409 | application/problem+json | The 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_*). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
| 503 | application/problem+json | An 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
| Name | Type | Description |
orgId (path) required | string | Organization ID. |
Response body (JSON)
| Field | Type | Description |
members required | Member[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The members. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No session, or it expired or was revoked (unauthenticated): refresh, or sign in again. |
| 403 | application/problem+json | Not allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's. |
| 404 | application/problem+json | Not a member, or suspended (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
| 503 | application/problem+json | Whether 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
| Name | Type | Description |
orgId (path) required | string | Organization ID. |
Response body (JSON)
| Field | Type | Description |
members required | object[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The members and whether they can recover their accounts. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No session, or it expired or was revoked (unauthenticated): refresh, or sign in again. |
| 403 | application/problem+json | The caller lacks the recovery permission or is suspended, or is using an assistant’s token (forbidden). |
| 404 | application/problem+json | Not a member of this organization, or the organization is closed (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 500 | application/problem+json | A 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
| Name | Type | Description |
x-amz-content-sha256 (header) required | string | The 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) required | string | Organization ID. |
memberId (path) required | string | Member ID. |
Request body (JSON)
| Field | Type | Description |
role required | guest | member | developer | admin | owner | The 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)
| Field | Type | Description |
ok required | true | |
Responses
| Status | Body | Meaning |
| 200 | Ok | Changed. |
| 202 | JSON | Owners must approve it: a pending change (see Pending changes). |
| 400 | application/problem+json | The role isn't member, developer, admin or owner, or the request is malformed (invalid). |
| 401 | application/problem+json | No 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. |
| 403 | application/problem+json | Their role or permissions don't allow it (forbidden); or a delegated token or foreign origin. |
| 404 | application/problem+json | They aren't a member of the organization (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 409 | application/problem+json | Refused 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). |
| 500 | application/problem+json | A 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
| Name | Type | Description |
x-amz-content-sha256 (header) required | string | The 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) required | string | Organization ID. |
memberId (path) required | string | Member ID. |
Response body (JSON)
| Field | Type | Description |
ok required | true | |
Responses
| Status | Body | Meaning |
| 200 | Ok | Removed. |
| 202 | JSON | Owners must approve it: a pending change (see Pending changes). |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No 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. |
| 403 | application/problem+json | Their role or permissions don't allow it (forbidden); or a delegated token or foreign origin. |
| 404 | application/problem+json | They aren't a member of the organization (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 409 | application/problem+json | It 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). |
| 500 | application/problem+json | A 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
| Name | Type | Description |
x-amz-content-sha256 (header) required | string | The 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) required | string | |
memberId (path) required | string | |
Response body (JSON)
| Field | Type | Description |
suspension required | Suspension | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The suspension. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No 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. |
| 403 | application/problem+json | Their role or permissions don't allow it (forbidden); or a delegated token or foreign origin. |
| 404 | application/problem+json | They aren't a member of the organization (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 409 | application/problem+json | They'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). |
| 500 | application/problem+json | A 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
| Name | Type | Description |
x-amz-content-sha256 (header) required | string | The 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) required | string | |
memberId (path) required | string | |
Response body (JSON)
| Field | Type | Description |
ok required | true | |
Responses
| Status | Body | Meaning |
| 200 | Ok | Lifted. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No session or it expired (unauthenticated), or its passkey confirmation is more than 5 minutes old (step_up_required). |
| 403 | application/problem+json | Their role or permissions don't allow it (forbidden); or a delegated token or foreign origin. |
| 404 | application/problem+json | They aren't a member of the organization (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 409 | application/problem+json | They aren't suspended (conflict). |
| 500 | application/problem+json | A 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
| Name | Type | Description |
x-amz-content-sha256 (header) required | string | The 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) required | string | |
Response body (JSON)
| Field | Type | Description |
ok required | true | |
Responses
| Status | Body | Meaning |
| 200 | Ok | Left. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No 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. |
| 403 | application/problem+json | Their role or permissions don't allow it (forbidden); or a delegated token or foreign origin. |
| 404 | application/problem+json | They aren't a member of the organization (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 409 | application/problem+json | They'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). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |