---
title: "One-time secret status"
method: GET
path: "/api/secrets/{id}"
tags: ["One-time secrets"]
---

# One-time secret status

`GET /api/secrets/{id}`

## Request

- Base URL: `https://brewpage.app`
- URL: `https://brewpage.app/api/secrets/{id}`
- Auth: one of:
  - none
  - API key in header `X-Owner-Token`

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.

## Path parameters

- `id` string, required

## Headers

- `X-Owner-Token` unknown

## Response `200`

Live secret

- SecretStatusResponse
  - `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

## Other responses

- `404`: SECRET_NOT_FOUND: unknown id
- `410`: SECRET_GONE: opened the allowed number of times, expired or deleted
- `429`: Rate limited: wait Retry-After (= retryAfterSeconds)
- `503`: SECRETS_UNAVAILABLE: temporarily off

## Changes

- **2026-11-22** `83483c70abbd`: 9 info
  - the endpoint scheme security `OwnerToken` was added to the API
  - added the new optional `header` request parameter `X-Owner-Token`
  - added the non-success response with the status `410`
  - added the optional property `sender` to the response with the `200` status
  - …5 more
- **2026-11-22** `21d3daa71f92`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/brewpage/apis/brewpage-api/changes/api/secrets/:id/get.md)

---

[API](https://skmtc.dev/brewpage/apis/brewpage-api.md) - [All operations](https://skmtc.dev/brewpage/apis/brewpage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/brewpage/apis/brewpage-api/revisions/78d2720a18a9?raw)
