K8 HQ

Invites — K8 HQ Sign-in API

Invites operations for K8 HQ Sign-in API. Requests, permissions and responses.

Version 1OpenAPI description (JSON)

Browse operation groups

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 URLFor
https://api.k8hq.com/authThe 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

NameTypeDescription
x-amz-content-sha256 (header) requiredstringThe 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)

FieldTypeDescription
secret requiredstringPattern: ^k8hq_inv_.
{"secret":"k8hq_inv_EXAMPLE"}

Response body (JSON)

FieldTypeDescription
memberId requiredstringThe person's member ID there.
orgId requiredstringThe organization (org_...). Pattern: ^org_.
role requiredguest | member | developer | admin | ownerThe member's organization role: guest, member, developer, admin or owner. Guest has no organization permissions and cannot list members, domains or roles.

Responses

StatusBodyMeaning
200JSONJoined.
401application/problem+jsonNo session, or it expired or was revoked (unauthenticated): refresh, or sign in again.
402application/problem+jsonThe 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.
403application/problem+jsonNot allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's.
409application/problem+jsonWho can do what in the organization changed while this ran, so nothing was changed: reload and try again (conflict).
410application/problem+jsonThe invitation link is invalid (invalid). Whoever made a contact book invitation may no longer be able to give the access it offers.
500application/problem+jsonA 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

NameTypeDescription
x-amz-content-sha256 (header) requiredstringThe 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)

FieldTypeDescription
secret requiredstringPattern: ^k8hq_inv_.
{"secret":"k8hq_inv_EXAMPLE"}

Response body (JSON)

FieldTypeDescription
alreadyMember requiredbooleanThey're in the organization already; accepting adds the access.
containers requiredintegerHow many containers it gives access to.
expiresAt requiredstring
inviterName requiredstringThe inviter's chosen display name, or an empty string if none.
orgId requiredstringThe organization (org_...). Pattern: ^org_.
orgName requiredstringThe organization's display name, or an empty string if unavailable.
role requiredguest | member | developer | admin | ownerThe member's organization role: guest, member, developer, admin or owner. Guest has no organization permissions and cannot list members, domains or roles.

Responses

StatusBodyMeaning
200JSONWhat it offers.
401application/problem+jsonNo session, or it expired or was revoked (unauthenticated): refresh, or sign in again.
403application/problem+jsonNot allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's.
410application/problem+jsonThis 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.)
500application/problem+jsonA 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

NameTypeDescription
orgId (path) requiredstringOrganization ID.

Response body (JSON)

FieldTypeDescription
invites requiredInvite[]

Responses

StatusBodyMeaning
200JSONThe invites.
400application/problem+jsonThe request is malformed or a field is invalid (invalid).
401application/problem+jsonNo session, or it expired or was revoked (unauthenticated): refresh, or sign in again.
403application/problem+jsonTheir role or permissions don't allow it (forbidden); or a delegated token or foreign origin.
404application/problem+jsonThey aren't a member of the organization (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
500application/problem+jsonA temporary problem (unavailable); retry.
503application/problem+jsonWhether 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

NameTypeDescription
x-amz-content-sha256 (header) requiredstringThe 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) requiredstringOrganization ID.

Request body (JSON)

FieldTypeDescription
role requiredguest | member | developer | admin | ownerThe member's organization role: guest, member, developer, admin or owner. Guest has no organization permissions and cannot list members, domains or roles.
containerIdsstring[]Containers to give access to.
{"containerIds":["ibx_01J..."],"role":"member"}

Response body (JSON)

FieldTypeDescription
invite requiredInvite
secret requiredstringPattern: ^k8hq_inv_.

Responses

StatusBodyMeaning
200JSONThe invite and, this once, its secret.
400application/problem+jsonThe request is malformed or a field is invalid (invalid).
401application/problem+jsonNo 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.
402application/problem+jsonThe 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.
403application/problem+jsonTheir role or permissions don't allow it (forbidden); or a delegated token or foreign origin.
404application/problem+jsonThey aren't a member of the organization (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
409application/problem+jsonThe 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).
429application/problem+jsonToday's 10 invites are made (rate_limited).
500application/problem+jsonA 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

NameTypeDescription
x-amz-content-sha256 (header) requiredstringThe 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) requiredstringOrganization ID.
id (path) requiredstringResource ID.

Response body (JSON)

FieldTypeDescription
ok requiredtrue

Responses

StatusBodyMeaning
200OkRevoked.
400application/problem+jsonThe request is malformed or a field is invalid (invalid).
401application/problem+jsonNo session, or it expired or was revoked (unauthenticated): refresh, or sign in again.
403application/problem+jsonTheir role or permissions don't allow it (forbidden); or a delegated token or foreign origin.
404application/problem+jsonThey aren't a member of the organization (not_found).
405application/problem+jsonMethod not allowed. The Allow header lists supported methods.
410application/problem+jsonIt isn't pending any more (invalid).
500application/problem+jsonA temporary problem (unavailable); retry.