Get started in 3 steps
Make your first encryption and decryption call with the Zekreto API. No SDK required: just a REST client or curl.
Step 1: Create an API key
Log in and open the API keys page (log in first). Create a key and choose its permissions:
For production, prefer separate encrypt-only and decrypt-only keys per service, so a leaked key only exposes one side of the operation. The key is shown once when you create it and looks like 1|abc...; copy it somewhere safe.
Authentication
Send your key as a bearer token on every request, with a JSON body:
Authorization: Bearer <your-api-token> Content-Type: application/json Accept: application/json
Step 2: Encrypt a secret
POST to https://zekreto.com/api/encrypt with the secret in the JSON body. Secrets can be up to 255 characters.
curl -X POST https://zekreto.com/api/encrypt \
-H "Authorization: Bearer <your-api-token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"secret": "My Very Secret Message"}'{
"secret": "9aa09167-cb57-4615-ac0e-4ac47da349d0kJRb5E7emca60LcdMpkUZ0VPM1c5QmZmT0NiSUFJZ1R2SmFLWCtTSWNHbE5UVW90MUpVaXRSOWk4NVFHSkhBUzdYTkxGTFFSYnhyQzVWTHY="
}The returned value contains no plaintext. Store it wherever you like; only your account can decrypt it. Zekreto does not store or log the secret or the ciphertext.
Step 3: Decrypt a secret
POST the encrypted string to https://zekreto.com/api/decrypt to get the original back.
curl -X POST https://zekreto.com/api/decrypt \
-H "Authorization: Bearer <your-api-token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"secret": "9aa09167-cb57-4615-ac0e-4ac47da349d0kJRb5E7emca60LcdMpkUZ0VPM1c5QmZmT0NiSUFJZ1R2SmFLWCtTSWNHbE5UVW90MUpVaXRSOWk4NVFHSkhBUzdYTkxGTFFSYnhyQzVWTHY="}'{
"secret": "My Very Secret Message"
}Errors
Send Accept: application/json so errors come back as JSON.
| Status | Meaning |
|---|---|
| 401 | Missing, invalid or revoked token. |
| 403 | The token lacks the required ability (for example, decrypting with an encrypt-only key). |
| 404 | The ciphertext refers to a key that does not belong to your account. |
| 422 | Validation failed: secret is missing, is longer than 255 characters (or the ciphertext is longer than a maximum-length secret would produce), or could not be decrypted. |
| 429 | Rate limited. Wait and retry. |