One-time secrets

Open a one-time secret

Changed on

Spends one view and returns the ciphertext and iv to decrypt with the fragment key. The last view deletes the ciphertext on the server. With the creator's X-Owner-Token no view is spent (sender: true). No request body.

post/api/secrets/{id}/reveal

Request

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

Path parameters

id, string required

22-character secret id

Headers

X-Owner-Token, unknown

Optional: the creator's owner token. It answers sender: true and spends no view; any other or no token reads as the recipient

Response

Ciphertext of this view

SecretRevealResponse required
ciphertext, string required

base64url AES-GCM output as created

iv, string required

base64url 12-byte nonce as created

viewsLeft, integer required

Views left after this one; 0 = this was the last, the server no longer holds the secret

sender, boolean

true when X-Owner-Token proves you created it: no view was spent; absent otherwise

Changes

    • info

      the endpoint scheme security OwnerToken was added to the API

    • info

      added the new optional header request parameter X-Owner-Token

    • info

      added the optional property sender to the response with the status