One-time secrets

One-time secret status

Changed on

Title, kind, key check, views left and expiry of a live secret. Never spends a view and never returns the ciphertext. With the creator's X-Owner-Token the answer adds sender: true.

get/api/secrets/{id}

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

Live secret

SecretStatusResponse required
state, 'active' required

Always active: an ended secret answers 410 SECRET_GONE

viewsLeft, integer required

Views still possible

maxViews, integer required

Views allowed at creation

expiresAt, string date-time required

When the secret stops being readable

title, string nullable required

Title the creator gave it, plain text; null for an older secret without one

kind, 'text' | 'file' required

text or file

keyCheck, string nullable required

Key check of the creator (see SecretCreateRequest.keyCheck): compare before revealing; null when none

sender, boolean

true when X-Owner-Token proves you created it (revealing then spends no view); 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 non-success response with the status

    6 more changes in this revision