Invites — K8 HQ Sign-in API
Invites operations for K8 HQ Sign-in API. Requests, permissions and responses.
Version 1OpenAPI description (JSON)
Before making requests, read the authentication and request requirements.
Invite people to an organization, and preview or accept an invite you were sent.
Base URL
| Base URL | For |
https://api.k8hq.com/auth | The K8 HQ web app, and programs acting with a person's session |
Endpoints
Invites
Accept an invite
POST/v1/invites/accept
Joins the organization with the invite's role and access (or adds the access, for a member).
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 |
secret required | string | Pattern: ^k8hq_inv_. |
{"secret":"k8hq_inv_EXAMPLE"}
Response body (JSON)
| Field | Type | Description |
memberId required | string | The person's member ID there. |
orgId required | string | The organization (org_...). Pattern: ^org_. |
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. |
Responses
| Status | Body | Meaning |
| 200 | JSON | Joined. |
| 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 | Not allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's. |
| 409 | application/problem+json | Who can do what in the organization changed while this ran, so nothing was changed: reload and try again (conflict). |
| 410 | application/problem+json | The invitation link is invalid (invalid). Whoever made a contact book invitation may no longer be able to give the access it offers. |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Preview an invite
POST/v1/invites/preview
What accepting an invite link would give the signed-in person, before they accept. Only a valid invitation secret reveals the organization and inviter names. No other organization or inviter details are returned.
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 |
secret required | string | Pattern: ^k8hq_inv_. |
{"secret":"k8hq_inv_EXAMPLE"}
Response body (JSON)
| Field | Type | Description |
alreadyMember required | boolean | They're in the organization already; accepting adds the access. |
containers required | integer | How many containers it gives access to. |
expiresAt required | string | |
inviterName required | string | The inviter's chosen display name, or an empty string if none. |
orgId required | string | The organization (org_...). Pattern: ^org_. |
orgName required | string | The organization's display name, or an empty string if unavailable. |
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. |
Responses
| Status | Body | Meaning |
| 200 | JSON | What it offers. |
| 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. |
| 410 | application/problem+json | This invitation link didn't work. Check you copied all of it, or ask whoever sent it for a new one. (invalid; used, revoked, expired or its maker can no longer give what it offers.) |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
List invites
GET/v1/organizations/{orgId}/invites
The organization's invites, for members who may invite (members.invite).
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 |
invites required | Invite[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The invites. |
| 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. |
Invite someone
POST/v1/organizations/{orgId}/invites
Makes an invite link to join the organization with a role and access to some containers, no more than the caller has and may share. Share https://app.k8hq.com/#join=<secret>; the secret is in this answer only. It expires after 7 days. Someone without an account can sign up with it once the organization has proven a domain. 10 invites a day per person.
Needs a passkey confirmation of this change (x-k8hq-confirm: invite.create). Until confirmations are enforced, a passkey sign-in in the last five minutes also works. A Guest invite to a task board gives Can view and comment access. Existing members keep any higher organization role and existing board access.
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. |
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. |
containerIds | string[] | Containers to give access to. |
{"containerIds":["ibx_01J..."],"role":"member"}
Response body (JSON)
| Field | Type | Description |
invite required | Invite | |
secret required | string | Pattern: ^k8hq_inv_. |
Responses
| Status | Body | Meaning |
| 200 | JSON | The invite 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 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. |
| 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 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 | 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). |
| 429 | application/problem+json | Today's 10 invites are made (rate_limited). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Revoke an invite
DELETE/v1/organizations/{orgId}/invites/{id}
Ends a pending invite.
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. |
orgId (path) required | string | Organization ID. |
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 | 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. |
| 410 | application/problem+json | It isn't pending any more (invalid). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |