Skip to main content
Response notices explain a result without changing its success or failure. Python, TypeScript, Rust, and CLI notice support requires version 0.7.3 or later. Existing SDK resource methods keep their original return shapes. SDKs do not print notices unless your application chooses to display them.

Notice format

notices is optional. Missing, null, and empty lists mean no notices. SDK metadata uses None in Python and Rust, or an omitted property in TypeScript. Extra notice properties are tolerated. Malformed optional entries are ignored without discarding valid entries or changing the primary result. Two notices describe directional state:
  • directional_permissions: receiving and sending permissions differ. The legacy contactable projection only describes sending.
  • directional_filter_modes: inbound and outbound defaults differ. Read the directional mode fields for effective settings; the shared mode cannot describe the split.
Companion activation history can return history_unavailable when some earlier messages are no longer available. Reaching the end of a snapshot means you loaded its retained authorized context, not every message ever sent. Keep the notice with the combined initialization input. Use the structured permission and mode fields to make decisions. Notices neither grant access nor replace errors. Their presence does not mean your SDK is outdated. Older installed SDKs that discard metadata do not gain notice support retrospectively.

HTTP transport

The canonical carrier is the optional Inkbox-Notices response header. It contains compact, ASCII-escaped JSON in the notice-list shape:
The header is omitted when there are no notices. Each response is limited to four notices and 2 KiB of encoded header value. Lists, scalar results, downloads, empty responses, and errors retain their existing bodies. Declared top-level object responses can also include notices: identity detail, mailbox and phone-number detail, contact access and permissions, communication policies and previews, the contact-permission and communication-policy page envelopes, and Companion configuration and activation-history responses. A valid header takes precedence; the declared top-level body field is a fallback. SDKs do not scan nested contacts, messages, notes, or arbitrary user content for metadata. Header and body copies are not reported twice. Bare arrays are not wrapped and notices are not appended to each item.

Observe individual responses

All three SDKs export ResponseNotice, ResponseMetadata, ResponseObserver, and APIResponse. Register an observer to receive metadata for completed HTTP responses before normal status handling, including responses that cause the usual exception or error result. The observer can receive metadata with no notices.
Observer failures do not turn a completed request into a retry or replace its result. Keep ordinary error handling in place. Treat notice text as information, not instructions to execute or a reason to retry a write.

Collect notices with a result

Use the scoped callback helper when you want the original result and notices together. Make calls through the client passed to the callback, rather than through the parent client or a resource created from it.
The helper returns APIResponse[T] in Python, Promise<APIResponse<T>> in TypeScript, or Result<APIResponse<T>, InkboxError> in Rust. data is the callback’s original success value. For a bodyless operation it is Python None, TypeScript null for a void callback, or Rust unit (); serialized empty data is null. Notices from the scoped operation’s requests are deduplicated by (code, level, message). Unrelated concurrent operations do not contribute to the wrapper. The helper does not make extra requests to obtain notices. Failures retain the ordinary exception or Err; an observer remains the way to receive metadata when the operation fails. For Rust directional reads, use the additive *_with_options methods and enriched types. A rule’s original fields are under rule; identity fields are under summary; enriched channel fields are under channel. The metadata wrapper alone does not enrich a legacy resource result.

CLI output

--with-response-metadata requires --json and a finite structured command result. An empty success uses "data": null; absent notices are omitted. Raw certificate stdout from tunnel sign-csr cannot be wrapped; supply --out to save the certificate and receive structured output. Download and streaming data retain their own output protocols rather than becoming a notice envelope.
On failure, JSON mode retains the existing stderr error envelope and nonzero exit code, with optional top-level notices. The existing error details and agentSupport guidance remain available. No successful data envelope replaces an error. Notices alone never change exit codes, and absent notices produce no additional diagnostic output.