REST API v1
One-time links from your code.
Create secrets and requests from your own app, helpdesk or script. The API is available on the Pro and Pro Plus plans.
Authentication
Create an API key in My account → API. Send it in the Authorization header as a Bearer token. All requests go over HTTPS.
Authorization: Bearer kx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GET https://kriptano.com/api/v1/me
The rate limit depends on the plan (Pro 60/min, Pro Plus 300/min). Secrets you create count towards the plan’s monthly quota.
Creating a secret
The simplest way: send plain text over HTTPS – the server encrypts it with the same algorithm as the browser, does not store the key, and returns the full link including the key.
curl -X POST https://kriptano.com/api/v1/secrets \
-H "Authorization: Bearer $KRIPTANO_KEY" \
-H "Content-Type: application/json" \
-d '{
"secret": "User: anna\nPassword: Gx7!pQ2m",
"expires": 604800,
"views": 1,
"passphrase": "",
"label": "Hosting – client Smith",
"notify": true
}'
Response (201):
{
"id": "7GkQ2mPzr9XtWbHa",
"url": "https://kriptano.com/s/7GkQ2mPzr9XtWbHa/#k9Xv3…Qe1s",
"status": "active",
"views": 0,
"max_views": 1,
"expires_at": "2026-11-13T09:00:00+00:00"
}
| Field | Description |
|---|---|
secret | Secret text (up to ~90,000 characters). |
files | Optional: [{"name","type","data"(base64)}] – attachments, if the plan allows them. |
expires | Lifetime in seconds: 3600, 86400, 259200, 604800, 1209600, 2592000, 7776000, 15552000, 31536000 (up to the plan limit). |
views | Number of views (default 1). |
passphrase | Optional extra passphrase the recipient must enter. |
label | Internal label (visible only to you; do not put secret data here). |
notify | true = email notification when the secret is opened. |
uploads | Optional: [{"id","token"}] – large attachments already uploaded (see Large attachments); only with ciphertext. |
deliver_to | Optional (Pro, Pro Plus): up to 5 addresses to which Kriptano emails the link right away. Works when you send plain text (secret). |
deliver_note | Optional: a short message to the recipient (up to 500 characters, no HTML). Do not include confidential data – the message is not encrypted. |
For full zero-knowledge, encrypt on your side (next section) – then the server never sees the plain text or the key.
Password generator
GET or POST /password returns random passwords, passphrases or PINs. It works on every plan: without an API key (limited per IP address) or with a key on Pro and Pro Plus (your plan’s limit). Nothing is stored or logged; the response has Cache-Control: no-store. For the highest privacy, generate in the browser on the Password Generator page.
curl "https://kriptano.com/api/v1/password?length=20&count=3"
curl "https://kriptano.com/api/v1/password?type=passphrase&words=6&separator=-&capitalize=first&wordlist=en&format=text"
Response (201):
{
"type": "password",
"passwords": ["q7#Vt9…", "…", "…"],
"password": "q7#Vt9…",
"length": 20,
"entropy_bits": 131.1,
"strength": "very_strong",
"charset_size": 94
}
| Field | Description |
|---|---|
type | password (default), passphrase, pin or pronounceable. |
length | Length: password 4–128 (20), pin 4–12 (6), pronounceable 6–64 (18). |
count | How many to generate at once: 1–100. |
lowercase, uppercase, numbers, symbols | Character sets (true/false; all on by default). At least one character of each enabled set. |
symbol_set, extended_symbols, exclude, exclude_similar | Your own symbol list, extended symbols, characters to exclude, without look-alikes (I l 1 | O 0 o). |
min_numbers, min_symbols, start_with_letter | Minimum numbers and symbols (1 by default), first character a letter. |
words, separator, capitalize, include_number, include_symbol, wordlist | Passphrase: 3–20 words, separator (- . _ space none digit symbol), capitalize (none, first, upper, random), number and symbol, word list en, de, fr, it, es, bcms or sl. |
format | json (default) or text – one password per line. |
Generate and send in one call: "generate" instead of "secret" in POST /secrets (Pro, Pro Plus). The server creates the password, encrypts it as a one-time secret and returns the link and the password (unless "return_password": false).
curl -X POST https://kriptano.com/api/v1/secrets \
-H "Authorization: Bearer $KRIPTANO_KEY" \
-H "Content-Type: application/json" \
-d '{ "generate": { "type": "password", "length": 24 }, "expires": 86400, "views": 1, "deliver_to": ["anna@client.com"] }'
→ { "id": "…", "url": "https://kriptano.com/s/…#…", "password": "…", "status": "active", … }
Limits without a key: 30 requests per minute and 1,000 per day per IP address (HTTP 429 when exceeded). With a key: 60 (Pro) or 300 (Pro Plus) per minute.
Encrypting on your side
Format: AES-256-GCM, 32-byte key, 12-byte IV, ciphertext = "v1." + base64url(IV) + "." + base64url(ciphertext+tag). The content is JSON {"v":1,"t":"text"}. The “auth” token = base64url(SHA-256(key ‖ "kriptano-auth")). Recommended: the “link” field = base64url(SHA-256(key ‖ "kriptano-link")) – proof of possession of the link; without it, a wrong extra passphrase uses up attempts even for those who only know the ID.
// Node.js 18+ / browser (Web Crypto)
const te = new TextEncoder();
const b64u = (b) => Buffer.from(b).toString('base64url');
const raw = crypto.getRandomValues(new Uint8Array(32)); // key – stays with you
const iv = crypto.getRandomValues(new Uint8Array(12));
const key = await crypto.subtle.importKey('raw', raw, 'AES-GCM', false, ['encrypt']);
const body = te.encode(JSON.stringify({ v: 1, t: 'Password: Gx7!pQ2m' }));
const ct = new Uint8Array(await crypto.subtle.encrypt({ name: 'AES-GCM', iv }, key, body));
const auth = b64u(new Uint8Array(await crypto.subtle.digest('SHA-256',
new Uint8Array([...raw, ...te.encode('kriptano-auth')]))));
const res = await fetch('https://kriptano.com/api/v1/secrets', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.KRIPTANO_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ ciphertext: `v1.${b64u(iv)}.${b64u(ct)}`, auth, expires: 86400, views: 1 })
}).then(r => r.json());
console.log(res.url + '#' + b64u(raw)); // link for the recipient
With an extra passphrase: final key = PBKDF2-SHA256(passphrase, salt = key from the link, 600,000 iterations, 32 bytes); use it to encrypt and to compute “auth”, and add "passphrase": true, "kdf": 600000 to the request.
List, status and deletion
GET https://kriptano.com/api/v1/secrets?status=active&page=1&per_page=25
GET https://kriptano.com/api/v1/secrets/{id}
DELETE https://kriptano.com/api/v1/secrets/{id}
The response contains metadata only (status, number of views, time) – never the content. The total count is in the X-Total-Count header.
<?php
$ch = curl_init( 'https://kriptano.com/api/v1/secrets' );
curl_setopt_array( $ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv( 'KRIPTANO_KEY' ), 'Content-Type: application/json' ],
CURLOPT_POSTFIELDS => json_encode( [ 'secret' => 'PIN: 4821', 'expires' => 3600 ] ),
] );
$res = json_decode( curl_exec( $ch ), true );
echo $res['url'];
Large attachments (up to 10 GB)
Smaller attachments can go in the files field (base64, up to 25 MB, encrypted by the server). Larger files are encrypted on your side in chunks and sent directly to storage through signed links – the Kriptano server never sees the content or the key. If the connection drops, request new links only for the missing chunks.
POST https://kriptano.com/kx-api/uploads (Authorization: Bearer kx_live_…)
{ "files": [ { "size": 734003200 } ] }
→ { "chunk": 16777216, "tag": 16, "ttl": 10800,
"uploads": [ { "id": "…", "token": "…", "parts": 44, "urls": [ "https://…", … ] } ] }
PUT urls[n-1] ← encrypted chunk n (chunk + 16 B; the last one may be shorter)
POST https://kriptano.com/kx-api/uploads/{id}/urls { "token": "…", "parts": [7, 8] } (new links)
POST https://kriptano.com/kx-api/uploads/{id}/complete { "token": "…" }
POST https://kriptano.com/api/v1/secrets
{ "ciphertext": "v1.…", "auth": "…", "uploads": [ { "id": "…", "token": "…" } ] }
Format: each chunk is AES-256-GCM with the file key (256 bits), nonce = 3 zero bytes ‖ chunk index (64 bits, big-endian) ‖ 1 byte (1 for the last chunk), AAD = “kriptano-file-v1”. The file key and file data (id, name, type, size, chunk size) go into the encrypted secret content as {"f":[{"v":2,"id","n","m","s","k","c"}]}. Reference implementation: assets/js/files.js.
Email delivery
With deliver_to, Kriptano sends the link to the recipient itself – from your email domain or through your SMTP server (Pro Plus), otherwise from a Kriptano address. The key is in the link, so the email is sent only when the server knows it (plain text); for secrets encrypted on your side, send the link yourself. The response contains delivered and, if sending failed, delivery_error – the secret is created anyway.
POST https://kriptano.com/api/v1/secrets
{ "secret": "VPN: user / password", "expires": 86400,
"deliver_to": [ "anna@client.com" ], "deliver_note": "Access for the new office." }
→ { "id": "…", "url": "https://…/s/…#…", "delivered": true, … }
POST https://kriptano.com/api/v1/requests
{ "label": "FTP access", "public_key": "…", "deliver_to": [ "mark@client.com" ] }
Secret requests
A request encrypts the responses with your public RSA key. You generate the key pair yourself; the private key stays with you and you use it to decrypt the responses.
POST https://kriptano.com/api/v1/requests
{ "label": "FTP access", "instructions": "Please send the host, username and password.",
"public_key": "<SPKI RSA-OAEP 2048, base64url>", "expires_days": 14, "max_responses": 1 }
GET https://kriptano.com/api/v1/requests/{id}/responses
→ [ { "id": "…", "ciphertext": "r1.<RSA-OAEP(AES key)>.<iv>.<AES-GCM ciphertext>", "created_at": "…" } ]
Audit log
Your account’s events (Pro, Pro Plus) for a SIEM or archive: period (from, to), type, up to 500 per page. The log never contains the content of secrets, keys or links; the country comes from a local geolocation database. The same data as the CSV: My account → Audit log → Export CSV.
GET https://kriptano.com/api/v1/log?from=2026-11-01&to=2026-11-30&type=secret_viewed&page=1&per_page=100
→ [ { "id": 812, "time": "2026-11-08T09:14:02+00:00", "type": "secret_viewed", "event": "Secret opened",
"user": null, "country": "HR", "object_id": "…", "message": "…" } ] (X-Total-Count: 37)
Webhooks
Pro and Pro Plus: add an HTTPS URL under My account → Webhooks and choose events. Kriptano sends a JSON POST right after the event; the secret’s content, key and link are never included (the server does not have them).
Events: secret.created, secret.viewed, secret.locked, secret.deleted, secret.expired, request.created, request.answered, team.member_joined, team.member_removed, ping.
POST https://example.com/hooks/kriptano
Content-Type: application/json; charset=utf-8
Kriptano-Event: secret.viewed
Kriptano-Delivery: evt_3kT9…
Kriptano-Signature: t=1762770000,v1=5f2c…e91a
{ "id": "evt_3kT9…", "type": "secret.viewed", "created": "2026-11-10T09:14:02Z",
"data": { "secret": { "id": "Qm7x…", "label": "Hosting – client Smith", "status": "burned",
"views": 1, "max_views": 1, "has_passphrase": true, "files": false, "source": "web",
"created_at": "…", "expires_at": "…", "viewed_at": "…" },
"viewer": { "country": "HR" } } }
Verify the signature: HMAC-SHA256 over “t.body” with the whsec_… secret must equal v1, and t must not be older than 5 minutes. Use the raw request body (before JSON parsing).
// Node.js
const crypto = require('crypto');
function verify(rawBody, header, secret) { // header = req.headers['kriptano-signature']
const p = Object.fromEntries(header.split(',').map(s => s.split('=')));
if (Math.abs(Date.now() / 1000 - Number(p.t)) > 300) return false;
const mac = crypto.createHmac('sha256', secret).update(p.t + '.' + rawBody).digest('hex');
return crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(p.v1));
}
# PHP
$p = []; parse_str(str_replace(',', '&', $_SERVER['HTTP_KRIPTANO_SIGNATURE']), $p);
$ok = abs(time() - (int) $p['t']) <= 300
&& hash_equals(hash_hmac('sha256', $p['t'] . '.' . file_get_contents('php://input'), $secret), $p['v1']);
Respond with a 2xx status within 10 seconds. On errors or timeouts we retry after 1 min, 5 min, 30 min, 2 h, 6 h and 12 h; status 410 stops delivery. After 50 consecutive failures the webhook is disabled. The same event may arrive twice – use the id field (Kriptano-Delivery) to deduplicate.
Errors
| HTTP | Description |
|---|---|
| 400 | Invalid data (message in the "message" field). |
| 401 | Missing or invalid API key. |
| 402 | The plan does not include the API. |
| 403 | Plan limit exceeded (lifetime, number of views, attachments). |
| 404 / 410 | The secret does not exist, has been opened or has expired. |
| 413 | The content is too large. |
| 429 | Too many requests or the monthly quota has been used up. |
Integrations
When to use the REST API
The integration is for teams that send passwords from their own systems: a helpdesk sending a temporary password, a CRM delivering credentials to a new client, or a script that sends a one-time link after provisioning a server.
You can encrypt the secret yourself (Web Crypto, AES-256-GCM – see the MDN documentation) and send only the ciphertext, or send plain text over HTTPS and the server encrypts it in the same format and never stores the key.
Create an API key in My account on the Pro and Pro Plus plans (compare plans). Secrets you create count towards the plan’s monthly quota.
The response contains the link with the key after the #, the expiry and the number of remaining views. You pass the link to the user like any other – by email, message or in your app’s interface. When the user opens the secret, the ciphertext is deleted and your list of secrets shows it as opened.
A secret request works the other way round: your system creates a link where the client enters the data, and the response is encrypted with a public key you generated on your side. That way the responses stay unreadable to everyone except you.
Enter the secret
Encrypted in the browser
Send the link
Opened once, then gone