Notices — K8 HQ Sign-in API
Notices operations for K8 HQ Sign-in API. Requests, permissions and responses.
Version 1OpenAPI description (JSON)
Before making requests, read the authentication and request requirements.
The person's account notices: list them, mark them read, follow their links and delete them.
Base URL
| Base URL | For |
https://api.k8hq.com/auth | The K8 HQ web app, and programs acting with a person's session |
Endpoints
Notices
Mark notices read
PATCH/v1/account/notices
Archives the named notices (up to 100), or all of them (all) a bounded step at a time: while more is true, call again with nextCursor.
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 |
all | boolean | |
cursor | string | With all: nextCursor from the previous step. |
notices | NoticeRef[] | Up to 100. |
{"notices":[{"id":"evt_01J...","seq":"00000000000000000042"}]}
Response body (JSON)
| Field | Type | Description |
more required | boolean | There's more to do: call again with nextCursor. |
ok required | true | |
nextCursor | string | |
Responses
| Status | Body | Meaning |
| 200 | JSON | Archived. |
| 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 | A named notice isn't one of theirs (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Delete notices
DELETE/v1/account/notices
Removes archived notices from Notices for good: the named ones, or every archived one (archivedAll, a bounded step at a time like archiving). The events stay in the account's audit record until the account is deleted. Needs a recent passkey, so a stolen session can't hide the notice about what it did.
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 |
archivedAll | boolean | |
cursor | string | With archivedAll: nextCursor from the previous step. |
notices | NoticeRef[] | Up to 100, all archived. |
{"archivedAll":true}
Response body (JSON)
| Field | Type | Description |
more required | boolean | There's more to do: call again with nextCursor. |
ok required | true | |
nextCursor | string | |
Responses
| Status | Body | Meaning |
| 200 | JSON | Deleted. |
| 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 | Not allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's. |
| 404 | application/problem+json | A named notice isn't one of theirs (not_found). |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 409 | application/problem+json | A named notice isn't archived; open it first (conflict). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
List account notices
POST/v1/notices
The person's account notices (design note 0012), newest first: passkeys added or removed, sign-ins from new networks, tokens used from new networks, invitations used, removal from an organization. Only the person sees them; there are no parameters naming anyone. unread counts the unarchived ones on this page.
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 |
cursor | string | nextCursor from the previous page. Pattern: ^[0-9]{20}$. |
limit | integer | Up to 100; 50 by default. |
{"limit":50}
Response body (JSON)
| Field | Type | Description |
notices required | Notice[] | |
unread required | integer | |
nextCursor | string | Present while there are more. |
Responses
| Status | Body | Meaning |
| 200 | JSON | A page of notices. |
| 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. |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Open a notice link
POST/v1/notices/link
Resolves a link from a copy of a notice (https://app.k8hq.com/n/<link>). It opens only for the signed-in person it was made for: anyone else, and any link that was changed or made up, gets not_for_you. Links never act and never sign in.
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 |
link required | string | The part after /n/. |
{"link":"42-..."}
Response body (JSON)
| Field | Type | Description |
kind required | account | org | |
inboxId | string | |
messageId | string | |
notice | Notice | |
orgId | string | |
Responses
| Status | Body | Meaning |
| 200 | LinkTarget | What it names. |
| 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 notice for this account (not_for_you). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |