You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -324,15 +324,16 @@ Rate limited per IP. Max request body: 1 KB. Full API docs at [notefade.com/docs
324
324
325
325
### ⚠️ Third-Party Integration API
326
326
327
-
> **Security tradeoff:**This endpoint does NOT follow the zero-knowledge model. The server briefly sees plaintext (~1-2ms in volatile Worker memory) before encrypting. Never stored, never logged — but the server processes content, which the main application never does. Use the main app for sensitive secrets.
327
+
> **Security tradeoff:**These endpoints do NOT follow the zero-knowledge model. The server briefly sees plaintext (~1-2ms in volatile Worker memory) during encryption or decryption. Never stored, never logged — but the server processes content, which the main application never does. The read endpoint additionally requires the full note URL (including the `#` fragment) to be sent to the server. Use the main app for sensitive secrets.
|`POST`|`/api/v1/create-note`| Create a note (server-side encryption) |
332
+
|`POST`|`/api/v1/read-note`| Read a note (server-side decryption) |
332
333
333
-
Requires an `X-Api-Key` header. Rate limited per key (60 req/min, KV-based). Max body: 4 KB. Fixed 24-hour TTL.
334
+
Requires an `X-Api-Key` header. Rate limited per key (60 req/min, KV-based). Max body: 4 KB (create) / 16 KB (read). Fixed 24-hour TTL for created notes.
334
335
335
-
This is a convenience endpoint for trusted third-party apps that need to create notes programmatically. It produces the same encrypted output as the main app — AES-256-GCM, XOR key splitting, one-time-read — but encryption happens on the server instead of in the browser. See [notefade.com/docs#integration-api](https://notefade.com/docs#integration-api) for full documentation and security details.
336
+
These are convenience endpoints for trusted third-party apps that need to create or read notes programmatically. They produce and consume the same encrypted format as the main app — AES-256-GCM, XOR key splitting, one-time-read — but crypto operations happen on the server instead of in the browser. See [notefade.com/docs#integration-api](https://notefade.com/docs#integration-api) for full documentation and security details.
'Accepts a note URL, fetches the shard from storage, reconstructs the encryption key, and decrypts the content on the server. The shard is consumed — the note cannot be read again. Plaintext is held in volatile Worker memory for ~1-2ms during decryption — never stored, never logged. The full note URL (including fragment) must be sent to the server, which means the server momentarily has access to all key material. Requires a valid API key via the X-Api-Key header. Multi-chunk and custom-provider notes are not supported.',
381
+
params: [
382
+
{
383
+
name: 'url',
384
+
location: 'body',
385
+
type: 'string',
386
+
required: true,
387
+
description: 'The full note URL including the fragment (e.g. https://notefade.com/#shardId:check:payload). The fragment is required — it contains the encrypted data and key material.',
388
+
pattern: 'Must contain # fragment',
389
+
},
390
+
],
391
+
responses: [
392
+
{
393
+
status: 200,
394
+
description: 'Note decrypted and returned',
395
+
body: '{ "text": "The secret message content", "shardId": "a1b2c3d4e5f67890" }',
396
+
},
397
+
{status: 400,description: 'Invalid URL, bad fragment format, integrity check failed, or multi-chunk/custom-provider URL'},
398
+
{status: 401,description: 'Missing or invalid API key'},
399
+
{status: 404,description: 'Note not found — already read, expired, or invalid shard ID'},
400
+
{status: 413,description: 'Request body exceeds 16 KB'},
0 commit comments