K8 HQ

Content — K8 HQ Content API

Content 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.

Read a message decrypted: its parsed content, its source and its attachments. Every read is recorded in the inbox's audit log.

Base URL

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

Endpoints

Content

Get an attachment (decrypted)

GET/inboxes/{inbox}/messages/{msg}/attachments/{n}

One attachment or inline part, with its content type and filename. Compatible-mode inboxes only; audited. Never cached.

For API tokens with content:read.

Parameters

NameTypeDescription
inbox (path) requiredstringInbox ID (ibx_…).
msg (path) requiredstringMessage ID (msg_…).
n (path) requiredintegerThe attachment's index from /content.

Responses

StatusBodyMeaning
200*/*The attachment.
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).

Read a message (decrypted)

GET/inboxes/{inbox}/messages/{msg}/content

The message decrypted and parsed: participants, the text and HTML bodies, its attachments and inline parts (fetch each by index), and channel-specific fields (email.headers). Readable containers only (zero_access otherwise); the read is recorded in the inbox's audit log (access.content.read). Never cached.

For API tokens with content:read.

Parameters

NameTypeDescription
inbox (path) requiredstringInbox ID (ibx_…).
msg (path) requiredstringMessage ID (msg_…).

Response body (JSON)

FieldTypeDescription
attachments requiredAttachment[]
channel requiredemail
flags requiredFlag[]
html requiredstringThe HTML body (empty if none). Untrusted: sanitize before display.
id requiredstring
participants requiredParticipant[]
receivedAt requiredstring
text requiredstringThe plain-text body (empty if none).
emailobjectEmail only.
keywordsstring[]
spamSpam
subjectstring

Responses

StatusBodyMeaning
200ContentThe message.
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).
422application/problem+jsonThe message couldn't be parsed; read it whole from /source.
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).

Get a message's source (decrypted)

GET/inboxes/{inbox}/messages/{msg}/source

The whole RFC 5322 message, decrypted. Compatible-mode inboxes only; audited like /content. Never cached.

For API tokens with content:read.

Parameters

NameTypeDescription
inbox (path) requiredstringInbox ID (ibx_…).
msg (path) requiredstringMessage ID (msg_…).

Responses

StatusBodyMeaning
200message/rfc822The message.
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).