Base URL
https://app.dmu.email/api/v1
Authentication
Bearer dmk_… API key
Rate limit
120 requests a minute per key

Introduction

The DMU Mail API lets your own software read and send your organisation’s mail, with no IMAP connection to keep alive, no MIME to take apart and no threading rules to get right.

What it covers

What people do with mail in DMU Mail, a program can do too: list conversations and read them, reply, write and send, schedule, label, assign and close. It can also connect mailboxes and import their history, so bringing on a new client can be a script.

Call it from your server, not from a web page. It sends no CORS headers, and a key in a web page is a key anyone can read.

Conventions

  • Requests and responses are JSON. Send Content-Type: application/json with a body.

  • A response wraps its result in data. A failure is an error with a code and a message: see Errors.

  • Times are ISO 8601 strings, in UTC when they come back, such as 2026-09-27T09:02:31.000Z.

  • Ids are UUIDs. The examples on these pages shorten them to eight characters.

  • HTML you send is sanitised before it’s stored. HTML you read has been too, but it was still written by whoever sent the mail.

  • /api/v1 is a contract with you. The rest of /api/* is for DMU Mail’s own screens and changes without notice, so don’t build on it.

Your first request

Find the mailbox to send from, write a draft and send it. You’ll need a key, which Authentication explains, and jq for this example.

Shell

KEY="dmk_…"
API="https://app.dmu.email/api/v1"

# The mailbox to send from.
MAILBOX=$(curl -s $API/mailboxes -H "Authorization: Bearer $KEY" \
  | jq -r '.data[] | select(.email == "info@aegeanfreight.gr") | .id')

# A draft, then the send.
DRAFT=$(curl -s -X POST $API/drafts \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{ "mailboxId": "'$MAILBOX'", "to": ["maria@example.com"],
        "subject": "Your order", "bodyHtml": "<p>It’s on its way.</p>" }' \
  | jq -r .data.id)

curl -s -X POST $API/drafts/$DRAFT/send -H "Authorization: Bearer $KEY" | jq .data

A draft keeps its id when it’s sent, so Get a message with the same id then shows it going: queued, sending, then sent, or failed with the reason.

Not here yet

So that you don’t design around something that doesn’t exist:

  • People. Inviting and removing people isn’t in the API.

  • A sandbox. Mail you send through the API really goes, so try things with a Read only key, or a mailbox of your own.

  • Keys for one mailbox. A key reaches every mailbox its owner can, which is worth knowing before you put one in a contact form.