Server — Selected API Endpoints
This page highlights commonly used endpoints; it is not a complete API reference and does not describe every request or response body. The server router is authoritative. Native-client wire contracts are documented in the server repository and must be updated with compatible client changes.
Auth
POST /api/auth/loginGET /api/auth/login-params— per-account salt and work factor so the client can derive the auth secret; answers the same for unknown usersGET /api/auth/captcha-configGET /api/auth/mePOST /api/auth/logoutPOST /api/auth/password
Multi-factor authentication
GET /api/mfa/statusPOST /api/mfa/totp/setupPOST /api/mfa/totp/confirmPOST /api/mfa/totp/disablePOST /api/mfa/recovery-codes/regeneratePUT /api/mfa/push/enabledPOST /api/auth/mfa/totpandPOST /api/auth/mfa/recovery-code(login-time verification)POST /api/auth/mfa/push/poll,POST /api/auth/mfa/push/finish,POST /api/mfa/push/respond(push-approval sign-in)
User management (admin only)
GET|POST /api/usersPUT /api/users/{id}(change role)POST /api/users/{id}/reset-passwordPOST /api/users/{id}/deactivatePOST /api/users/{id}/reactivatePOST /api/users/{id}/clear-mfa
Runtime
GET /api/status— includesclientIpandproxyHeadersTrustedGET /api/healthPOST /api/health/repair(admin)POST /api/admin/mail/poll-now(admin)GET /api/setup(whether initial admin setup finished)GET /pickup/{id}?t=<token>(single-use mobile pickup link)
Config and data
GET|PUT /api/config(GET hidesredaction.patternsfor non-admins; PUT is admin only)GET /api/labelsGET /api/decisions(caller own decisions)GET|PUT /api/tuning(caller own prompt)
IMAP and inbox
GET|POST|DELETE /api/imap/configPOST /api/imap/testGET /api/inbox?limit=500&mailbox=<name>POST /api/inbox/actions(bulk read, archive, spam, delete, move)GET|POST|PUT|DELETE /api/inbox/foldersGET /api/mail/search
POST /api/mail/send— optionalattachments: [{name, mimeType, dataBase64}](25 MB total), optionalencryptandsign; ifencryptis true and a recipient lacks a usable key, the call fails with 409 unlessallowPickupFallbackis setPOST /api/mail/draft(same attachments shape)GET /api/mail/attachments?mailbox=&messageId=(list metadata)GET /api/mail/attachment?mailbox=&messageId=&index=(download one)
Filter Rules (caller own rules)
GET|POST /api/rulesPUT|DELETE /api/rules/{id}POST /api/rules/reorderGET|PUT /api/rules/{id}/sieve(raw Sieve)POST /api/rules/run(run on demand)
PGP
POST /api/pgp/identity/generateandPOST /api/pgp/identity/importGET|DELETE /api/pgp/identityGET /api/pgp/keyserver/lookup(keys.openpgp.org)POST /api/pgp/recipients/check(key status before send)GET /api/pgp/qr/tokenandGET /api/pgp/qr/key(QR key exchange)
Contacts
GET|POST /api/contactsGET|PUT|DELETE /api/contacts/{id}POST /api/contacts/dedupeGET /api/contacts/searchPOST /api/contacts/bulk-deleteGET /api/contacts/exportandPOST /api/contacts/importGET|POST|DELETE /api/contacts/dav-passwordGET|POST|DELETE /api/contacts/carddav-client/configandPOST /api/contacts/carddav-client/syncPOST|GET|DELETE /api/contacts/{id}/photoPOST /api/contacts/{id}/selfGET|POST /api/contacts/sync(mobile two-way sync; pairing token authenticates)
Groups
GET|POST /api/groupsPUT|DELETE /api/groups/{id}
CardDAV server
/.well-known/carddav/dav/...(per-user DAV password authenticates)
Notifications (scoped to signed-in user)
GET|PUT /api/notifications/preferencesGET /api/notifications/vapid-public-keyPOST|DELETE /api/notifications/subscriptionsPOST /api/notifications/testGET /api/notifications/pairingPOST /api/notifications/native/registerGET|DELETE /api/notifications/native/devicesPOST /api/notifications/native/unpair
Logs (admin only)
GET /api/logs?file=<name>.log&lines=<n>GET /api/logs/list
Wire contracts used by mobile clients
The Mac lists the relay endpoints that mobile clients rely on. It points to Mobile_Mail_Relay.md and Mobile_Contact_Sync.md as the reference. The list there:
GET /api/inbox—{tabs, byTab, cursor, delta, removed}GET /api/inbox/folders?parent=— full paths likeINBOX/ReceiptsPOST /api/inbox/actionsPOST /api/mail/send— comma-joined recipientsPOST /api/mail/draftGET /api/pgp/bootstrap—hasIdentity,protectionPOST /api/pgp/recipients/check(contacts-only preflight)GET/POST /api/contacts/sync(cursor-based)GET /api/pgp/qr/tokenandGET /api/pgp/qr/key?t=POST /api/notifications/native/register
What this page does not add
- No schema for bodies or errors beyond the notes above.
- No auth header format beyond pairing-token query params where noted.
- No rate limits or pagination details.