JSON

Create JSON document

Changed on

Stores any valid JSON and returns a shareable link. Reuse existing owner token to group entities under one owner. Secrets allowed; likely ones are flagged in notices. To share a password or key: POST /api/secrets (client-side encrypted one-time link).

post/api/json

Request

  • Base URL
    https://brewpage.app
  • Auth
    • none
    • or API key in header X-Owner-Token

Query parameters

ns, string

No ns (default): private. ns=public: the shared public namespace. JSON and KV are never listed in the gallery or indexed, in any namespace; anyone who has the link can open it. Lowercase only.

tags, string

Comma-separated tags

ttl, string

TTL in days: up to 30 days without an account, up to 90 with a free profile (send its X-Owner-Token); a default applies when ttl is omitted. Accepts whole days: 15, 15d, 15 days.

Headers

X-Password, string

Access password; protected documents are unlisted. NEW browser links use trusted unlock; programmatic reads accept X-Password

X-Delivery-Mode, string

Delivery mode for a new document: path or subdomain

X-Owner-Token, unknown

Reuse existing owner token to group entities under one owner. If omitted, a new token is generated

Request body

unknown required

Response

Document created

JsonCreateResponse required
id, string required

Unique 10-character alphanumeric document ID

namespace, string required
link, string required

Primary URL returned for browser viewing and sharing

ownerLink, string required

API URL for programmatic access (update/delete)

sizeBytes, integer required
expiresAt, string date-time required
createdAt, string date-time required
tags, string[] required
ownerToken, string required

Owner token: keep it (cannot be recovered; show it to the user on request); send it as X-Owner-Token on later publishes and updates

visibilityNotice, string

Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add an unlist hint), 'Public: anyone with the link. Not listed.' (public json, kv, json pages, json and html files), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'

manageUrl, string

Management link, full control of this one document. Give it to the user with the link; it is private, never post it publicly. Present only when minted.

listed, boolean required

Always false: JSON is never listed in the gallery or sitemap.

visibilityUrl, string

Owner: POST {"listed":false|true} here to unlist or list. Link unchanged.

managementLink, string nullable required
routingCohort, string required
deliveryMode, string nullable required
requestedDeliveryMode, string nullable required
effectiveDeliveryMode, string nullable required
deliveryModeMatched, boolean nullable required
access, 'public' | 'unlisted' | 'protected' required

public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.

modeLocked, boolean required
hostingVersion, integer nullable required
deliveryModeReason, string

Why this mode is in effect:'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale', 'policy:republish-keeps-mode', 'policy:custom-domain-attached' or 'policy:state-declared'. Absent when nothing applies.

deliveryNotice, string

Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent.

linkName, string nullable

Link name of this public page, site or file; null = its random link. Absent when link names are not available.

notices, PublishNotice[]

Advisories about the request or its result; omitted when none.

Changes

    • info

      added the optional property level to the response with the status

    • info

      added the optional property level to the response with the status

    • info

      added the optional property level to the response with the status

    1 more change in this revision