Skip to main content

ZeqMail

ZeqMail replaces SMTP/IMAP with a ZID-routed inbox. There are no usernames or passwords — your mail address is your ZID, your authentication is your equation.

Auth flow

MethodPathPurpose
POST/api/mail/registerCreate a mail identity from an equation
POST/api/mail/loginGet a mail token for an existing ZID
GET/api/mail/healthPublic health check

Mailbox endpoints

All require a Bearer token from /login.

MethodPathPurpose
GET/api/mail/inboxReceived messages, sorted newest first
GET/api/mail/sentSent messages
GET/api/mail/starredStarred messages
GET/api/mail/trashTrash
GET/api/mail/contactsKnown correspondent ZIDs
GET/api/mail/statusInbox counts and quotas
POST/api/mail/starToggle a star on a message

Public-key directory

GET  /api/mail/pubkey/:zid
POST /api/mail/pubkey

pubkey/:zid is public — anyone can fetch a recipient's encryption key to send them mail without registering.

Message envelope

Every message carries:

{
"id": "...",
"fromZid": "...",
"toZid": "...",
"ciphertext": "hex",
"iv": "hex",
"tag": "hex",
"zeqond": 65392856,
"phase": 0.4127,
"sig": "hex"
}

The ciphertext is end-to-end encrypted with the recipient's pubkey. The server cannot read it.

curl

TOKEN=$(curl -s -X POST https://zeq.dev/api/mail/login \
-H "content-type: application/json" \
-d '{"equation":"sin(x)+cos(y)"}' | jq -r .token)

curl https://zeq.dev/api/mail/inbox -H "authorization: Bearer $TOKEN"