Sign-up invitations — K8 HQ Sign-in API
Sign-up invitations operations for K8 HQ Sign-in API. Requests, permissions and responses.
Before making requests, read the authentication and request requirements.
Make and revoke invitations that let someone new create a K8 HQ account.
Base URL
| Base URL | For |
|---|---|
https://api.k8hq.com/auth | The K8 HQ web app, and programs acting with a person's session |
Endpoints
Sign-up invitations
List my sign-up invitations
The sign-up invitations the person made, newest first, with how many they may have and how many are left. Each is a single-use link that expires after 14 days; unused ones that are revoked or expire stop counting.
For a person's own session (x-k8hq-token) only: assistants' delegated tokens and API tokens are refused.
Response body (JSON)
| Field | Type | Description |
|---|---|---|
invites required | SignupInvite[] | |
left required | integer | How many more they may make now. |
limit required | integer | How many pending or accepted invitations they may have (3 unless K8 HQ raised it). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | JSON | Their invitations. |
| 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. |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Make a sign-up invitation
Makes a sign-up invitation. Share the link https://app.k8hq.com/#invite=<secret>; the secret is in this answer only. The person is told when it's used.
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. |
{}
Response body (JSON)
| Field | Type | Description |
|---|---|---|
invite required | SignupInvite | |
secret required | string | Pattern: ^k8hq_sinv_. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | JSON | The invitation and, this once, its secret. |
| 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. |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 409 | application/problem+json | None left (no_invites_left), or another is being made at the same moment (conflict). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Revoke a sign-up invitation
Ends an unused invitation; it no longer counts against the limit.
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. |
id (path) required | string | Resource ID. |
Response body (JSON)
| Field | Type | Description |
|---|---|---|
ok required | true |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Ok | Revoked. |
| 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. |
| 405 | application/problem+json | Method not allowed. The Allow header lists supported methods. |
| 409 | application/problem+json | It was already used or revoked (conflict). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |