publish_kv
Creates a BrewPage key/value store entry addressed by namespace, id, and key, then returns its share link and owner token.
Instructions
Publish a key/value entry to BrewPage. Creates a KV store; the entry is addressed by (namespace, id, key). Repository defaults: 1 MiB per value, 1,000 keys per store. Returns its primary share link and owner token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | KV key (first part of the (namespace, id, key) addressing tuple) | |
| tags | No | Optional tags for the KV entry | |
| value | Yes | KV value | |
| ttlDays | No | Requested TTL: days as a number, or a string such as '2w', '36h' or '1 month' (default 15 days). The server rounds to whole days and clamps to the allowed range (1-30 by default; owner caps differ), reporting each adjustment in notices; use returned expiresAt. | |
| password | No | Optional password to protect the KV store | |
| namespace | No | Optional. Omit to generate an unlisted namespace: anyone with its unpassworded link can read it, but it is excluded from gallery/search. Pass a custom namespace to group unlisted content, or pass `public` ONLY when the user explicitly wants gallery/search eligibility. Password-protected content stays excluded; unlisted, protected or otherwise ineligible native responses carry noindex; eligible public HTML, sites and files may permit indexing. | |
| ownerToken | No | Existing owner token to group this KV store under the same owner as previous content | |
| deliveryMode | No | Optional delivery choice for a fresh publication, independent of password/namespace. Fresh sites and HTML-format pages outside public (including the default unlisted namespace) always use subdomain; an explicit path there still publishes, on subdomain, with a delivery notice. Everything else in any namespace (Markdown, code/text, files, JSON, KV, public HTML) defaults to path (Promotion); public HTML may automatically choose subdomain for browser features. When creation returns an existing publication, it keeps its actual mode and URL. |