[ 'iv' => [12, 83, 144, 221], 'data' => [167, 44, 222, 1], ], 'expiresIn' => 86400, 'burnAfterRead' => false, 'hasPassword' => false, ]; $ch = curl_init('{{BASE_URL}}/api/pastes'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_POSTFIELDS => json_encode($payload), ]); $response = curl_exec($ch); curl_close($ch); echo $response; PHP2; $phpExample = str_replace('{{BASE_URL}}', $baseUrl, $phpTemplate); ?>
Zero-Knowledge API for encrypted notes, subjects, and Markdown payloads
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/pastes |
Create a new encrypted paste. The server generates a short id unless you pass one in the body. |
| POST | /api/pastes/{id} |
Create a new encrypted paste with a custom short id in the URL path. |
| GET | /api/pastes/{id} |
Fetch the encrypted payload plus metadata. Burn-after-read pastes are deleted after the first successful read. |
| GET | /api/pastes/{id}/meta |
Read metadata only without consuming the encrypted payload. |
| GET | /api/options |
Return limits, presets, supported formats, and the endpoint map. |
| GET | /api/health |
Simple health check for uptime monitoring. |
Legacy routes /api/create and /api/get/{id} still work for backward compatibility.
= h($createExample) ?>
encryptedData.= h($createCurlExample) ?>
= h($createWithPathExample) ?>
= h($createResponseExample) ?>
= h($getResponseExample) ?>
= h($optionsExample) ?>
/api/pastes/{id} removes it after the first successful response.= h($jsExample) ?>
= h($phpExample) ?>
/api/pastes or /api/pastes/{id}.result.url#keyFragment with the recipient./api/pastes/{id}, then decrypts locally.