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
https://www.vaulted.fyi/apiStore encrypted ciphertext with expiration and view-limit metadata. Returns a secret ID.
Request body
| Field | Type | Required | Values |
|---|---|---|---|
| ciphertext | string | yes | unpadded base64url, 22–4096 chars |
| iv | string | yes | unpadded base64url, exactly 16 chars (12-byte AES-GCM IV) |
| maxViews | number | yes | 0, 1, 3, 5, 10 (0 = unlimited, returns -1 for viewsRemaining) |
| ttl | number | yes | 3600, 7200, 21600, 43200, 86400, 259200, 604800, 1209600, 2592000 (seconds) |
| hasPassphrase | boolean | no | true or false; default false |
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
}'{ "id": "abc123" }Error responses
| Status | Description |
|---|---|
| 400 | Validation error (malformed JSON, or missing or invalid fields) |
| 415 | Content-Type is not application/json |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
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.
curl https://www.vaulted.fyi/api/secrets/abc123{
"ciphertext": "3q2-7wFh0Kc9xYb_Lm4TzR8nWvJpQs1uE6dGiHaNoA",
"iv": "c2dY7_Kq1LmN0pZx",
"hasPassphrase": false,
"viewsRemaining": 2
}viewsRemaining is -1 for unlimited-view secrets (maxViews = 0).
Error responses
| Status | Description |
|---|---|
| 404 | Secret not found or expired |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Check whether a secret still exists, without consuming a view. View counts are not returned; creators see them on their private status link.
curl https://www.vaulted.fyi/api/secrets/abc123/status{
"exists": true
}Error responses
| Status | Description |
|---|---|
| 404 | Secret not found or expired |
| 500 | Internal server error |
Rate limits
| Endpoint | Limit | Window |
|---|---|---|
| POST /api/secrets | 20 requests | 10 minutes |
| GET /api/secrets/[id] | 60 requests | 10 minutes |
Rate limits are per IP address. Exceeding the limit returns 429.