K8 HQ

Search settings — K8 HQ Content API

Search settings 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.

Configure semantic search for an inbox.

Base URL

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

Endpoints

Search settings

Get the mailbox's search by meaning

GET/inboxes/{inbox}/semantic

Search by meaning (semantic search) finds messages about what you typed even when they don't share its words. It's opt-in per mailbox and paid by the organization: each message's subject, text and attachment names and types (never attachment contents, at most about 8,000 tokens) are sent to an embedding model (Amazon Titan Text Embeddings v2 on AWS Bedrock, in K8 HQ's region; AWS keeps nothing and trains on nothing), and the resulting vectors are stored encrypted with the mailbox's key and deleted with it. Zero-access mailboxes can't be searched by meaning on the server. Shows the mailbox's setting and the organization's, whether it's on, how far its index is, and (when it's off or still building) what turning it on would cost now. Everyone with access to the inbox sees it.

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

Parameters

NameTypeDescription
inbox (path) requiredstringInbox ID (ibx_…).
estimate (query)00 leaves the estimate out (it reads every message's size).

Response body (JSON)

FieldTypeDescription
forbidden requiredboolean
mayChange requiredboolean
mode requiredorg | on | offThe mailbox's setting: org follows the organization's default.
model requiredstringThe embedding model.
note requiredstringWhat this means, for people.
off required | off | forbidden | zero_access | removedWhy it isn't on: off (its setting, or the organization's default), forbidden (an owner forbade sending message text to AI models), zero_access, removed; empty when on.
on requiredbooleanWhether the mailbox is searchable by meaning (its mail is embedded as it arrives).
orgDefault requiredboolean
prices requiredSemanticPrices
status requiredSemanticStatus
zeroAccess requiredboolean
estimateSemanticEstimate
estimatePendingbooleanThe mailbox is still loading for the estimate: ask again in a moment.

Responses

StatusBodyMeaning
200SemanticSettingsThe mailbox's search by meaning.
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).

Turn the mailbox's search by meaning on or off

PUT/inboxes/{inbox}/semantic

mode: org (follow the organization's default), on or off. When that turns it on, the existing mail is embedded once at the estimate's cost: send its total as confirm (409 confirm_estimate with the estimate otherwise), and the organization's credit must cover it (402). New mail is then embedded as it arrives, billed as it goes. Turning it off deletes the mailbox's vectors. People with inbox.settings.change for the inbox, signed in to the web app with a passkey used in the last 5 minutes (401 step_up_required otherwise). Recorded as inbox.setting_changed (semanticSearch). An estimate more than what's left of the organization's monthly limit is refused (409).

For the web app. 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
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
mode requiredorg | on | off
confirmstringThe estimate's total you agree to, as shown.

Response body (JSON)

FieldTypeDescription
forbidden requiredboolean
mayChange requiredboolean
mode requiredorg | on | offThe mailbox's setting: org follows the organization's default.
model requiredstringThe embedding model.
note requiredstringWhat this means, for people.
off required | off | forbidden | zero_access | removedWhy it isn't on: off (its setting, or the organization's default), forbidden (an owner forbade sending message text to AI models), zero_access, removed; empty when on.
on requiredbooleanWhether the mailbox is searchable by meaning (its mail is embedded as it arrives).
orgDefault requiredboolean
prices requiredSemanticPrices
status requiredSemanticStatus
zeroAccess requiredboolean
estimateSemanticEstimate
estimatePendingbooleanThe mailbox is still loading for the estimate: ask again in a moment.

Responses

StatusBodyMeaning
200SemanticSettingsSaved.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
402application/problem+jsonThe estimate is more than the organization's credit (out_of_credit). Or the organization is read-only (read_only): 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).
409JSON, application/problem+jsonTurning it on needs the estimate confirmed (confirm_estimate): send its total as confirm. Or another change of the same Idempotency-Key is still running, or the mailbox can't be searched by meaning (zero-access, forbidden).
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).