K8 HQ

Forwarding — K8 HQ Content API

Forwarding operations for K8 HQ Content API. Requests, permissions and responses.

Version 1OpenAPI description (JSON)

Browse operation groups

Before making requests, read the authentication and request requirements.

Manage inbox forwarding destinations.

Base URL

Base URLFor
https://api.k8hq.com/v1API tokens and the K8 HQ web app

Endpoints

Forwarding

List forwards

GET/inboxes/{inbox}/forwards

Where the inbox's new mail is forwarded. Everyone with access to the inbox sees every forward, so colleagues know where shared mail goes. forwardingOff is the owners' switch: while it's on, nothing is forwarded and no forward can be set up. mayForward and each forward's mayRemove say what the caller may do (a person: never with an access token).

For API tokens with messages:read and the web app.

Parameters

NameTypeDescription
inbox (path) requiredstringInbox ID (ibx_…).

Response body (JSON)

FieldTypeDescription
forwardingOff requiredboolean
forwards requiredForward[]
mayForwardbooleanThe caller may set up a forward when they can edit this inbox, have forwarding.use there and forwarding is on.

Responses

StatusBodyMeaning
200JSONThe forwards.
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Forward new mail

POST/inboxes/{inbox}/forwards

Forwards the inbox's new mail to an outside address; a copy always stays in the inbox. You need permission to edit the inbox and set up forwarding. The organization's owners can turn forwarding off. It takes a person who used their passkey in the last 5 minutes (else 401 step_up_required), never an access token.

The address gets a confirmation message from the inbox's address and receives nothing until someone there confirms (within 7 days); asking again for a pending address sends a new link. An organization sends at most 20 confirmations a day. Forwards come from the address the mail arrived at, as "Sam via shop@acme.com" <shop@acme.com> with Reply-To the original sender; spam and mail K8 HQ forwarded already are never forwarded, and each forward sends at most 500 messages a day. At most 5 forwards per inbox. Each forward is billed as sending. Needs a passkey confirmation of exactly this change (x-k8hq-confirm: forward.create, design note 0013): send x-k8hq-confirm with it.

For the web app.

Parameters

NameTypeDescription
inbox (path) requiredstringInbox ID (ibx_…).
Idempotency-Key (header)stringUp to 255 characters; a retry with the same key gets the first response.

Request body (JSON)

FieldTypeDescription
to requiredstringOne address, outside this inbox.
{"to":"me@gmail.com"}

Response body (JSON)

FieldTypeDescription
createdAt requiredstring
id requiredstringThe forward (fwd_).
memberId requiredstringThe member who set it up (mem_).
status requiredpending | active | pausedpending until someone at the address confirms (the link works for 7 days), then active. paused: the member who set it up lost access to the inbox; someone who manages the inbox resumes it.
to requiredstringWhere the inbox's new mail is forwarded.
confirmedAtstring
mayRemovebooleanIn lists: the caller may remove it (who set it up, or someone who manages the inbox's settings).

Responses

StatusBodyMeaning
201ForwardThe new (pending) forward; the confirmation message was sent.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonSign in required (unauthenticated), or confirm this change with your passkey (confirmation_required, or step_up_required with action until confirmations are enforced): the answer carries the action to confirm.
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit.
403application/problem+jsonNot for access tokens, or the owners turned forwarding off for this inbox (forbidden); or the confirmation isn't this session's (confirmation_invalid), or an API token or assistant asked (needs_person).
404application/problem+jsonNot found, or not yours (not_found).
409application/problem+jsonThe inbox already forwards to that address or has 5 forwards (conflict), or the same Idempotency-Key is still running (in_progress). 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).
422application/problem+jsonThe confirmation message couldn't be sent, e.g. the inbox has no sending address (rejected).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Stop a forward

DELETE/inboxes/{inbox}/forwards/{fwd}

The person who set up the forward can remove it if they can still read the inbox. Anyone else needs permission to edit the inbox and manage its settings. This requires a signed-in person.

For the web app.

Parameters

NameTypeDescription
inbox (path) requiredstringInbox ID (ibx_…).
fwd (path) requiredstringThe forward (fwd_).
Idempotency-Key (header)stringUp to 255 characters; a retry with the same key gets the first response.

Responses

StatusBodyMeaning
204Removed.
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit.
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
409application/problem+jsonA request with this Idempotency-Key is still running (in_progress).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Resume a paused forward

POST/inboxes/{inbox}/forwards/{fwd}/resume

K8 HQ can pause a forward when the member who set it up loses permission to edit the inbox. Someone who can edit the inbox and manage its settings can resume it, signed in to the web app with a passkey used in the last 5 minutes (401 step_up_required otherwise); forwarding must be allowed for the inbox (409 if it isn't). Needs a passkey confirmation of exactly this change (x-k8hq-confirm: forward.resume, design note 0013): send x-k8hq-confirm with it.

For the web app.

Parameters

NameTypeDescription
inbox (path) requiredstringInbox ID (ibx_…).
fwd (path) requiredstringThe forward (fwd_).
Idempotency-Key (header)stringUp to 255 characters; a retry with the same key gets the first response.

Response body (JSON)

FieldTypeDescription
createdAt requiredstring
id requiredstringThe forward (fwd_).
memberId requiredstringThe member who set it up (mem_).
status requiredpending | active | pausedpending until someone at the address confirms (the link works for 7 days), then active. paused: the member who set it up lost access to the inbox; someone who manages the inbox resumes it.
to requiredstringWhere the inbox's new mail is forwarded.
confirmedAtstring
mayRemovebooleanIn lists: the caller may remove it (who set it up, or someone who manages the inbox's settings).

Responses

StatusBodyMeaning
200ForwardThe forward, active again.
401application/problem+jsonSign in required (unauthenticated), or confirm this change with your passkey (confirmation_required, or step_up_required with action until confirmations are enforced): the answer carries the action to confirm.
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit.
403application/problem+jsonNot allowed (forbidden); or the confirmation isn't this session's (confirmation_invalid), or an API token or assistant asked (needs_person).
404application/problem+jsonNot found, or not yours (not_found).
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).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).