Create a one-time secret
Changed onStores client-side encrypted text or one file for 1 to 10 views (default 1) and 1h, 1d, 7d or 30d (default 7d), with a title the recipient sees. Owned like a publication: send X-Owner-Token (none: a new one is returned). Share https://brewpage.app/secret/{id}#{key} with the key only in the fragment; manageUrl is for the creator only.
Request
- Base URLhttps://brewpage.app
- Auth
- none
- or API key in header X-Owner-Token
Headers
Reuse your owner token so the secret joins your other publications. If omitted, a new token is generated
Request body
AES-GCM-256 output (encrypted text plus its 16-byte tag) as base64url without padding, at most 54000 characters. Encrypt in the client; the key never reaches the server.
The 12-byte AES-GCM nonce as 16 base64url characters.
How long the secret stays readable: 1h, 1d, 7d or 30d. Omitted: 7d.
How many times it can be opened, 1 to 10. Omitted: 1.
Shown to the recipient before opening: never put the secret here. 1-200 characters, one line.
Your own note, at most 500 characters; only you see it.
Your tags, at most 10 of 1-32 characters; only you see them.
text: UTF-8 text; file: one file in envelope v1. Omitted: text.
base64url of the first 16 bytes of SHA-256("brewpage-secret-key-check-v1" + the 32 key bytes): the page checks a key against it before spending a view.
Response
Created
22-character secret id. Share https://brewpage.app/secret/{id}#{key}, the key in the fragment only.
10-character owner handle of the owner routes; it can't open the secret
text or file
Title the recipient sees
When the secret stops being readable
How many times it can be opened
Owner token: keep it; send it as X-Owner-Token on later creates and owner routes
Private manage link (status, opens, delete): give it to the creator only, never to the recipient
Your tags; absent when none
How the request was adjusted; absent when not
Changes
- breaking
added the new required request property
title - info
the endpoint scheme security
OwnerTokenwas added to the API - info
added the new optional
headerrequest parameterX-Owner-Token
13 more changes in this revision
- breaking