{"name":"e2email","baseUrl":"https://e7i6x46c.vibecode.cloud","human":"/docs/api","llm":"/docs/llm/api.md","endpoints":[{"group":"Sign-in","method":"POST","path":"/api/authlock/session","auth":"none (same-origin)","summary":"Exchange an AuthLock widget handoff code for a session.","body":"{ code, next? }","response":"{ token, csrf, redirectTo }","notes":"The email must be verified at AuthLock. The token is also set as the e2sid cookie; native apps send it as Bearer."},{"group":"Sign-in","method":"DELETE","path":"/api/authlock/session","auth":"session","summary":"Sign out of this service.","response":"{ ok }"},{"group":"Sign-in","method":"POST","path":"/api/authlock/webhook","auth":"authlock-signature","summary":"AuthLock events (blocked/deleted users are signed out everywhere).","response":"{ ok }"},{"group":"Account","method":"GET","path":"/api/me","auth":"session","summary":"The signed-in user, public key and change cursor.","response":"{ user, seq, unlockedOnServer, sessions }"},{"group":"Account","method":"POST","path":"/api/identity","auth":"session","summary":"Upload the identity key made on the device (passphrase-wrapped).","body":"{ publicKey, wrappedKey }","response":"{ ok, fingerprint }","notes":"Only when the account has no key yet, or within 10 minutes of signing in with { replace: true }."},{"group":"Mailboxes","method":"GET","path":"/api/saas/mailboxes","auth":"session","summary":"WorkflowEmail mailboxes this user can reach.","response":"{ mailboxes: [{ address, canSend, lastSync, error }] }"},{"group":"Mailboxes","method":"POST","path":"/api/saas/mailboxes/refresh","auth":"session","summary":"Ask WorkflowEmail again (after being added to a domain).","response":"{ ok, reason?, mailboxes }"},{"group":"Mail","method":"GET","path":"/api/sync?since=<seq>","auth":"session","summary":"Changes since a cursor — messages, threads, labels, contacts, accounts.","response":"{ changes, deleted, seq, more }"},{"group":"Mail","method":"POST","path":"/api/ops","auth":"session","summary":"Idempotent batch of operations (flags, labels, send, draft, contacts, settings).","body":"{ ops: [{ id, kind, payload }] }","response":"{ results, seq }","notes":"send/draft carry an envelope already encrypted on the device."},{"group":"Mail","method":"POST","path":"/api/fetch","auth":"session","summary":"Pull new mail from WorkflowEmail now and flush the outbox.","response":"{ results, sent }"},{"group":"Mail","method":"GET","path":"/api/search?q=","auth":"session","summary":"Search headers (bodies are encrypted; search them on the device).","response":"{ items }"},{"group":"Keys","method":"GET","path":"/api/keys?address=a@x,b@y","auth":"session","summary":"Find public keys for recipients and file them as contacts.","response":"{ found: [{ address, fingerprint, source }] }"},{"group":"Keys","method":"GET","path":"/.well-known/e2email/keys?address=","auth":"none (rate limited)","summary":"Public key directory for users of this service.","response":"{ address, publicKey, fingerprint }","notes":"Point another e2email server here with E2E_KEY_DIRECTORY to encrypt to our users."},{"group":"Service","method":"GET","path":"/healthz","auth":"none","summary":"Liveness.","response":"{ ok }"}]}