Quickstart

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:

encryptCan encrypt secrets, cannot decrypt. Suits write-path services.
decryptCan decrypt secrets, cannot encrypt. Suits read-path services.
encrypt + decryptCan do both. Handy for development and testing.

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:

Headers
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.

Request
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"}'
Response (200 OK)
{
    "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.

Request
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="}'
Response (200 OK)
{
    "secret": "My Very Secret Message"
}

Errors

Send Accept: application/json so errors come back as JSON.

Status Meaning
401Missing, invalid or revoked token.
403The token lacks the required ability (for example, decrypting with an encrypt-only key).
404The ciphertext refers to a key that does not belong to your account.
422Validation 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.
429Rate limited. Wait and retry.