Forwarding — K8 HQ Content API
Forwarding operations for K8 HQ Content API. Requests, permissions and responses.
Version 1OpenAPI description (JSON)
Before making requests, read the authentication and request requirements.
Manage inbox forwarding destinations.
Base URL
| Base URL | For |
https://api.k8hq.com/v1 | API 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
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
Response body (JSON)
| Field | Type | Description |
forwardingOff required | boolean | |
forwards required | Forward[] | |
mayForward | boolean | The caller may set up a forward when they can edit this inbox, have forwarding.use there and forwarding is on. |
Responses
| Status | Body | Meaning |
| 200 | JSON | The forwards. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too 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. |
| 503 | application/problem+json | Temporary 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
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Request body (JSON)
| Field | Type | Description |
to required | string | One address, outside this inbox. |
{"to":"me@gmail.com"}
Response body (JSON)
| Field | Type | Description |
createdAt required | string | |
id required | string | The forward (fwd_). |
memberId required | string | The member who set it up (mem_). |
status required | pending | active | paused | pending 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 required | string | Where the inbox's new mail is forwarded. |
confirmedAt | string | |
mayRemove | boolean | In lists: the caller may remove it (who set it up, or someone who manages the inbox's settings). |
Responses
| Status | Body | Meaning |
| 201 | Forward | The new (pending) forward; the confirmation message was sent. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | Sign 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. |
| 402 | application/problem+json | The 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. |
| 403 | application/problem+json | Not 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). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | The 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). |
| 422 | application/problem+json | The confirmation message couldn't be sent, e.g. the inbox has no sending address (rejected). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too 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. |
| 503 | application/problem+json | Temporary 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
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
fwd (path) required | string | The forward (fwd_). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Responses
| Status | Body | Meaning |
| 204 | | Removed. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The 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. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | A request with this Idempotency-Key is still running (in_progress). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too 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. |
| 503 | application/problem+json | Temporary 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
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
fwd (path) required | string | The forward (fwd_). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Response body (JSON)
| Field | Type | Description |
createdAt required | string | |
id required | string | The forward (fwd_). |
memberId required | string | The member who set it up (mem_). |
status required | pending | active | paused | pending 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 required | string | Where the inbox's new mail is forwarded. |
confirmedAt | string | |
mayRemove | boolean | In lists: the caller may remove it (who set it up, or someone who manages the inbox's settings). |
Responses
| Status | Body | Meaning |
| 200 | Forward | The forward, active again. |
| 401 | application/problem+json | Sign 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. |
| 402 | application/problem+json | The 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. |
| 403 | application/problem+json | Not allowed (forbidden); or the confirmation isn't this session's (confirmation_invalid), or an API token or assistant asked (needs_person). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 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). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too 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. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |