ShrouDB
Notify people whose contact details you store encrypted

Courier

Delivery to encrypted recipients.

If recipient addresses are encrypted, something still has to decrypt them to send a message. Courier decrypts the recipient at the moment of delivery, sends through a configured channel, and discards the plaintext. Your application never handles the decrypted address. In Moat, Courier delivers to HTTPS webhooks.

Use it from your app

terminal
# The recipient is Cipher ciphertext, saved when the customer signed up
$ curl -s localhost:8200/v1/courier \
    -H "Authorization: Bearer $APP_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"args":["DELIVER","CHANNEL","customer-webhooks",
                 "RECIPIENT","'"$ENCRYPTED_URL"'",
                 "BODY","{\"event\":\"invoice.paid\"}"]}'

What it does

  • Recipients stay encrypted until the moment of delivery.
  • Plaintext is discarded as soon as the message is sent.
  • Delivery receipts and per-channel metrics.
  • HTTPS webhook channels in Moat.

Turn it on

Courier runs inside Moat, the ShrouDB server. Add this to moat.tomland restart. It shares Moat's encrypted storage, access tokens, and audit log with the other engines.

moat.toml
[engines.courier]
enabled = true   # uses Cipher, which must also be enabled

Commands

Over RESP3, prefix each command with COURIER. Over HTTP, send POST /v1/courier {"args": [...]}. The SDKs have a method for each.

CommandArgsDescription
CHANNEL CREATE<name> <type> <json>Configure a channel
DELIVERCHANNEL <c> RECIPIENT <ct> BODY <b> | <json>Decrypt the recipient and send
DELIVERY GET<id>Fetch a delivery receipt
DELIVERY LIST[CHANNEL <name>]List receipts
METRICSSuccess and failure counts
Try Courier locally
The quickstart takes about five minutes.