Browse docs +

Encryption

Normally Breeze, Apple, and Google can see the text of a notification while delivering it. With encryption, your script encrypts the content and only your iPhone can decrypt it. The format is compatible with Bark.

Set up a key#

In the app, open Settings → Encryption and choose:

Setting Options
Algorithm AES-128, AES-192, or AES-256. The key is 16, 24, or 32 characters
Mode GCM (recommended), CBC, or ECB
IV 12 characters for GCM, 16 for CBC, none for ECB

Generate a key in the app and copy it to your script. The key never leaves your phone otherwise. The app also shows a ready-to-run command that sends an encrypted test.

Send an encrypted notification#

  1. Write the parameters as JSON, for example {"title":"Server","body":"Disk usage is above 90%"}.
  2. Encrypt the JSON with your key and IV and encode the result in Base64. For GCM, append the 16-byte tag to the ciphertext before encoding.
  3. Send it as ciphertext. Send iv too if you change it per message.
cURL / Bash
KEY='YOUR_32_CHARACTER_KEY'   # AES-256
IV='YOUR_16_CHAR_IV'           # CBC
JSON='{"title":"Server","body":"Disk usage is above 90%"}'

CIPHERTEXT=$(printf '%s' "$JSON" | openssl enc -aes-256-cbc \
  -K "$(printf '%s' "$KEY" | xxd -p -c 256)" \
  -iv "$(printf '%s' "$IV" | xxd -p -c 256)" | base64 | tr -d '\n')

curl https://push.breezelabs.dev/v1/send \
  -H 'Authorization: Bearer YOUR_KEY' \
  --data-urlencode "ciphertext=$CIPHERTEXT" \
  --data-urlencode "iv=$IV"

With Python and AES-GCM:

python
import base64, json, os
from cryptography.hazmat.primitives.ciphers.aead import AESGCM

key = b'YOUR_32_CHARACTER_KEY'
iv = os.urandom(6).hex().encode()          # 12 characters, new for every message
payload = json.dumps({'title': 'Server', 'body': 'Disk usage is above 90%'}).encode()
ciphertext = base64.b64encode(AESGCM(key).encrypt(iv, payload, None)).decode()
# Send {"ciphertext": ciphertext, "iv": iv.decode()} to /v1/send

What stays visible#

Anything you send outside ciphertext, such as group or sound, is visible to the service. Put everything private inside the encrypted JSON. If the key or IV doesn't match, the phone shows “Decryption failed” instead of the content.

Encryption is available on iPhone. Android doesn't support it yet and answers HTTP 422.