What Is JMAP and How to Use It with Mailbux (Modern Email API Guide)

What Is JMAP and How to Use It with Mailbux (Modern Email API Guide)

If you have ever tried to build an email client, automate inbox processing, or sync messages across devices programmatically, you know how painful IMAP can be. The protocol dates back to 1986, relies on a custom text-based command language, and was never designed for the modern web. JMAP (JSON Meta Application Protocol) is the open standard built to replace it — and every Mailbux — Free unlimited business email hosting for your business. Sign up now account supports it out of the box.

What Is JMAP?

JMAP stands for JSON Meta Application Protocol. It is an IETF standard (RFC 8620 for the core protocol, RFC 8621 for the mail extension) that provides a modern, efficient way to access and manage email over HTTPS using JSON. Think of it as a RESTful-style API for your mailbox — but purpose-built for email, calendars, and contacts.

Instead of opening a persistent TCP connection and speaking a line-based command language (like IMAP), JMAP uses simple HTTP POST requests with JSON payloads. Every modern programming language has native HTTP and JSON support, which means you can interact with your email using the same tools and libraries you already use for web APIs.

Key characteristics of JMAP:

  • Stateless HTTP requests — no persistent connections to manage
  • JSON payloads — human-readable, easy to parse in any language
  • Batched operations — send multiple method calls in a single request
  • Built-in push notifications — real-time updates via EventSource or push subscriptions
  • Efficient delta sync — fetch only what changed since your last sync, not the entire mailbox state

JMAP vs IMAP: A Direct Comparison

The differences between JMAP and IMAP are significant, especially for developers building email-integrated applications and for mobile users who care about battery life and bandwidth.

Feature JMAP IMAP
Data formatJSON over HTTPSCustom text protocol over TCP
Connection modelStateless HTTP requestsPersistent TCP connection required
Bandwidth efficiencyDelta sync — fetches only changesOften re-downloads entire folder lists
Push notificationsNative EventSource / push subscriptionsIDLE command (limited, one folder at a time)
Mobile battery impactLow — no open connection neededHigh — persistent connection drains battery
BatchingMultiple operations in one requestOne command at a time per connection
Protocol complexitySimple — standard HTTP + JSONComplex — requires specialized parser
Firewall friendlyYes — uses standard HTTPS (port 443)Often blocked (port 993)
Sending emailBuilt-in (EmailSubmission)Requires separate SMTP connection

The bottom line: JMAP does everything IMAP does, but with less bandwidth, less battery drain, simpler code, and built-in push — all over a protocol every developer already knows (HTTPS + JSON).

How Mailbux Supports JMAP

Every Mailbux account gets full JMAP access automatically. There is no extra configuration, no add-on to enable, and no additional cost. When you create an email account in your Mailbux dashboard, JMAP is ready to use immediately alongside IMAP, POP3, and SMTP.

Your JMAP endpoint is:

https://my.mailbux.com/jmap/

Authentication: Use HTTP Basic authentication with your full email address and password. OAuth is also supported for applications that require token-based access.

The JMAP endpoint supports the full urn:ietf:params:jmap:mail capability, including:

  • Mailbox — list, create, rename, and delete folders
  • Email — search, fetch, move, delete, and flag messages
  • EmailSubmission — send email directly through JMAP (no SMTP needed)
  • Thread — conversation threading
  • SearchSnippet — server-side full-text search with highlighted results
  • VacationResponse — manage out-of-office auto-replies

Code Examples: Using JMAP with Mailbux

Discover JMAP Capabilities (Session Object)

The first step when connecting to any JMAP server is to fetch the session object, which tells you what capabilities are available and gives you the API URL.

curl -s -u "you@yourdomain.com:your-password" \
  https://my.mailbux.com/jmap/ | python3 -m json.tool

This returns a JSON session object containing your account ID, API URL, and supported capabilities.

List All Mailboxes

Once you have your account ID from the session object, you can list all mailboxes (folders) in your account:

curl -s -u "you@yourdomain.com:your-password" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
    "methodCalls": [
      ["Mailbox/get", {
        "accountId": "YOUR_ACCOUNT_ID"
      }, "0"]
    ]
  }' \
  https://my.mailbux.com/jmap/api/ | python3 -m json.tool

The response includes every mailbox with its name, role (inbox, sent, drafts, trash, etc.), unread count, and total message count — all in a single request.

Search for Emails

JMAP makes searching trivial. Here is how to find the 10 most recent emails in your inbox:

curl -s -u "you@yourdomain.com:your-password" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
    "methodCalls": [
      ["Email/query", {
        "accountId": "YOUR_ACCOUNT_ID",
        "filter": {"inMailbox": "INBOX_MAILBOX_ID"},
        "sort": [{"property": "receivedAt", "isAscending": false}],
        "limit": 10
      }, "0"],
      ["Email/get", {
        "accountId": "YOUR_ACCOUNT_ID",
        "#ids": {"resultOf": "0", "name": "Email/query", "path": "/ids"},
        "properties": ["subject", "from", "receivedAt", "preview"]
      }, "1"]
    ]
  }' \
  https://my.mailbux.com/jmap/api/ | python3 -m json.tool

Notice how both the query and the fetch happen in a single HTTP request with back-references. With IMAP, this would require multiple round trips. With JMAP, one POST does it all.

Send an Email via JMAP

You can send email directly through JMAP without touching SMTP. This is especially useful for automated systems and custom applications:

curl -s -u "you@yourdomain.com:your-password" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "using": ["urn:ietf:params:jmap:core",
              "urn:ietf:params:jmap:mail",
              "urn:ietf:params:jmap:submission"],
    "methodCalls": [
      ["Email/set", {
        "accountId": "YOUR_ACCOUNT_ID",
        "create": {
          "draft1": {
            "from": [{"name": "Your Name", "email": "you@yourdomain.com"}],
            "to": [{"name": "Recipient", "email": "recipient@example.com"}],
            "subject": "Hello from JMAP!",
            "textBody": [{"value": "This email was sent using the JMAP API on Mailbux.", "type": "text/plain"}],
            "mailboxIds": {"DRAFTS_MAILBOX_ID": true}
          }
        }
      }, "0"],
      ["EmailSubmission/set", {
        "accountId": "YOUR_ACCOUNT_ID",
        "create": {
          "send1": {
            "emailId": "#draft1",
            "envelope": {
              "mailFrom": {"email": "you@yourdomain.com"},
              "rcptTo": [{"email": "recipient@example.com"}]
            }
          }
        }
      }, "1"]
    ]
  }' \
  https://my.mailbux.com/jmap/api/ | python3 -m json.tool

One request creates the email and submits it for delivery. No separate SMTP connection. No port 587. Just HTTPS and JSON.

Use Cases for JMAP

JMAP opens up possibilities that are difficult or impractical with IMAP:

  • Custom email applications — build a web or mobile email client using standard web technologies. No IMAP parsing library needed.
  • Email automation — process incoming emails, auto-categorize, extract data, or trigger workflows using simple HTTP calls from any language.
  • CRM and helpdesk integrations — sync customer emails into your business tools in real time using JMAP push notifications.
  • Mobile apps — JMAP’s efficient delta sync and push notifications mean better battery life and faster sync compared to IMAP IDLE.
  • IoT and embedded devices — any device that can make HTTPS requests can now send and receive email via JMAP.
  • Backup and migration scripts — programmatically export or import email using a clean, well-documented JSON API.

Which Email Clients Support JMAP?

JMAP adoption is growing steadily. Here are some notable clients and libraries that support the protocol:

  • Fastmail — one of the original JMAP implementors; their web and mobile apps use JMAP natively
  • Cyrus IMAP — the Cyrus project includes a full JMAP implementation
  • Ltt.rs — an open-source Android email client built entirely on JMAP
  • JMAP client libraries — available for Python (jmapc), JavaScript (jmap-client-ts), Rust (jmap-client), Java, Go, and more
  • Custom applications — any HTTP client in any language works with JMAP, making it the easiest protocol to integrate

Even if your primary email client still uses IMAP, you can use JMAP alongside it for automation, integrations, and programmatic access. Both protocols access the same mailbox data on Mailbux.

Why JMAP Matters for Developers and Businesses

For developers, JMAP eliminates the need to learn a 40-year-old protocol with quirky parsing rules. You already know HTTP. You already know JSON. That is all JMAP requires. No more wrestling with IMAP flags, FETCH responses, or MIME boundary parsing on the client side.

For businesses, JMAP means:

  • Faster integrations — connect your email to internal tools in hours, not weeks
  • Lower development costs — standard web technologies mean any developer can build email integrations, not just email protocol specialists
  • Better mobile experience — JMAP-powered apps are faster, use less data, and drain less battery
  • Real-time capabilities — push notifications mean instant email alerts without polling
  • Future-proof infrastructure — JMAP is an IETF standard backed by the same organization that standardized HTTP and email itself

Getting Started with JMAP on Mailbux

Here is how to start using JMAP with your Mailbux account today:

  1. Create your account — sign up at Mailbux — Free unlimited business email hosting for your business. Sign up now if you do not have one yet
  2. Add your domain and create an email address from your Mailbux dashboard
  3. Fetch the session objectGET https://my.mailbux.com/jmap/ with Basic auth
  4. Start making API calls — use the API URL and account ID from the session to query mailboxes, search emails, and send messages

No API keys to generate. No SDK to install. No webhooks to configure. Just HTTPS, JSON, and your email credentials.

Final Thoughts

JMAP is what email access should have been from the beginning — simple, efficient, and built on the same web standards developers use every day. It does not replace IMAP overnight, but for anyone building new email integrations, automations, or applications, JMAP is the clear choice.

Mailbux gives you JMAP access on every account, alongside full IMAP, SMTP, and POP3 support. Use whichever protocol fits your use case — or use them all. Your mailbox, your choice.

Ready to try JMAP? Create your free Mailbux account and start making API calls in minutes.