Pending changes — K8 HQ Sign-in API
Pending changes operations for K8 HQ Sign-in API. Requests, permissions and responses.
Version 1OpenAPI description (JSON)
Before making requests, read the authentication and request requirements.
Changes to people that wait for an owner: list them, approve, decline or cancel.
Base URL
| Base URL | For |
https://api.k8hq.com/auth | The K8 HQ web app, and programs acting with a person's session |
Endpoints
Pending changes
Approve a change
POST/v1/changes/approve
An owner approves a pending change, which is applied now (or fails, and is marked so, if the organization changed meanwhile). Approving a removal that would leave boards without a full member gives the approving owner full access to them: the 401 confirmation_required answer lists boards and ownerMemberId (the approver) as removing a member does, and the confirmation is always needed then. Zero-access boards are listed but not handed over. A changed list needs a fresh confirmation (409 confirmation_mismatch); the change stays pending.
Needs a passkey confirmation of this change (x-k8hq-confirm: change.approve). 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. |
Request body (JSON)
| Field | Type | Description |
id required | string | |
orgId required | string | The organization (org_...). Pattern: ^org_. |
{"id":"chg_01J...","orgId":"org_01J..."}
Response body (JSON)
| Field | Type | Description |
ok required | true | |
Responses
| Status | Body | Meaning |
| 200 | Ok | Applied. |
| 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; or the confirmation isn't this session's (confirmation_invalid), or an API token or assistant asked (needs_person). |
| 404 | application/problem+json | They aren't a member of the organization (not_found). |
| 409 | application/problem+json | It isn't pending any more, or can't be applied now, 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. |
Decline or cancel a change
POST/v1/changes/decline
Owners decline a pending change; whoever asked for it may cancel it.
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. |
Request body (JSON)
| Field | Type | Description |
id required | string | |
orgId required | string | The organization (org_...). Pattern: ^org_. |
{"id":"chg_01J...","orgId":"org_01J..."}
Response body (JSON)
| Field | Type | Description |
ok required | true | |
Responses
| Status | Body | Meaning |
| 200 | Ok | Declined. |
| 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 | 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). |
| 409 | application/problem+json | It isn't pending any more, 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. |
List pending changes
GET/v1/organizations/{orgId}/changes
Changes to people waiting for an owner: all of them for owners, the caller's own requests for others.
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 |
changes required | Change[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The changes. |
| 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 | 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. |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
| 503 | application/problem+json | Whether K8 is available couldn't be checked (unavailable); retry. |