GET /auth/google/urlGET /auth/google/callback?code=...POST /auth/refreshPOST /orgsPOST /orgs/invitesPOST /orgs/invites/acceptPOST /orgs/api-keys- create scoped organization API key
GET /admin/organizationsGET /admin/domains?organization_id=<uuid>GET /admin/mailboxes?organization_id=<uuid>GET /admin/members?organization_id=<uuid>GET /admin/invites?organization_id=<uuid>GET /admin/api-keys?organization_id=<uuid>GET /admin/webhooks?organization_id=<uuid>
Notes:
organization_idis optional; when omitted, the API resolves to the first organization the user belongs to.- Each endpoint verifies organization membership before returning data.
GET /mail/mailboxes?organization_id=<uuid>GET /mail/folders?mailbox_id=<uuid>GET /mail/messages?folder_id=<uuid>&limit=50&offset=0GET /mail/messages/{messageID}
Notes:
- These endpoints return only resources the authenticated user can access through organization membership.
- Message listing supports pagination via
limitandoffset.
POST /push/devices/register- register/update a user device token
- platforms:
fcm,apns
POST /push/send- send notification to a user’s active devices
GET /domains/export?domain=example.com- returns ZIP backup
- includes metadata JSON and
.emlpayload files where available
POST /domains/import?domain=example.com- multipart field:
archive - imports ZIP backup into target domain
- multipart field:
Security:
- export/import now require both bearer auth and organization-domain access checks.
Auth:
X-API-Key: midemail_<prefix>_<secret>- or
Authorization: ApiKey midemail_<prefix>_<secret>
- or
Endpoints:
POST /v1/domains- create/update a domain for the API key’s organization
POST /v1/mailboxes- create/update mailbox in a domain
POST /v1/webhooks- register organization webhook URL and filters
POST /v1/mail/send- enqueue outbound mail payload
POST /v1/mail/receive- enqueue inbound mail payload
GET /autoconfig?domain=example.comGET /autoconfig.xml?domain=example.comGET/POST /autodiscover/autodiscover.xml?emailaddress=user@example.com
- Current API uses bearer JWT auth for protected routes.
/v1/*routes are API-key authenticated and scope-gated.- For large transfer operations, prefer async job wrapping in production deployments.