REST API for encrypted secret sharing

Create and retrieve encrypted, self-destructing secrets programmatically.

This API stores pre-encrypted ciphertext. Encryption must happen client-side before calling the API. The server never sees plaintext.

For most use cases, the CLI or GitHub Action handle encryption automatically.

Base URL

Base URL
https://www.vaulted.fyi/api
POST/api/secrets

Store encrypted ciphertext with expiration and view-limit metadata. Returns a secret ID.

Request body

FieldTypeRequiredValues
ciphertextstringyesunpadded base64url, 22–4096 chars
ivstringyesunpadded base64url, exactly 16 chars (12-byte AES-GCM IV)
maxViewsnumberyes0, 1, 3, 5, 10 (0 = unlimited, returns -1 for viewsRemaining)
ttlnumberyes3600, 7200, 21600, 43200, 86400, 259200, 604800, 1209600, 2592000 (seconds)
hasPassphrasebooleannotrue or false; default false
Example request
curl -X POST https://www.vaulted.fyi/api/secrets \
  -H "Content-Type: application/json" \
  -d '{
    "ciphertext": "3q2-7wFh0Kc9xYb_Lm4TzR8nWvJpQs1uE6dGiHaNoA",
    "iv": "c2dY7_Kq1LmN0pZx",
    "maxViews": 1,
    "ttl": 86400,
    "hasPassphrase": false
  }'
Response
{ "id": "abc123" }

Error responses

StatusDescription
400Validation error (malformed JSON, or missing or invalid fields)
415Content-Type is not application/json
429Rate limit exceeded
500Internal server error
GET/api/secrets/[id]

Retrieve encrypted ciphertext and consume a view. The secret is deleted when all views are consumed.

Each request consumes one view. Use the status endpoint to check without consuming.

Example request
curl https://www.vaulted.fyi/api/secrets/abc123
Response
{
  "ciphertext": "3q2-7wFh0Kc9xYb_Lm4TzR8nWvJpQs1uE6dGiHaNoA",
  "iv": "c2dY7_Kq1LmN0pZx",
  "hasPassphrase": false,
  "viewsRemaining": 2
}

viewsRemaining is -1 for unlimited-view secrets (maxViews = 0).

Error responses

StatusDescription
404Secret not found or expired
429Rate limit exceeded
500Internal server error
GET/api/secrets/[id]/status

Check whether a secret still exists, without consuming a view. View counts are not returned; creators see them on their private status link.

Example request
curl https://www.vaulted.fyi/api/secrets/abc123/status
Response
{
  "exists": true
}

Error responses

StatusDescription
404Secret not found or expired
500Internal server error

Rate limits

EndpointLimitWindow
POST /api/secrets20 requests10 minutes
GET /api/secrets/[id]60 requests10 minutes

Rate limits are per IP address. Exceeding the limit returns 429.