Skip to content
Developer platform · API v1

Build email into your product

Send, receive, inspect, and automate mailbox activity without sharing dashboard or Webmail sessions with your application.

One integration, one tenant

Every API key belongs to one developer application and one customer organization. The tenant comes from the credential and cannot be selected through request data.

  • Owner creates applications, API keys, and webhook secrets
  • Admin can inspect activity and retry delivery failures
  • Mailbox users never share their mailbox password: they create app passwords in Webmail for the Mailbox API

Two ways to connect

Choose by how much the integration should reach. Both use the same base URL, limits and error envelope.

  • Organization API key (full control): the Owner issues an mdk_live_ key in Dashboard → Integrations. It reaches every mailbox of the organization within its scopes, or only the domains and mailboxes its application is limited to, and adds domains, events and webhooks. Use it for your own backend.
  • Mailbox API (one mailbox): the mailbox user creates an app password in Webmail → Settings → API access. The integration signs in with the mailbox address and that app password, gets a session token, and can only use that mailbox: search, folders, unread, drafts, replies in the same conversation and attachments. Use it for an assistant or tool that works for one person. See the Mailbox API guide.

End-to-end integration lifecycle

Create a sandbox application in Dashboard → Integrations, issue a least-privilege key, call the API from a trusted server, register a webhook, complete its challenge handshake, and reconcile deliveries with GET /v1/events. Promote by creating separate production credentials; sandbox and production secrets are never interchangeable.

  • API key prefixes identify sandbox (mdk_test_) or production (mdk_live_) credentials
  • The complete API key and whsec_ webhook secret are each revealed only once
  • Every request, event, delivery, and replay remains tenant-scoped and auditable

Get the base URL and a production key

Only the organization Owner can create credentials, from Dashboard → Integrations. A key reaches every mailbox of that organization within the scopes it was issued with, unless its application is limited to some domains or mailboxes.

  • 1. The production base URL is https://api.omnero.app (also shown in the “Connect to the API” panel). Save it as OMNERO_API_URL; every path in this documentation, such as /v1/mailboxes, goes after it.
  • 2. Under “New application”, create an application with the Production environment. Use Sandbox for tests: its keys start with mdk_test_. Under Access, pick domains and/or mailboxes to limit it; pick none for the whole organization.
  • 3. Under “New API key”, choose that application and tick the scopes you need. Reading and replying to mail usually needs mailboxes:read, messages:read, messages:write, messages:send, attachments:read and attachments:write.
  • 4. Click “Issue key”. The full mdk_live_ key appears once: download it and store it in your server’s secret manager as OMNERO_API_KEY. Omnero cannot show it again; if it is lost, issue a new key and revoke the old one.
  • 5. Check the connection with GET /v1/mailboxes.
                        curl "$OMNERO_API_URL/v1/mailboxes" \
  -H "Authorization: Bearer $OMNERO_API_KEY"
                      

Start with the TypeScript SDK

Pass the base URL (https://api.omnero.app) explicitly. Store API keys in server-side secret storage and never ship them to a browser.

                        import { OmneroMail, OmneroMailError } from '@omnero/mail-sdk';

const omnero = new OmneroMail({
  apiKey: process.env.OMNERO_API_KEY!,
  baseUrl: process.env.OMNERO_API_URL!,
});

const { items } = await omnero.mailboxes.list();
                      

SDK surface and transport behavior

Omnero Mail accepts an explicit baseUrl, API key, and optional fetch implementation. The SDK provides mailboxes.list, domains.list, messages.list/retrieve/send/update, events.list, and webhook endpoint, delivery, and replay methods. Non-2xx responses throw OmneroMailError with status, stable code, and requestId.

                        try {
  const page = await omnero.messages.list({ mailboxId, limit: 50 });
  await omnero.messages.update(page.items[0].id, {
    mailboxId,
    isRead: true,
  });
} catch (error) {
  if (error instanceof OmneroMailError) {
    console.error(error.status, error.code, error.requestId);
  }
}
                      

REST and event surfaces stay consistent

Use REST for commands and reconciliation. Use signed webhooks for low-latency notification. Both surfaces refer to the same canonical messages and delivery states.

  • OpenAPI 3.1 contract at /openapi.yaml
  • Cursor-based lists at /v1/messages and /v1/events
  • At-least-once webhooks with event ID deduplication

Canonical processing path

POST /v1/messages checks that the mailbox belongs to you and that your plan has capacity, reserves the idempotency key, queues the message, and returns 202. Omnero Mail then sends it and publishes canonical events as its status changes. Webhooks notify; GET /v1/messages and GET /v1/events provide reconciliation when a consumer was offline.

Resource and endpoint map

The v1 surface exposes mailbox and domain discovery, cursor-paginated messages, message state mutations, attachment upload/download, canonical events, webhook endpoints, delivery inspection, and replay. Consult the OpenAPI 3.1 document for request schemas, status codes, and the stable error envelope.

  • GET /v1/mailboxes and /v1/domains discover tenant-owned resources
  • GET/POST /v1/messages and GET/PATCH /v1/messages/{messageId} operate mail; the Read mail guide documents every response field
  • /v1/mailbox/* is the Mailbox API: one mailbox, opened with an app password (see the Mailbox API guide)
  • POST /v1/attachments/uploads, POST /v1/attachments/uploads/{uploadId}/complete and GET /v1/attachments/{attachmentId}/download-url transfer attachments
  • GET /v1/events restores event history after downtime
  • GET/POST /v1/webhook-endpoints plus delivery list/replay operate webhooks
OpenAPI 3.1 contractVersioned route and schema source.
Download YAML
Can an API key access another organization?

No. The organization is derived from the key. Tenant identifiers supplied by a caller are ignored or rejected.

Should I expose a Omnero Mail API key in frontend code?

No. API keys are server-to-server credentials. Call Omnero Mail from your backend and expose only the minimum data your frontend needs.

Next step

Create the first mailbox at no cost.

Start freeLog in