mailakiBeta

Mailaki Documentation

Send transactional emails, receive inbound email, and manage deliverability — all through a simple REST API.

Quickstart

Get from zero to sending your first email in under 5 minutes.

1

Create an account

Sign up at mailaki.com/portal. You'll get an API key immediately.

2

Add and verify your domain

Go to Domains in the portal, add your domain, and configure the DNS records (DKIM, SPF, MX).

3

Send an email

Make a single API call to send your first email.

cURL
curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_id": "YOUR_DOMAIN_UUID",
    "from": "[email protected]",
    "to": ["[email protected]"],
    "subject": "Welcome to our app!",
    "html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
    "text": "Welcome! Thanks for signing up."
  }'

from can be a bare address or include a display name: "Your App <[email protected]>".

Send to an address you can check. Recipients on domains reserved for documentation and testing (example.com, .test, .invalid and similar) are refused, because they can never receive mail.

You'll get back a message ID confirming it's queued for delivery:

{
  "ids": ["0193abc0-1234-7000-8000-000000000001"],
  "status": "queued",
  "dropped": []
}

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer mf_live_your_api_key

You can also use the x-api-key header:

x-api-key: mf_live_your_api_key

Your API key is shown once when you create your account. You can create additional keys in the portal under API Keys.

Keep your API key secret. Never expose it in client-side code or commit it to version control.

Base URL

https://mailaki.com/v1

Test mode

A test key starts with mf_test_. Everything you send with it goes through the same validation, templates and events as a live send, but no email is delivered: the outcome is simulated. Test sends do not count against your plan.

Create a test key in the portal under API Keys (Mode: Test), or with the API:

curl -X POST https://mailaki.com/v1/keys \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "ci", "scopes": ["send", "read"], "environment": "test"}'

You can use a test key before your domain is verified: add the domain, and send from an address on it right away. It still has to be a domain on your account. A live key keeps refusing an unverified domain.

Then send as usual. With a test key, reserved addresses such as @example.com are accepted. The local part of the recipient picks the outcome (the domain does not matter):

RecipientEvents you receiveFinal status
[email protected]delivereddelivered
[email protected] or bounced@bounced (hard)bounced
[email protected]deferred, then about 10 seconds later bounced (soft)bounced
[email protected] or complained@delivered, then complaineddelivered
[email protected]deferred, then about 10 seconds later delivereddelivered
[email protected]none: the send itself is rejected with 422 (validation_error) and nothing is queued-
any other addressfrom the outcome mix below if the send has one, else delivered

Outcome mix. To test how your code copes with a realistic share of failures, add the header X-Mailaki-Test-Outcomes to a test send. Each recipient without one of the addresses above gets an outcome picked by weight; the addresses above keep theirs.

"headers": {"X-Mailaki-Test-Outcomes": "delivered=80, bounced=10, soft_bounced=2, complained=3, deferred=5"}

Names are delivered, bounced, soft_bounced, complained and deferred; a name without =n counts 1, weights are 0 to 1000. An unknown name is refused with 400. In a raw MIME message, write it as a header of the message.

Default mix per test key. To get the same mix on every send without adding the header, store it on the test key, on create or later. A send's own header still wins.

curl -X PATCH https://mailaki.com/v1/keys/KEY_ID \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"test_outcomes": "delivered=90, bounced=5, complained=5"}'

test_outcomes also takes an object ({"delivered": 90, "bounced": 10}), and null removes it. Only test keys can have one. The portal's API keys page has a Defaults button for it.

Opens and clicks. If the message has open or click tracking (on by default for HTML), a simulated delivery is followed by an opened event and a clicked event for the first tracked link (data.url).

curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer mf_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "domain_id": "YOUR_DOMAIN_UUID",
    "from": "[email protected]",
    "to": ["[email protected]"],
    "subject": "Sandbox",
    "text": "This will bounce, on paper."
  }'
  • Simulated events go to your webhooks like real ones. Every event of a test message has "test": true in data (also a real open or click on it), so your handler can tell them apart. The message.sent event of the live stream has test too.
  • A simulated bounce or complaint does not add the address to your suppression list and does not count in your bounce or complaint rates.
  • GET /v1/messages, GET /v1/events and GET /v1/stats never mix live and test data. A test key sees test data; a live key sees live data. Add ?test=true or ?test=false to choose. In the portal, test messages are under Messages, Test messages.
  • You can send up to 10,000 test messages per calendar month. After that, test sends return 429 until the next month; live sending is not affected.
  • Your sending domain must still be verified, and from must be on it.
  • Test keys work with the HTTP API, the Mailgun bridge and the Postmark, Brevo, Mailjet, Resend, MailerSend, SparkPost, Mandrill and Amazon SES bridges (on the SES bridge, an access key pair created with "environment": "test"). SMTP does not have a test mode: SMTP login with a test key is refused.

Send your first email

Before sending, you need your domain_id. Find it in the portal under Domains, or via the API:

Get your domains
curl https://mailaki.com/v1/domains \
  -H "Authorization: Bearer mf_live_..."

Then send:

Send an email
curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "domain_id": "YOUR_DOMAIN_UUID",
    "from": "[email protected]",
    "to": ["[email protected]"],
    "subject": "Hello from Mailaki",
    "text": "This is a test email sent via the Mailaki API.",
    "html": "

This is a test email sent via the Mailaki API.

" }'

Send via JSON

POST /v1/messages

Request body

FieldTypeRequiredDescription
domain_idUUIDYesYour verified domain ID. If it is not one of your domains, the domain of the from address is used.
fromStringYesSender address (must match domain)
toString[]YesRecipient addresses
ccString[]NoCC recipients
bccString[]NoBCC recipients
subjectStringNoEmail subject
textStringNoPlain text body
htmlStringNoHTML body
headersObjectNoCustom email headers
tagsString[]NoTags for analytics and filtering: at most 10, each 1 to 128 characters, no control characters. More or longer tags are refused with 400. The same limit applies on /v1/messages/batch, /v1/messages/mime and to o:tag on /v1/messages/form.
scheduled_atISO 8601NoSchedule for later delivery. See Scheduled messages and resend.
template_idUUIDNoUse a stored template
variablesObjectNoTemplate variables
verifyBooleanNoVerify recipients first and drop the ones that are invalid or do_not_mail. See Email verification.
webhook_urlStringNoAlso post this message's events to this URL. See A webhook URL for one message.
certifyBooleanNoIssue a signed certificate per recipient. See Proof of Sending.
metadataObjectNoYour own key/value pairs (string values, up to 50 keys and 10,000 bytes). Kept with each message, returned by GET /v1/messages/:id and sent as data.metadata in the message's webhook events.

Response

{
  "ids": ["0193abc0-..."],
  "status": "queued",
  "dropped": []
}

If a recipient is on the suppression list, they'll appear in dropped with a reason.

Scheduled messages and resend

A message sent with scheduled_at waits in the queue until that time. Until it is picked up for delivery you can list it, move it or cancel it. Each recipient of a send is its own message with its own id.

RequestWhat it does
GET /v1/messages/scheduledYour scheduled messages that have not been sent, soonest first. limit (1 to 100) and after (the pagination.next_after of the previous page).
GET /v1/messages/:idOne message: status, attempt, last_error, scheduled_at, resent_from (the message it is a resend of), require_tls and test.
DELETE /v1/messages/:idCancels a message that has not been picked up for delivery. It is never sent and, if it was queued this month, no longer counts toward your monthly allowance. A cancelled event is recorded and sent to webhooks that subscribe to cancelled. Returns 409 if it is being delivered at that moment. On a message that is already finished, this deletes its record.
PATCH /v1/messages/:idBody {"scheduled_at": "..."}: a new time, in the future. Returns 409 once delivery has started.
POST /v1/messages/:id/resendQueues a failed message again. Returns the new message id and resent_from.
POST /v1/messages/resendBody {"ids": [...]}, up to 100 ids. Returns one result per id.
Cancel a scheduled message
curl -X DELETE https://mailaki.com/v1/messages/MESSAGE_ID \
  -H "Authorization: Bearer mf_live_..."

{"id": "MESSAGE_ID", "status": "cancelled", "scheduled_at": "2026-12-01T09:00:00Z", "usage_refunded": true}

What can be resent

  • Messages that bounced, were dropped, failed or were cancelled.
  • A delivered message only with {"force": true}.
  • Never a message that bounced because the address does not exist, and never to an address on your suppression list. The response says which (hard_bounced, recipient_suppressed).
  • Not a message that is still in the queue.

Resending the same message again while the first resend is still queued does not queue another copy: you get the earlier resend back with "already_resent": true (status 200). You can also send an X-Idempotency-Key header to make retries safe.

A resend is an exact copy of the stored message, counts as a send, and is checked against your plan limits like a new one. If the stored copy is no longer available the request is refused with body_unavailable.

Listing needs the read scope; cancelling, rescheduling and resending need send.

With a test key the list shows your test messages (or pass ?test=true / ?test=false). A resent test message is still a test message, and a test key cannot resend a live one.

The portal's Messages page can resend several failed messages at once: tick them and use Resend selected.

Require TLS for a message

Send with "require_tls": true (on /v1/messages, /v1/messages/mime and /v1/messages/batch, where it can be set for the whole batch and per message; o:require-tls=yes on /v1/messages/form) and the message is never handed to a server over an unencrypted connection:

  • Delivered straight to the recipient's mail server, it needs STARTTLS with a certificate that is valid for that server's name. If no mail server of the domain offers that, the message is deferred and tried again later, and after the last attempt it bounces with a reason that starts require_tls:. It is never sent in plaintext instead. Such a bounce does not put the address on your suppression list.
  • Relayed through Mailaki's outgoing relay, the connection to the relay always uses verified TLS. The relay's own connection to the recipient is outside what the flag controls.
  • The delivered event then says "require_tls": true and "tls": "verified" (direct) or "tls": "verified_to_relay" (relay). A resend keeps the flag.

Without the flag, TLS is used whenever the receiving server offers it, without checking its certificate (unless the domain publishes an MTA-STS policy in enforce mode). Mail submitted over SMTP cannot set the flag.

Send options on every endpoint

certify (Proof of Sending), verify (verify before sending) and webhook_url (a webhook URL for one message) work the same way on every send endpoint of the API. They are checked before anything is sent: certify on a plan without Proof of Sending returns 403, with a test key 400; a webhook_url that is not a public http(s) URL returns 400. Leaving verify out uses your account setting.

EndpointHow to pass them
POST /v1/messagescertify, verify, webhook_url in the JSON body.
POST /v1/messages/batchAt the top level as defaults for every message, and on each message to override them. A message's own value wins.
POST /v1/messages/formForm fields o:certify and o:verify (yes or no), o:webhook-url.
POST /v1/messages/mimecertify, verify, webhook_url next to message.
POST /v1/drafts/:id/sendOptional JSON body {"certify": true, "verify": true, "webhook_url": "..."}.
POST /v1/inboxes/:id/messages/:id/reply and /forwardNext to "send": true. Without "send": true they are refused: a draft does not keep them, so pass them when you send it.
Provider bridges (Mailgun, SendGrid, Postmark, Brevo, Mailjet, Resend, MailerSend, SparkPost, Mandrill, Amazon SES)certify only, as the request header X-Mailaki-Certify: true. On the Mailgun bridge o:certify=yes works too.
Batch with defaults and one override
{
  "domain_id": "YOUR_DOMAIN_UUID",
  "certify": true,
  "webhook_url": "https://yourapp.com/hooks/invoices",
  "messages": [
    {"from": "[email protected]", "to": ["[email protected]"], "subject": "Invoice 1042", "text": "..."},
    {"from": "[email protected]", "to": ["[email protected]"], "subject": "Newsletter", "text": "...",
     "certify": false, "verify": true}
  ]
}

In a batch, a top-level option that is refused refuses the whole request. A message whose own option is refused, or whose recipients are all dropped, is listed in errors with its index, and the other messages are still sent. Every recipient left out is listed in dropped_recipients with the message index, the email and the reason (suppressed, or a verification result such as invalid:no_mx).

On the MIME, draft and reply endpoints, verification removes recipients from delivery only; the To and Cc headers of your message stay as written. A draft whose recipients are all dropped is not sent and is kept, and the answer has "status": "dropped".

Sending a draft, and a reply or forward with "send": true, counts against your plan's allowance like any other send: one email per recipient. If the recipients do not all fit in what is left, nothing is sent and the answer is 429 with code quota_exceeded; a draft you tried to send is kept.

SMTP does not take these options. The provider bridges (Mailgun, SendGrid and the others) use your account's verify setting and do not take certify or webhook_url.

One-click unsubscribe (List-Unsubscribe)

Mailaki can add the RFC 8058 headers that make Gmail, Yahoo and other mail clients show their own Unsubscribe button: List-Unsubscribe: <https://mailaki.com/v1/unsubscribe/...?sig=...> and List-Unsubscribe-Post: List-Unsubscribe=One-Click. When the recipient uses it, the address goes on your suppression list and an unsubscribed event (and webhook) is recorded.

It is off by default, because transactional mail such as password resets and receipts should not carry an unsubscribe header. If you send bulk or marketing mail to Gmail or Yahoo addresses, turn it on: both require one-click unsubscribe from bulk senders.

  • For one message: "list_unsubscribe": true (or false) on /v1/messages, /v1/messages/mime and /v1/messages/batch (top level as the default, per message to override), o:list-unsubscribe=yes on /v1/messages/form.
  • For the account: PUT /v1/sending-settings {"list_unsubscribe": true} (needs admin; GET needs read). Sends that do not set list_unsubscribe then get the headers, including mail sent over SMTP and through the provider bridges.

With the headers on, each recipient gets an own copy of the message, because the link names that recipient. A message that already has a List-Unsubscribe header (in headers, or in a raw MIME message) keeps yours. The headers are covered by the DKIM signature, as RFC 8058 requires.

Every unsubscribe link Mailaki makes is signed: it ends in ?sig=, an HMAC of your account id and the message's id. A link without a valid signature is answered with 404, so knowing a message id is not enough to unsubscribe someone. Opening the link in a browser shows a confirmation button; only the button (or the mail client's one-click POST) unsubscribes, so link scanners do not.

Unsubscribe preferences page

/v1/unsubscribe/{account}/{id}/preferences?sig=... is a small page for the recipient of the link. It lists your account's unsubscribe groups (name and description only; create them with the SendGrid bridge's /v3/asm/groups) with the ones the recipient gets checked, so they can leave or rejoin each group, and has an "Unsubscribe from all" button; after that, "Resubscribe" undoes it (a bounce or complaint is never lifted). It shows nothing about other recipients. The page loads no script and no outside resource. The one-click page links to it. Through the SendGrid bridge, <%asm_preferences_raw_url%> in your content becomes this link, and asm.groups_to_display limits the groups it shows.

HTML emails

Include both text and html fields. Mailaki sends a multipart/alternative message so email clients can pick their preferred format.

{
  "from": "[email protected]",
  "to": ["[email protected]"],
  "subject": "Your weekly report",
  "text": "Your report is ready. Visit https://app.example.com/reports",
  "html": "<h2>Your weekly report</h2><p>Visit <a href='https://app.example.com/reports'>your dashboard</a>.</p>"
}

Templates

Create reusable templates with {{variable}} substitution.

Create a template
curl -X POST https://mailaki.com/v1/templates \
  -H "Authorization: Bearer mf_live_..." \
  -d '{
    "name": "welcome",
    "subject": "Welcome, {{name}}!",
    "html_body": "<h1>Hi {{name}}</h1><p>Thanks for joining {{company}}.</p>",
    "text_body": "Hi {{{name}}}, thanks for joining {{{company}}}."
  }'

Templates use Handlebars: {{#if premium}}...{{else}}...{{/if}} for conditionals and {{#each items}}{{this.name}}{{/each}} for loops. Values are HTML-escaped; in subjects and text bodies write {{{name}}} to skip escaping.

Ready-made transactional templates (welcome, verify email, password reset, magic link, receipt, invoice, shipping notification and more) with an HTML and a text part. List them, then copy one into your account and edit it like any other template. Each entry documents its variables with an example value.

curl https://mailaki.com/v1/templates/gallery \
  -H "Authorization: Bearer mf_live_..."

curl -X POST https://mailaki.com/v1/templates/gallery/password-reset/copy \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "Password reset"}'

Version history

Every update that changes a template keeps the previous version. List versions, fetch one, or restore it. A restore keeps the content it replaces as a new version, so it can be undone. The newest 50 versions per template are kept.

curl https://mailaki.com/v1/templates/TEMPLATE_UUID/versions \
  -H "Authorization: Bearer mf_live_..."

curl -X POST https://mailaki.com/v1/templates/TEMPLATE_UUID/versions/3/restore \
  -H "Authorization: Bearer mf_live_..."

Each version says who saved it and who replaced it: saved_by and replaced_by are {"type": "user", "id", "email", "name"} for a portal user or {"type": "api_key", "id", "name"} for an API key, and null for the account's primary key or for changes made before this was recorded. To see what changed between two versions, or between a version and the current template, ask for a line diff of the name, subject, text and HTML:

curl "https://mailaki.com/v1/templates/TEMPLATE_UUID/diff?from=3&to=current" \
  -H "Authorization: Bearer mf_live_..."

{"template_id": "...", "from": 3, "to": "current", "changed": true,
 "fields": [{"field": "subject", "changed": true,
             "lines": [{"op": "remove", "text": "Hi"}, {"op": "add", "text": "Hello"}]}, ...]}

AI builder

Describe an email and get back a subject, an HTML body and a text body with Handlebars variables. Nothing is saved until you create a template from the result. Only the fields of this request are sent to the AI model (Claude, by Anthropic); no recipient or message data is included.

The builder runs on your own Anthropic API key. Create a key at console.anthropic.com and add it in the portal (Templates, Generate with AI) or with the call below. Usage is billed by Anthropic to you, and there is no monthly generation limit on your own key. The key is stored encrypted, is never returned (only its last four characters are shown) and can be removed with DELETE /v1/templates/ai/key. Setting and removing it needs the admin scope.

curl -X PUT https://mailaki.com/v1/templates/ai/key \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"api_key": "sk-ant-..."}'

{"configured": true, "key_hint": "a1B2", "source": "account", "validated": true}

GET /v1/templates/ai shows whether a key is set (configured, key_hint) and which key a generation would use (source: account, platform or none). Without a key, generation answers 409 ai_key_required. If Anthropic turns the call down, the error says so and is about your Anthropic key or account, not your Mailaki account: ai_key_invalid (422, the key was rejected), ai_credit_too_low (402), ai_rate_limited (429) and ai_overloaded (503, try again later).

The same key answers questions about your audience: POST /v1/audience/ask with {"question": "How did this month compare with the one before?", "days": 90} returns {"answer": "..."} as plain text (portal: Spaces, Audience). Only the question and totals are sent to the model: counts of messages sent, delivered, bounced, opened and clicked per period, week, weekday, tag, mail service and list. No email address, no name and no message content is included, and a mail service is named only when at least five people use it. On the platform key, questions and generated templates share one monthly allowance.

curl -X POST https://mailaki.com/v1/templates/ai/generate \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Tell a customer their subscription renews in 7 days, with the amount and a link to manage it",
    "brand_name": "Acme",
    "language": "English"
  }'
Send with template
curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer mf_live_..." \
  -d '{
    "domain_id": "...",
    "from": "[email protected]",
    "to": ["[email protected]"],
    "template_id": "TEMPLATE_UUID",
    "variables": {"name": "Alice", "company": "Acme Inc"}
  }'

Open & click tracking

Mailaki can track opens (a 1x1 pixel) and clicks (links rewritten through a redirect) in HTML emails. Tracking is off unless you ask for it: on POST /v1/messages and POST /v1/messages/mime it is on when the request has a tracking object; without one, the message is sent untouched. Inside the object each of opens and clicks defaults to true, so "tracking": {} turns both on.

Two more options go in the same object. "plain_text_clicks": true also sends the http(s) links of the plain-text body through the redirect (off by default, because the links become long). "google_analytics": "campaign-name" adds utm_source=mailaki&utm_medium=email&utm_campaign=campaign-name to every http(s) link of the HTML body, so the visit shows up under that campaign in your analytics; links that already carry a utm_source are left alone. Unsubscribe links and hosted-file links are never changed by either option.

"convert_video": true replaces embedded video players in the HTML body with something a mail app shows: a YouTube embed becomes its thumbnail linked to the video, a Vimeo embed or a <video> becomes a link (or its poster picture). The link is tracked like any other. Off by default.

EndpointDefault
POST /v1/messages, POST /v1/messages/mimeOff; on with a tracking object
POST /v1/messages/batchAlways on for HTML bodies
POST /v1/messages/formOn, unless o:tracking-opens / o:tracking-clicks is no
SMTP submissionNo tracking

On /v1/messages/mime your message's HTML and plain-text body parts are rewritten before it is DKIM-signed (they are written back quoted-printable); headers, attachments and other parts stay byte for byte. Body parts in a charset other than UTF-8 or US-ASCII are left as they are. A DKIM signature you added yourself would no longer match, so ask for tracking only on unsigned messages.

Turn tracking on, or on for opens only:

{
  "tracking": {"opens": true, "clicks": true}
}

{
  "tracking": {"opens": true, "clicks": false}
}

When one request goes to several recipients without recipient_variables, they all receive the same body, so an open or click is recorded once for the send without naming a recipient (details.shared_body is true). Send one request per recipient, or use recipient_variables, to know who it was.

Links to your hosted files are not sent through the redirect. With click tracking they get the message's tracking id appended (?t=...&s=...), in the HTML and the plain-text part, and the download is recorded as the click.

Hosted file links

Upload a file once and put its link in your message, in place of an attachment. The link is public: anyone who has it can download the file. Each download is counted on the upload.

Upload a file
curl -X POST https://mailaki.com/v1/uploads \
  -H "Authorization: Bearer mf_live_..." \
  -F "[email protected]" \
  -F "expires_at=2027-01-31T00:00:00Z"
Response
{
  "id": "UPLOAD_UUID",
  "filename": "report.pdf",
  "content_type": "application/pdf",
  "size_bytes": 48211,
  "url": "https://mailaki.com/v1/f/TOKEN/report.pdf",
  "expires_at": "2027-01-31T00:00:00Z",
  "expired": false,
  "download_count": 0,
  "last_downloaded_at": null,
  "created_at": "..."
}
  • One file per request, up to 25 MB. expires_at is optional; after it the link answers 410 and the file is deleted.
  • Executable and script files (for example .exe, .msi, .bat, .js, .sh) are refused.
  • Files are always delivered as a download. HTML and SVG files are never displayed in the browser.
  • Uploads count against your plan's storage allowance, together with your inboxes' stored mail. An upload that would pass it gets 429 with code quota_exceeded, and so does inbound mail to your inboxes once the allowance is used. GET /v1/billing/usage shows upload_storage_bytes, inbox_storage_bytes, storage_used_bytes and storage_limit_bytes.
  • GET /v1/uploads lists your uploads with their download counts, GET /v1/uploads/{id} returns one, and DELETE /v1/uploads/{id} removes the file and its link.
  • A download is counted on the upload (download_count, last_downloaded_at).
  • When you send the link in a message with click tracking on, the link in the message carries that message's tracking id, and each download through it is also a clicked event of the message (with "download": true, upload_id and filename), sent to your webhooks like any click. A download of the bare link records no event.
  • The portal's Settings page has a Hosted files panel to upload, list and delete files.

Email verification

Check addresses before you send to them. Each address gets a result, a list of reasons and a 0-100 score.

What it checks: syntax, DNS (does the domain have MX records) and lists (disposable domains, role accounts, reserved test domains, your suppression list, your own rules). What it does not check: whether the mailbox exists. We do not connect to the recipient's mail server, so valid means "deliverable as far as DNS and our lists can tell". There is no catch-all or spam-trap detection.

ResultMeaningReasons
validSyntax and DNS are fine and no list objectsnone, or allowed_by_rule
invalidCannot receive mailinvalid_syntax, reserved_test_domain, no_mx, null_mx
riskyProbably deliverable, worth a lookpossible_typo, role_account, implicit_mx
unknownDNS could not be querieddns_error
do_not_mailDo not sendblocked_by_rule, suppressed, disposable_domain

One address

GET /v1/[email protected]

{
  "address": "[email protected]",
  "result": "risky",
  "reasons": ["possible_typo"],
  "score": 40,
  "did_you_mean": "[email protected]",
  "is_valid": true,
  "risk": "medium",
  "checks": {"syntax": true, "mx_exists": true, "is_disposable": false,
             "is_role_account": false, "is_free_provider": false}
}

Bulk jobs

POST /v1/validate/bulk with a JSON list, a CSV file or a text file (one address per line) as the request body. Up to 100,000 addresses and 10 MiB per job.

curl -X POST https://mailaki.com/v1/validate/bulk \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: text/csv" \
  --data-binary @contacts.csv

# poll until "status" is "completed"
curl https://mailaki.com/v1/validate/bulk/JOB_ID \
  -H "Authorization: Bearer mf_live_..."

# download the results
curl "https://mailaki.com/v1/validate/bulk/JOB_ID/results?format=csv" \
  -H "Authorization: Bearer mf_live_..." -o results.csv

In a CSV, a first line without an @ is treated as a header and must name an email or address column; without a header the first column is used. Results are also available as paginated JSON (?limit=, ?after=, ?result=). DELETE /v1/validate/bulk/JOB_ID cancels or removes a job. Jobs and their results are deleted 30 days after upload.

Allow and block rules

POST /v1/validate/rules overrides the result for an address, a domain or a TLD: block gives do_not_mail, allow gives valid.

{"action": "block", "kind": "tld", "value": "zip", "note": "never ours"}

Verify before sending

Add "verify": true to POST /v1/messages (or to any other send endpoint, see Send options on every endpoint), or turn it on for the whole account with PUT /v1/validate/settings {"verify_before_send": true}. Recipients whose result is invalid or do_not_mail are not sent to and appear in dropped:

{
  "ids": ["0193abc0-..."],
  "status": "queued",
  "dropped": [{"email": "[email protected]", "reason": "do_not_mail:disposable_domain"}]
}

To verify only what is sent from one domain (or to leave one domain out), give the domain its own default: PUT /v1/validate/settings/domains/{domain_id} with {"verify_before_send": true} or false; null removes it. GET /v1/validate/settings lists every domain with its setting and what applies. An explicit verify on the request always wins.

An API key can have its own default too, which comes before the domain's: PATCH /v1/keys/{key_id} (or POST /v1/keys) with {"verify_before_send": true}, false, or null to remove it. The order is: the request's verify, then the key's setting, then the domain's, then the account's. Like the other defaults, a key's true lets mail through unverified when the verification allowance is used up; only an explicit "verify": true is refused then.

Mail submitted over SMTP is verified with the same default (domain, else account). A recipient that fails is not queued; if none is left, the server answers 550 5.1.1.

Bulk jobs: subscribe a webhook to verification.completed to be told when a job has finished instead of polling. The event's message_id is the job id and data is the job with its counts and results_url.

Allowance

Every address verified counts against a monthly allowance that comes with your plan: single checks, each address in a bulk job, and each recipient verified before a send. GET /v1/validate/usage shows what is used and what is left. When it is used up, requests return 429 with code quota_exceeded until the next month.

Send via SMTP

Any app or library that can send through an SMTP server can send through Mailaki. Mail sent this way goes through the same checks and pipeline as the /v1/messages/mime endpoint: sender on a verified domain, plan limits, suppression lists, DKIM signing, events and webhooks. Open and click tracking, require_tls and the send options are API-only.

SettingValue
Hostmail.mailaki.com
Port587 with STARTTLS (recommended), or 465 with SSL/TLS from the start
UsernameAnything, for example api. Only the password is checked.
PasswordA live API key with the send permission. Create one in the portal under API Keys; it is shown only once. Test keys (mf_test_...) are refused: SMTP has no test mode.
AuthenticationPLAIN or LOGIN, after STARTTLS on port 587
From addressAn address on one of your verified domains
Limits25 MB per message, 100 recipients per message
Python (smtplib)
import smtplib
from email.message import EmailMessage

msg = EmailMessage()
msg["From"] = "Your App <[email protected]>"
msg["To"] = "[email protected]"
msg["Subject"] = "Hello from Mailaki"
msg.set_content("Sent over SMTP.")

with smtplib.SMTP("mail.mailaki.com", 587) as smtp:
    smtp.starttls()
    smtp.login("api", "mf_live_your_api_key")
    smtp.send_message(msg)

Certificate. mail.mailaki.com presents a publicly trusted Let's Encrypt certificate (renewed automatically), so certificate verification can stay on in your app or library.

Mailbox passwords

An inbox can have its own password, so that a mail app can log in as that one address instead of with an API key. The user name is the full address, the password is the mailbox password.

Status. The API below is available. The mail servers accept mailbox passwords only after an update that has not been rolled out yet, and IMAP (reading a mailbox from a mail app) is built but not available yet. There is no webmail. Until then, read stored mail through the API or the portal, and send over SMTP with an API key.

RequestWhat it does
PUT /v1/inboxes/:id/passwordSets or replaces the password. With no body, a strong one is generated and returned once in password. With {"password": "..."} (at least 12 characters) that one is set and not echoed.
GET /v1/inboxes/:id/passwordset, updated_at and last_used_at. Never the password.
DELETE /v1/inboxes/:id/passwordRemoves it.

All three need the admin permission. In the portal: Inbox, Mailboxes, Password.

  • A mailbox password opens that mailbox only. It is not an API key: the API refuses it, and it does not open your other inboxes.
  • Over SMTP it can only send as its own address: both the envelope sender and the From header must be the mailbox address (a display name is fine), otherwise the server answers 553 5.7.1. Your account's sending limits, verified domains and suppression list apply as for any other send.
  • It is stored as a slow salted hash (argon2id) and cannot be shown again. If it is lost, set a new one.
  • After 10 failed logins within 10 minutes, from one IP address or for one mailbox, further logins for that address or mailbox are refused until the 10 minutes are over.

Inbound email setup

Receive emails at your domain and process them via the API or webhooks.

1

Add MX record

Add two MX records to your domain, both with priority 10: mail.mailaki.com and mail2.mailaki.com. They are two separate servers; with both records, mail still arrives when one of them is down. One record alone works too.

2

Create an inbound route

In the portal under Inbound Routes, create a route matching your desired address pattern.

3

Read your emails

View stored messages in the portal Inbox page or via the API.

DNS setup

RecordTypeValuePriority
yourdomain.comMXmail.mailaki.com10
yourdomain.comMXmail2.mailaki.com10

Inbound routes

Routes match incoming email addresses against patterns and perform actions.

ActionDescription
storeSave the message — read it via API or portal Inbox
forwardPOST the message to a webhook URL
dropSilently discard the message
Create a route via API
curl -X POST https://mailaki.com/v1/routes \
  -H "Authorization: Bearer mf_live_..." \
  -d '{
    "pattern": "[email protected]",
    "action": "store"
  }'

Patterns support wildcards: *@yourdomain.com catches all addresses.

Reading emails

GET /v1/stored-messages — list stored inbound messages

GET /v1/stored-messages/:id — get full message content

The list is an overview: use snippet there. body_text and body_html can be null in the list; get the single message for the content.

curl https://mailaki.com/v1/stored-messages \
  -H "Authorization: Bearer mf_live_..."
[
  {
    "id": "0193abc1-...",
    "from_addr": "[email protected]",
    "to_addr": "[email protected]",
    "subject": "Help with my order",
    "snippet": "Hi, I need help...",
    "raw_size": 1234,
    "folder": "inbox",
    "created_at": "2026-04-13T10:00:00Z"
  }
]

Several addresses and domains

One account can receive on several addresses and domains. List them, with message and unread counts:

GET /v1/stored-messages/mailboxes

{
  "total": 42,
  "unread": 5,
  "domains": [
    {
      "domain": "yourdomain.com",
      "verified": true,
      "total": 30,
      "unread": 3,
      "last_received_at": "2026-11-23T09:14:02Z",
      "hidden_addresses": 0,
      "mailboxes": [
        { "address": "[email protected]", "domain": "yourdomain.com", "total": 18, "unread": 2,
          "last_received_at": "2026-11-23T09:14:02Z", "pattern": false },
        { "address": "[email protected]", "domain": "yourdomain.com", "total": 12, "unread": 1,
          "last_received_at": "2026-11-22T17:40:11Z", "pattern": false }
      ]
    }
  ]
}

A catch-all route such as *@yourdomain.com is listed as the addresses that received mail, plus the pattern itself ("pattern": true) with the count of everything it matches. Pattern counts are not added to the domain totals a second time.

Read one mailbox by adding to (an address, case-insensitive) or domain to the list. Both combine with unread=true, summary=true, limit and the before cursor:

curl "https://mailaki.com/v1/[email protected]&unread=true" \
  -H "Authorization: Bearer mf_live_..."

POST /v1/stored-messages/mark-read marks everything read, or one mailbox with {"to": "[email protected]"} or {"domain": "yourdomain.com"}. It answers {"updated": 2, "unread": 3}.

Folders

An inbox has folders: INBOX, Sent, Drafts, Trash, Junk, Archive and folders you create. Every message says which one it is in (folder, folder_id, folder_name). Lists return INBOX unless you ask for another folder, so mail you move away leaves the default list.

RequestWhat it does
GET /v1/stored-messages?folder=trashList one folder across your inboxes: inbox (default), sent, drafts, trash, junk, archive, a folder id, or all.
POST /v1/stored-messages/:id/moveMove a message: {"folder": "trash"}. Needs the inboxes permission.
GET /v1/inboxes/:id/foldersThe inbox's folders with message and unread counts.
POST /v1/inboxes/:id/foldersCreate a folder: {"name": "Projects/2026"}.
PATCH /v1/inboxes/:id/folders/:folder_idRename a folder you created: {"name": "Work"}. Folders inside it move with it.
DELETE /v1/inboxes/:id/folders/:folder_idDelete a folder you created, with every message in it.
  • Sent copies. A reply, forward or draft sent from an inbox through the API is copied to that inbox's Sent folder. Turn it off per inbox with PATCH /v1/inboxes/:id and {"save_sent_copies": false}. POST /v1/messages is not tied to an inbox and is not copied.
  • Trash and Junk empty themselves. A message is deleted after 30 days in Trash or Junk. Change it per inbox with {"trash_retention_days": 7}; 0 keeps them until you delete them.
  • Everything in every folder counts against the mailbox's storage.
  • Mail kept by a store route without an inbox has no folders: it is listed with INBOX and cannot be moved.
  • These are the folders a mail app will see over IMAP. IMAP is built but not available yet.

Add a domain

Add your domain in the portal under Domains, then configure the DNS records we provide.

DNS records

After adding a domain, set up these DNS records:

RecordTypePurpose
mf1._domainkey.yourdomain.comTXTDKIM public key (we generate this). If the portal shows two CNAME records for DKIM instead, use those: see below
yourdomain.comTXTSPF: v=spf1 include:spf.mailaki.com ~all. A domain has one SPF record: if yours already has one, add include:spf.mailaki.com to it instead of publishing a second
_dmarc.yourdomain.comTXTDMARC: v=DMARC1; p=none; rua=mailto:[email protected]
yourdomain.comMXmail.mailaki.com and mail2.mailaki.com, same priority (for inbound only)

DKIM by CNAME. When your domain's DNS Records dialog lists two CNAME records for DKIM (mf1._domainkey and mf2._domainkey, each pointing at a name we host), publish both instead of the TXT record. We then keep the key behind them up to date, so a key change or rotation needs no further DNS change from you. The TXT record remains available if you prefer to publish the key yourself. A DNS name can hold a CNAME or a TXT record, not both: if you already published the TXT, remove it when you add the CNAME at the same name. The exact names and targets for your domain are in the portal and in dns_records.dkim_cnames of GET /v1/domains. If the dialog shows only the TXT record, use the TXT record.

DKIM key format. The p= value of the DKIM TXT record starts with MIIBIjANBgkq. Records copied before 16 November 2026 may hold the same key in an older form that starts with MIIBCgKC; Gmail and AWS SES do not accept it. Verify (POST /v1/domains/{id}/verify) reports such a record, or one with a different key, in verification.dkim_problem (pkcs1, wrong_key, missing, revoked) with the exact value to publish in verification.dkim_expected; the domain health check (GET /v1/deliverability/domains/{id}/health) gives it in dkim.expected, and the portal's DNS Records dialog shows it. A domain that is already verified stays verified.

Records in the API. dns_records.spf_record gives the SPF record as {type, name, value, note}.

Return path (optional, recommended). Where the dialog lists a return path CNAME (bounces.yourdomain.com pointing at Mailaki's bounce domain, in dns_records.return_path), publishing it lets mail Mailaki sends from its own IPs use b-<token>@bounces.yourdomain.com as envelope sender. Late bounces, and feedback reports sent to the return path, then come back to Mailaki through your subdomain and show up as bounced / complained events, and SPF is aligned with your From domain for DMARC (relaxed alignment). Mail relayed through AWS SES keeps SES's own return path. Instead of the CNAME you can publish an MX (mail.mailaki.com, priority 10) and an SPF TXT record v=spf1 include:spf.mailaki.com -all at the same name (dns_records.return_path_alternative). The return path is used once it verifies and the domain itself is verified; its status is in the domain's return_path object (name, verified, method, error, checked_at). POST /v1/domains/{id}/verify checks it at once; Mailaki also re-checks verified domains about once an hour, and stops using a return path whose records are gone. To use another name below your domain:

curl -X PUT https://mailaki.com/v1/domains/{id}/return-path \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "mail-bounces.yourdomain.com"}'

DELETE /v1/domains/{id}/return-path goes back to bounces.yourdomain.com. Both need an admin key.

Event webhooks

Get an HTTP POST on your server when an email is delivered, bounces, is opened or clicked.

Create a webhook
curl -X POST https://mailaki.com/v1/webhooks \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/email",
    "event_types": ["delivered", "bounced", "opened", "clicked"]
  }'

The response contains a secret (whsec_...). It is generated by Mailaki and returned only in this response: store it. If you lose it, POST /v1/webhooks/{id}/rotate-secret replaces it and returns the new one, once. The old secret stops working immediately.

What a delivery looks like
POST /webhooks/email
Content-Type: application/json
X-Mailaki-Timestamp: 1763553600
X-Mailaki-Signature: 5f2c...            (hex HMAC-SHA256 of the body)
X-Mailaki-Signature-Ed25519: t=1763553600,kid=3fa1c0de9b7e4a12,sig=BASE64...

{"id":"0193...","event_type":"delivered","message_id":"0193...",
 "tenant_id":"...","timestamp":"2026-11-19T12:00:00Z","data":{}}

Answer with any 2xx status within 10 seconds. Anything else, including a redirect, counts as a failure and is retried. id is the event id; use it to ignore an event you have already processed, because a retry or a resend delivers the same event again.

Verifying a delivery

Every delivery is signed in two independent ways. Check either one (or both). Always verify against the raw request body, before parsing the JSON.

Ed25519 (public key, no shared secret)

The X-Mailaki-Signature-Ed25519 header has three comma-separated fields: t (unix seconds when the request was sent), kid (id of the signing key) and sig (base64 Ed25519 signature). The signed bytes are t, a dot, then the raw body: "{t}.{body}". Public keys are published, without authentication, at https://mailaki.com/.well-known/mailaki/webhook-keys:

{"keys": [{
  "kid": "3fa1c0de9b7e4a12",
  "kty": "OKP", "crv": "Ed25519", "alg": "EdDSA",
  "x": "base64url of the 32-byte key",
  "public_key": "base64 of the 32-byte key",
  "public_key_pem": "-----BEGIN PUBLIC KEY-----\n...",
  "active": true,
  "created_at": "2026-11-19T12:00:00Z"
}]}

Pick the key whose kid matches the header. Cache the document (it is served with a five-minute cache lifetime) and fetch it again when you see a kid you do not know. When we rotate the signing key, the previous key stays in the document for an overlap window (three days unless announced otherwise), so for a while two keys are listed and deliveries may be signed with either. Reject requests whose t is more than a few minutes away from your clock: the timestamp is part of the signed bytes, so an old captured request cannot be replayed with a new one.

# Python (pip install cryptography requests)
import base64, time, requests
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
from cryptography.exceptions import InvalidSignature

KEYS_URL = "https://mailaki.com/.well-known/mailaki/webhook-keys"
_keys = {}

def _key(kid):
    if kid not in _keys:
        for k in requests.get(KEYS_URL, timeout=5).json()["keys"]:
            _keys[k["kid"]] = Ed25519PublicKey.from_public_bytes(
                base64.b64decode(k["public_key"]))
    return _keys.get(kid)

def verify_ed25519(raw_body: bytes, header: str, tolerance=300) -> bool:
    f = dict(p.split("=", 1) for p in header.split(","))
    if abs(time.time() - int(f["t"])) > tolerance:
        return False
    key = _key(f["kid"])
    if key is None:
        return False
    try:
        key.verify(base64.b64decode(f["sig"]), f["t"].encode() + b"." + raw_body)
        return True
    except InvalidSignature:
        return False
// Node.js 18+ (no dependencies)
const crypto = require("crypto");
const KEYS_URL = "https://mailaki.com/.well-known/mailaki/webhook-keys";
const keys = new Map();

async function keyFor(kid) {
  if (!keys.has(kid)) {
    const doc = await (await fetch(KEYS_URL)).json();
    for (const k of doc.keys) keys.set(k.kid, crypto.createPublicKey(k.public_key_pem));
  }
  return keys.get(kid);
}

// rawBody: Buffer of the request body exactly as received
async function verifyEd25519(rawBody, header, tolerance = 300) {
  const f = Object.fromEntries(header.split(",").map((p) => {
    const i = p.indexOf("=");
    return [p.slice(0, i), p.slice(i + 1)];
  }));
  if (Math.abs(Date.now() / 1000 - Number(f.t)) > tolerance) return false;
  const key = await keyFor(f.kid);
  if (!key) return false;
  const signed = Buffer.concat([Buffer.from(f.t + "."), rawBody]);
  return crypto.verify(null, signed, key, Buffer.from(f.sig, "base64"));
}

HMAC-SHA256 (shared secret)

X-Mailaki-Signature is the hex HMAC-SHA256 of the raw body, keyed with the webhook's whsec_... secret. The timestamp is not part of this signature, so it does not protect against replay on its own; use the event id to drop duplicates, or verify the Ed25519 signature.

import hmac, hashlib

def verify_hmac(raw_body: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)
const crypto = require("crypto");

function verifyHmac(rawBody, signature, secret) {
  const expected = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
  const a = Buffer.from(expected), b = Buffer.from(signature || "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Retries

A delivery that fails (no 2xx, a timeout, or a connection error) is retried up to 7 more times, 8 attempts in total:

AttemptWait after the previous failure
1immediately, when the event happens
21 minute
35 minutes
430 minutes
52 hours
66 hours
712 hours
824 hours

That is about 44.6 hours from the first attempt to the last. Each wait is lengthened by a random 0 to 10 percent so retries do not all arrive in the same second, and retries are picked up every 15 seconds, so a retry can be that much later than the table says. Pending retries are stored, so they survive a restart on our side. If you delete or deactivate the webhook, its pending retries are dropped. After the eighth failed attempt the event moves to the failed list.

Failed deliveries and resending

# Failed deliveries of one webhook, or of the whole account
curl https://mailaki.com/v1/webhooks/WEBHOOK_ID/failed -H "Authorization: Bearer mf_live_..."
curl https://mailaki.com/v1/webhooks/failed            -H "Authorization: Bearer mf_live_..."

# Resend one to the endpoint it was meant for
curl -X POST https://mailaki.com/v1/webhooks/failed/FAILED_ID/replay \
  -H "Authorization: Bearer mf_live_..."

# Resend it to another of your webhooks instead
curl -X POST https://mailaki.com/v1/webhooks/failed/FAILED_ID/replay \
  -H "Authorization: Bearer mf_live_..." -H "Content-Type: application/json" \
  -d '{"webhook_id": "OTHER_WEBHOOK_ID"}'

A resend is one attempt, made while you wait. The answer is {"status":"replayed"} (delivered; the entry is removed from the failed list) or {"status":"still_failing"} (the entry stays, with its attempt count and last error updated). The resent request is signed like any other, with the secret of the webhook it goes to. POST /v1/webhooks/{id}/failed/replay-all resends every failed delivery of one webhook, and DELETE /v1/webhooks/failed/{failed_id} discards one.

Delivery history

Every attempt to one of your webhooks is kept for 30 days: the first attempt, each retry and each resend, with the HTTP status your endpoint answered, the error and how long it took. Any of them can be sent again, also one that was delivered (for example after your receiver lost data).

# Newest first; ?status=failed, ?limit=, ?before= for the next page
curl https://mailaki.com/v1/webhooks/WEBHOOK_ID/deliveries -H "Authorization: Bearer mf_live_..."

# One attempt with the payload that was sent
curl https://mailaki.com/v1/webhooks/WEBHOOK_ID/deliveries/DELIVERY_ID -H "Authorization: Bearer mf_live_..."

# Send it again (optionally to another of your webhooks)
curl -X POST https://mailaki.com/v1/webhooks/WEBHOOK_ID/deliveries/DELIVERY_ID/resend \
  -H "Authorization: Bearer mf_live_..." -H "Content-Type: application/json" \
  -d '{"webhook_id": "OTHER_WEBHOOK_ID"}'

The answer is {"status": "delivered", "status_code": 200} or {"status": "failed", "status_code": 500, "error": "HTTP 500"}. A resend is one attempt and is not retried; the event keeps its id. Deliveries to a per-message webhook_url are not in the history.

Webhook limit

The Free plan has up to 2 webhooks and Starter up to 10; higher plans have no limit. Creating one more is refused with 403 and a message saying so. Delete one or upgrade the plan.

A webhook URL for one message

Add webhook_url to POST /v1/messages to have every event of that message (all of its recipients, all event types) posted to that URL, in addition to your registered webhooks:

curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer mf_live_..." -H "Content-Type: application/json" \
  -d '{
    "domain_id": "YOUR_DOMAIN_UUID",
    "from": "[email protected]",
    "to": ["[email protected]"],
    "subject": "Your order",
    "text": "Thanks!",
    "webhook_url": "https://yourapp.com/hooks/order-1234"
  }'

The URL must be public http(s); private and internal addresses are refused. These deliveries have no shared secret, so they carry X-Mailaki-Signature-Ed25519 but no X-Mailaki-Signature. They follow the same retry schedule, and failures show up in GET /v1/webhooks/failed with webhook_id: null. webhook_url is accepted on every send endpoint of the API (batch, MIME, form as o:webhook-url, draft sends and replies); see Send options on every endpoint.

Webhooks in another provider's format

Moving a receiver from another provider? Create the webhook with a format and the body is written in that provider's event format. Retries, the failed list and resending work as for any webhook. Only fields Mailaki has are sent; an event the format has no name for is not delivered to that webhook. Without event_types the webhook gets every event its format can express.

curl -X POST https://mailaki.com/v1/webhooks \
  -H "Authorization: Bearer mf_live_..." -H "Content-Type: application/json" \
  -d '{"url": "https://yourapp.com/hooks/postmark", "format": "postmark"}'
formatBodyEvents (ours to theirs)Signature
sendgridA JSON array with one Event Webhook event: email, timestamp, event, sg_event_id, sg_message_id (the bridge's X-Message-Id), category; type and reason on bounces, reason on drops, response and attempt on deferrals, url on clicks.delivered, bounce (type blocked for a soft bounce), dropped, deferred, open, click, spamreport, unsubscribe. No processed.SendGrid's signed Event Webhook uses SendGrid's own ECDSA key and cannot be reproduced. Verify our X-Mailaki-Signature-Ed25519 header instead.
postmarkOne object with RecordType and Postmark's field names: MessageID, Recipient, Tag, DeliveredAt; bounces with Type, TypeCode, Email, From, Details, BouncedAt, Subject; clicks with OriginalLink.Delivery, Bounce, SpamComplaint, Open, Click, SubscriptionChange (an unsubscribe). Deferrals and suppressed sends have no Postmark webhook and are not sent.Postmark signs nothing. Put Basic credentials in the URL, https://user:pass@host/path, as Postmark documents.
brevoOne flat object: event, email, id, date (UTC), ts, ts_event, ts_epoch, message-id (as the bridge returns it), subject, tags; reason on bounces, blocks and deferrals; link on clicks.delivered, hard_bounce, soft_bounce, blocked, deferred, opened, click, spam, unsubscribed. No request.None, as on Brevo. Basic credentials in the URL work.
mailjetA JSON array with one event: event, time, MessageID (the number the bridge returned), Message_GUID, email, mj_message_id; hard_bounce and comment on bounces; error on blocks; url on clicks.sent (our delivered), bounce, blocked, open, click, spam, unsub. Deferrals are not sent.None, as on Mailjet. Basic credentials in the URL, as Mailjet documents.
resend{"type", "created_at", "data"} with email_id (as the bridge returns it), from, to, subject, created_at; bounce on bounces, click on clicks.email.delivered, email.bounced, email.suppressed, email.delivery_delayed, email.opened, email.clicked, email.complained. Unsubscribes are not sent.Svix, like Resend: svix-id, svix-timestamp, svix-signature, keyed with the webhook's whsec_ secret from the create response. Resend's webhooks.verify accepts it.
sparkpostA JSON array with one {"msys": {"message_event" | "track_event" | "unsubscribe_event": {...}}}: type, event_id, message_id and transmission_id (the id the bridge returned), timestamp (unix seconds, a string), injection_time, rcpt_to, raw_rcpt_to, friendly_from, sending_domain, subject, rcpt_tags; reason, raw_reason, error_code and bounce_class (where known) on bounces, delays and policy rejections; num_retries on delays; fbtype on complaints; target_link_url on clicks.delivery, bounce, policy_rejection (a suppressed send, bounce class 25), delay, open, click, spam_complaint, link_unsubscribe. Bounce class 20 for a soft bounce, 10 for a 5.1.1 reply; other bounces have none. No injection.SparkPost signs nothing. Put Basic credentials in the URL, https://user:pass@host/path. A custom auth header is not supported. Each request has an X-MessageSystems-Batch-ID that a retry keeps.
mandrillA form post (application/x-www-form-urlencoded) with one field, mandrill_events, a JSON array with one event: event, _id (the id the bridge returned), ts, url on clicks, and msg with ts, _id, state, email, sender, subject, tags; diag on bounces, deferrals and rejects.send (our delivered), hard_bounce, soft_bounce, reject, deferral, open, click, spam, unsub. Mandrill's own delivered is not sent.X-Mandrill-Signature, as Mandrill signs: base64 HMAC-SHA1 of the webhook URL exactly as you registered it, followed by mandrill_events and its value. The webhook key is the webhook's whsec_ secret from the create response, used as it is.
mailersendMailerSend's payload version 2: {"type", "created_at", "data"}; data has id (our event id), domain_id, message_id and email_id (the bridge's X-Message-Id), type, subject, recipient, tags, meta (bounce_reason, bounce_code, bounce_type on bounces, url on clicks, unsubscribe_reason null on unsubscribes, otherwise []).activity.delivered, activity.soft_bounced, activity.hard_bounced, activity.suppressed, activity.deferred, activity.opened, activity.clicked, activity.spam_complaint, activity.unsubscribed. No activity.sent and no unique opens or clicks.Signature, as MailerSend signs: hex HMAC-SHA256 of the body, keyed with the webhook's whsec_ secret.

Every delivery also carries the X-Mailaki-* signature headers. Mailgun-format webhooks are created through the Mailgun bridge. Not sent in any provider format: IP addresses, user agents, geolocation and provider metadata such as Postmark's Metadata or Mailjet's CustomID, which Mailaki does not keep, and the test event.

Event types

These are the events that are sent to webhooks. Subscribe by listing them in event_types.

EventDescription
deliveredHanded over for delivery and accepted by the outgoing mail relay
bouncedPermanent delivery failure
deferredTemporary failure; delivery will be tried again
droppedNot sent (for example the recipient is on your suppression list)
complainedRecipient marked the email as spam
openedRecipient opened the email (open tracking)
clickedRecipient clicked a tracked link; data.url is the link
unsubscribedRecipient used the unsubscribe link; data.email is the address
cancelledYou cancelled a scheduled or queued message before it was sent; data.scheduled_at, data.usage_refunded. Native (mailaki) format only
api_key.expiringOne of your API keys expires soon (message_id holds the key id)
verification.completedA bulk verification job has finished (message_id holds the job id, data the job and its counts)

A webhook that lists accepted in its event_types gets one event per recipient when the message is queued, with the message id as the event id and data.to. It is not written to the event log, and a per-message webhook_url does not get it. When a message was sent with metadata, every event of it carries it as data.metadata.

Events and analytics

Every message leaves a trail of events: accepted, delivered, deferred, bounced, dropped, opened, clicked, complained, unsubscribed, cancelled. Read them with GET /v1/events, newest first.

Bounces for one tag since 1 November
curl "https://mailaki.com/v1/events?event_type=bounced&tag=welcome&from=2026-11-01T00:00:00Z&limit=100" \
  -H "Authorization: Bearer mf_live_..."
FilterMeaning
event_typeOne type, or several separated by commas
recipientExact recipient address
message_idOne message
domainOne of your sending domains
tagMessages carrying this tag
metadata.<key>Messages sent with this metadata value, exact match, e.g. metadata.order=42 (also metadata[order]=42). Repeat for several keys (all must match, up to 10). In the export body: "metadata": {"order": "42"}
from, toTime range (RFC 3339)

The response has data and pagination. While pagination.has_more is true, pass pagination.next_cursor as cursor to get the next page. Pages hold up to 100 events.

Export events to CSV
curl -X POST https://mailaki.com/v1/events/export \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"event_type": "bounced,complained", "tag": "invoice", "metadata": {"order": "42"}, "from": "2026-11-01T00:00:00Z"}'

# {"id": "0193a1f2-...", "status": "pending", ...}

curl https://mailaki.com/v1/events/export/0193a1f2-... \
  -H "Authorization: Bearer mf_live_..."

# {"status": "completed", "row_count": 1830, "truncated": false,
#  "download_url": "/v1/events/export/0193a1f2-.../download", "expires_at": "..."}

curl -o events.csv https://mailaki.com/v1/events/export/0193a1f2-.../download \
  -H "Authorization: Bearer mf_live_..."

The export takes the same filters as the list, in a JSON body. It runs in the background: poll the job until status is completed, then download the file with your API key. You can run one export at a time (a second request returns 409). A file holds at most 100,000 events; a longer result is cut there, newest first, and the job says "truncated": true. Files are deleted after 7 days.

Breakdowns
curl "https://mailaki.com/v1/stats/breakdown?by=provider&days=30" \
  -H "Authorization: Bearer mf_live_..."

# {"by": "provider", "days": 30, "data": [
#   {"key": "google", "sent": 1200, "delivered": 1180, "bounced": 12, "deferred": 8, "dropped": 0},
#   {"key": "other", "sent": 640, ...}]}

by is provider, tag, domain (your sending domain), bounce_category, client or country. The provider is worked out from the recipient's domain using a list of consumer mail domains: google (Gmail), microsoft (Outlook, Hotmail, Live), yahoo (Yahoo, AOL), apple (iCloud) and other. A company domain hosted at Google or Microsoft is counted as other.

by=client counts opens and clicks by mail client, taken from the User-Agent of the open or click: gmail, apple_mail, outlook, yahoo, thunderbird, browser, other and unknown. Each row has opened and clicked (event counts). Gmail and Yahoo load images through their own proxies, so those rows do not tell you the reader's device. The client is recorded since 2026-11-21; older opens and clicks are unknown. The open and click events carry it as details.client.

by=country counts the same events by the two-letter country code (DE, US, ...) of the address the open or click came from, looked up in a GeoIP database configured on the server. Only the code is stored (as details.country, also in the webhook data), never the address. The response adds geoip_configured and attribution (the credit line the database's licence asks for). Without a database, for addresses it does not cover, and for events recorded before the lookup existed, the key is unknown. Opens through the Gmail and Yahoo image proxies and Apple Mail Privacy Protection show the proxy's country.

Retention. The Free plan keeps events and message records for 30 days, paid plans for 12 months. Message bodies are kept for 30 days on every plan. Automatic deletion at these limits is not switched on yet, so older data is currently still kept unless you set your own retention; plan.enforced in GET /v1/retention says whether it is on. GET /v1/retention returns your plan's values, and PUT /v1/retention lets you set shorter ones.

Erase a recipient's data

When someone asks you to delete their data (GDPR right to erasure), one call removes what your account holds about their email address. It needs an API key with the admin scope.

Erase one address
curl -X POST https://mailaki.com/v1/data-removals \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]"}'
Response
{
  "id": "0193a1f2-...",
  "email_hash": "sha256:5f2c0e...",
  "requested_by": "api key 0192c4d1-...",
  "counts": {
    "messages_deleted": 2,
    "events_deleted": 3,
    "list_members_deleted": 1,
    "stored_messages_deleted": 0
  },
  "blobs_deleted": 2,
  "blobs_pending": 0,
  "bodies_rewritten": 1,
  "bodies_pending": 0,
  "retries_failed": 0,
  "created_at": "2026-11-19T10:00:00Z",
  "completed_at": "2026-11-19T10:00:00Z"
}
DataWhat happens
Messages sent to the address, with their delivery, open and click eventsDeleted, including messages still queued
Stored message bodiesDeleted when the message went only to that address. A body shared with other recipients of the same send is kept for them, with the address taken out of its To and Cc headers once their deliveries are finished. The address stays if it appears elsewhere in that body (subject, text)
Inbound mail from or to the address, with attachmentsDeleted
Mailing-list membershipsDeleted. Adding the address to a list, or as an exact entry of a sender allow/block list, is refused afterwards
DraftsDeleted if addressed only to that address, otherwise the address is removed
Mentions in event payloads, failed webhook deliveries and your activity logReplaced by [erased]
Proof of Sending certificates issued for the addressTheir content (which includes the address) is removed from our registry; only a fingerprint of each entry is kept
Suppression entryReplaced by a SHA-256 hash of the address, so later sends to it are still dropped

Only your own account is affected. The address is never stored in the request log: email_hash is sha256: followed by the SHA-256 of <your account id>:<lowercased address>. The counts object in a real response lists every table. blobs_pending and bodies_pending count stored files not changed yet: failed deletes are retried automatically for about a day, and shared bodies wait for their other deliveries. retries_failed above zero means some could not be changed after every retry; contact us. Webhooks already delivered to your endpoint and backups taken before the request are not changed.

List your erasure requests
curl https://mailaki.com/v1/data-removals \
  -H "Authorization: Bearer mf_live_..."

Monthly allowance and multi-recipient sends

Every recipient is one email against your plan's monthly allowance (and its daily limit, if it has one). A send to several recipients is accepted only if all of them fit in what is left this month: the rest of the allowance, plus prepaid credits, plus what is left under your overage cap when overage is on. Otherwise nothing is sent and the response is 429 with code quota_exceeded, saying how many fit:

{"error": "quota exceeded: monthly email limit: this send has 3 recipients but only 2 more emails fit this month (4998/5000 of the plan's allowance used, prepaid credits and the overage cap included). Nothing was sent: send to at most 2 recipients, or add credits, raise the overage cap or upgrade your plan.",
 "code": "quota_exceeded", "status": 429}

POST /v1/messages/batch checks each message in turn, after the ones before it were counted: a message that does not fit is listed in errors with its index and is not sent; the messages before it are sent.

The check and the counting cannot be raced: a send reserves its emails before it queues them, and a send that starts at the same moment sees that reservation. Several requests in parallel near the end of the allowance therefore together send at most what is left, never more; the ones that do not fit get the 429. A send that fails before its messages are queued gives the reservation back. This holds for the JSON, batch, form and MIME endpoints, SMTP, resends and the provider bridges.

Is overage charged?

Emails past the allowance are always counted (overage in GET /v1/billing/usage). Whether they are invoiced is in the same response, and in GET /v1/billing/settings:

"overage_charging": {
  "status": "not_configured",
  "charged": false,
  "detail": "Emails past the allowance are counted and shown, but not charged: overage invoicing is not switched on."
}

status is active (added to your subscription's invoice), not_configured, scheduled (charged from a later month on), no_subscription, no_metered_price or not_sold (the plan has no overage). charged is true only for active. Prepaid credits are always used before overage, and overage never passes your cap.

Change billing interval or plan

An account with a subscription can move it to yearly or monthly billing, or to another plan, on the Billing page or through the API (scope admin). Fields you leave out stay as they are:

curl -X POST https://mailaki.com/v1/billing/subscription/change \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"interval": "annual"}'

The change applies at once and is prorated by our payment provider: time already paid for is credited, the new price is charged for the rest. subscription_change.options in GET /v1/billing/settings lists every interval and currency with available and, when it is not, the reason. Asking for a combination that has no price returns 400 with that reason and changes nothing. An account without a subscription subscribes with POST /v1/billing/checkout first.

Currency. You choose USD or EUR before you subscribe (PUT /v1/billing/settings with currency, or the selector on the Billing page). The currency cannot be changed on an existing subscription: a request with another currency returns 409 with code currency_change_not_supported and changes nothing, and currency_locked is true in the settings. To change it, cancel the subscription at the end of the paid period and subscribe again in the other currency.

Credit pack payments, refunds and disputes

GET /v1/billing/credits lists your card purchases under purchases with a status. A pack paid with a method that confirms later is pending and its credits are added when the payment is confirmed; if it fails, nothing is added. When a pack is refunded, the refunded share of its credits is removed as far as they are unused (the balance never goes below zero); a disputed payment removes the pack's unused credits, and they return if the dispute is closed in our favour. Each of these is a row in history with kind refund, dispute or dispute_won.

Usage notices

The account owner gets an email when this month's usage reaches 80% and 100% of the plan's allowance. To switch them off (or on again), use the Billing page or the API; reading the setting needs read, changing it admin:

curl -X PUT https://mailaki.com/v1/billing/notices \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"usage_notices": false}'

Import a suppression list

Bring the addresses you must not mail (bounces, complaints, unsubscribes) from a CSV file or a JSON list. In the portal it is Settings → Suppression List → Import. Through the API it needs the send scope.

CSV
address,type,reason,date
[email protected],bounce,550 no such user,2026-01-31T12:00:00Z
[email protected],complaint,,2026-02-01
[email protected],unsubscribe,,
Upload it
curl -X POST https://mailaki.com/v1/suppressions/import \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: text/csv" \
  --data-binary @suppressions.csv
ColumnMeaning
address (or email)Required.
typebounce, complaint or unsubscribe. Rows without one get the ?reason= query value (default manual).
reasonOptional free text, such as the SMTP error. Returned as detail.
dateOptional. RFC 3339, YYYY-MM-DD, RFC 2822 or unix seconds. Without it the import time is used.

A file exported from GET /v1/suppressions/export (email,reason,created_at) imports as it is. A multipart upload (file field) and a JSON array of addresses or {address, type, reason, date} objects are accepted too.

Limits: 25 MB and 500,000 rows per import. A body up to 512 KB is imported before the response, which is the report below. A larger one, or any request with ?async=true, is answered with 202 and a status_url; read that URL until status is completed or failed. One import runs per account at a time.

Report
{
  "received": 3,
  "imported": 2,
  "skipped_existing": 1,
  "duplicates": 0,
  "invalid_count": 0,
  "invalid": []
}

Rows that cannot be used (bad address, unknown type, unreadable date) are listed in invalid with their line number and do not stop the import. Addresses already on your list are left untouched, so importing the same file twice changes nothing, and a bounce we recorded ourselves is never overwritten. An address you erased is not added back. Imported entries carry "source": "import:csv" and are not counted in your complaint rate.

Import from another provider

The portal's Import page (owners and admins) copies your setup from Mailgun, SendGrid, Postmark, Brevo or Mailjet: choose the provider, paste an API key, pick what to import and watch the progress. The same thing through the API needs the admin scope:

curl -X POST https://mailaki.com/v1/imports \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"provider": "mailgun", "region": "eu", "api_key": "...",
       "categories": ["templates", "suppressions", "domains", "team_members"]}'

curl https://mailaki.com/v1/imports/<id> -H "Authorization: Bearer mf_live_..."
CategoryWhat the import does
TemplatesCreated in your account. The provider's template id or name is kept as an alias, so the Mailgun, SendGrid, Postmark, Brevo and Mailjet bridges keep resolving it. A template imported before is updated when it changed at the provider, unless you edited it here since.
SuppressionsBounces, complaints and unsubscribes are added with their reason and date. An entry an earlier import from the same provider added gets the provider's current reason; any other existing entry is left untouched.
DomainsAdded unverified. You still publish our DNS records (shown in the result and on the Domains page) and verify each domain.
Team membersListed only. Nobody is invited until you choose who to invite.
ProviderKeyNot available
Mailgun (us, eu)Private API key
SendGrid (global, eu)API key with read access
PostmarkServer API token; account_key (account API token) for domainsTeam members: Postmark has no API that lists users
BrevoAPI key
MailjetAPI key, and the secret key as account_key (both required)Team members: Mailjet's API does not list them. Suppressions are the exclusion list (spam complaints, unsubscribes, contacts excluded by hand); hard bounces are not read

Template variables. Our templates are Handlebars. SendGrid dynamic templates need no change. Mailgun's %recipient.name% becomes {{name}}, Postmark's {{.}} becomes {{this}}, Brevo's {{ params.NAME }} becomes {{NAME}}, and Mailjet's {{var:name}} and {{data:name}} become {{name}} (a default value after a second colon is dropped). Everything else is left as written and listed for review in the result: other Mailgun %...% variables, SendGrid legacy substitution tags, Postmark {{#name}} sections, Brevo and Mailjet {% %} tags, Brevo filters and contact attributes, Mailjet [[...]] tags. A template that is not valid Handlebars after that is not imported and is named in errors.

The key. It is used for that one import, held in memory until the import ends, and never stored, logged or returned by any endpoint. A read-only key is enough: the old provider is only read, never changed. While the import runs the key is kept encrypted, so an import interrupted by a restart on our side continues by itself; it is deleted when the import ends. Running an import again picks up changes and skips what is already here.

Re-sync. Add "resync_interval_hours" (1, 6, 24 or 168) to run the same import again on that schedule until you switch over. The key is then kept encrypted until you stop it. Each run adds what is new and updates what changed, as above. With "remove_deleted": true (on the import or the schedule) a run also removes templates and suppressions an earlier import from that provider brought in and the provider no longer has: only after the whole list was read, never when the provider returned no suppressions at all, and never a template you edited here. Without it nothing is deleted. GET /v1/imports/schedules lists your schedules (never the key); DELETE /v1/imports/schedules/<id> stops one and deletes its key.

Proof of Sending

Add "certify": true to a send and Mailaki issues a certificate for each recipient: a signed statement of what was sent, to whom, when we accepted it, and what happened to it. Anyone you give the certificate to can check it, without an account. Available on the Growth and Scale plans.

Send with a certificate
curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"domain_id": "YOUR_DOMAIN_UUID", "from": "[email protected]",
       "to": ["[email protected]"], "subject": "Payment reminder",
       "text": "Your invoice 1042 is due on 1 December.", "certify": true}'
Get the certificate (JSON, or add .pdf)
curl https://mailaki.com/v1/messages/MESSAGE_ID/certificate \
  -H "Authorization: Bearer mf_live_..."
Response (shortened)
{
  "certificate_id": "cert_3f9a...",
  "sequence": 3,
  "state": "delivered",
  "certificate": {
    "type": "mailaki.proof-of-sending",
    "sender": "[email protected]",
    "recipient": "[email protected]",
    "content": {
      "message_sha256": "9b1c...",
      "subject_sha256": "5d0e...",
      "text_sha256": "c41a...",
      "html_sha256": null,
      "normalization": "mailaki-text-v1"
    },
    "accepted_at": "2026-11-19T10:00:00.120000Z",
    "relayed_at": "2026-11-19T10:00:02.480000Z",
    "delivery_confirmed_at": "2026-11-19T10:00:04.910000Z",
    "statement": "This certificate records that Mailaki accepted a message with this content fingerprint, ..."
  },
  "jws": "eyJhbGciOiJFZERTQSIs...",
  "verify_url": "https://mailaki.com/verify/cert_3f9a...",
  "history": [ ... ]
}

What it records, and what it does not show

A certificate records that Mailaki accepted a message with the stated content fingerprint, from the stated sender, for the stated recipient, at the stated time, and it records what happened next: when the message was handed to the next mail server and what the receiving side reported. It is signed by Mailaki with Ed25519 and is an entry in a hash-chained registry (see Verifying).

It does not show that a person received, opened or read the message. It is not a qualified electronic registered delivery service under Regulation (EU) No 910/2014 (eIDAS), and Mailaki is not a qualified trust service provider. A certificate is a technical record: it is not a legal guarantee, and nothing here is legal advice.

States

StateMeaning
pendingAccepted by Mailaki and queued
relayedHanded to the next mail server (relayed_at)
deliveredThe recipient's mail server accepted it, as reported back to us (delivery_confirmed_at)
failedDelivery failed for good; failure_reason has the reason

A certificate is never edited. When the state changes, a new version is signed with the next sequence, and earlier versions stay valid; history lists them all. Certificates cannot be changed or deleted through the API, and each one is an entry in an append-only registry in which every entry contains the hash of your previous entry. GET /v1/certificates/chain checks that chain. Entries are kept for 12 months.

GET /v1/certificates lists your certificates, newest first, each with its latest state, the recipient, the message subject (while the message record exists), verify_url and pdf_url. Filter with state, page with limit and cursor (pagination.next_cursor). The portal's Certificates page shows the same list, and the account data export includes your certificates.

Verifying

  • On the web: open verify_url, or paste the certificate at mailaki.com/verify. The page can be printed.
  • By API, without a key: POST /v1/certificates/verify with {"certificate_id": "cert_..."} or {"jws": "..."}.
  • Without Mailaki: the certificate (jws) is a standard JWS signed with Ed25519 (alg: EdDSA). Our public keys are a JWK Set at https://mailaki.com/.well-known/mailaki/certificate-keys; pick the key whose kid matches the JWS header and verify with any JOSE library. Keys we stop using stay listed, so old certificates remain verifiable.
Verify by id
curl -X POST https://mailaki.com/v1/certificates/verify \
  -H "Content-Type: application/json" \
  -d '{"certificate_id": "cert_3f9a..."}'

Checking the content

The certificate holds fingerprints, not the message. message_sha256 is the SHA-256 of the complete message as we stored it for delivery. To let someone match their own copy of the text, subject_sha256, text_sha256 and html_sha256 are SHA-256 hashes of the normalized subject and bodies (mailaki-text-v1):

  • Subject: runs of whitespace become one space; leading and trailing whitespace is removed.
  • Bodies: line endings become \n; trailing spaces and tabs are removed from every line; empty lines at the start and end are removed.
  • Encode as UTF-8, hash with SHA-256, write as lowercase hex.

The HTML hash is of the HTML as delivered. With open or click tracking on, that includes the rewritten links and the tracking pixel, so turn tracking off for a certified message if the hash has to match your own HTML.

Good to know

  • certify works on every send endpoint of the API (batch, MIME, form as o:certify=yes, draft sends and replies; see Send options on every endpoint), not on SMTP or the provider bridges.
  • A test key cannot certify: test messages are never delivered. The request is refused with 400.
  • Each recipient (to, cc, bcc) gets their own certificate. Suppressed recipients are not sent to and get none.
  • delivered depends on the receiving side reporting back through our relay. Without that report a certificate stays at relayed.
  • If you erase a recipient's data, the content of their certificates is removed from our registry and can no longer be fetched from us. A copy you or they already hold still verifies offline.

SDKs

There are client libraries for seven languages. They all cover the same endpoints: sending (single, batch and raw MIME, with the require_tls, certify, verify, webhook_url, metadata and tracking options where the endpoint takes them), message status and events, multipart form sends, the message list, scheduled sends (list, cancel, reschedule), resends, address verification (single check, bulk jobs, settings, per-domain overrides and allow/block rules), address verification usage, webhooks (create, update, delete, test, secret rotation, failed deliveries and their replay or discard, account-wide or per webhook, delivery history), domains and their DNS records and DKIM key rotation, templates (with preview, versions, restore, diff, inline render, syntax check, the starter gallery and the AI builder), suppressions (with import, the bounce, complaint and unsubscribe lists and the soft-bounce settings), stats (totals, time series, monthly, breakdown), the event log with metadata filters and its CSV export, retention settings, imports from other providers and their schedules, data removals, Proof of Sending certificates (with the PDF and the chain check), hosted uploads, billing (plans, usage and its monthly history, quota, settings, prepaid credits, usage notices, checkout and portal links, dedicated IPs), API keys (create, list, update, rotate, revoke), mailing lists and their members (with CSV/JSON import and CSV export), inbound routes, stored inbound messages (with the list of mailboxes, per-mailbox filters and mark-read, and moving a message to a folder) and the inbound authentication mode, inboxes and their folders (list, create, rename, delete), threads, drafts, labels, pods, attachments and sender lists. Anything else is reachable through each SDK's raw request method.

None of them is on a package registry yet. The registry install lines below are the package names we will publish under; they do not work today. For now the SDKs are source-only: each one lives in the sdks/ directory of the Mailaki source repository, and the "from source" line shows how to use it from a copy of that directory. That repository is private, so today the SDKs are only usable by people who have access to it. Until they are published, the REST API works from any HTTP client (see cURL), and the OpenAPI spec and Postman collection are public.

LanguagePackage nameRegistryPublished
PythonmailakiPyPINo, source only
TypeScript / JavaScript@mailaki/sdknpmNo, source only
PHPmailaki/mailakiPackagistNo, source only
RubymailakiRubyGemsNo, source only
Gogithub.com/mailaki/mailaki/sdks/goGo modulesNo, source only
Javacom.mailaki:mailakiMaven CentralNo, source only
C# / .NETMailakiNuGetNo, source only

Python SDK

Python 3.9+. Sync and async clients; also installs the mailaki command. Source: sdks/python.

Install from PyPI (not published yet)
pip install mailaki
Install from source (works today)
pip install ./sdks/python
Send an email
from mailaki import Mailaki

client = Mailaki(api_key="mf_live_...")

result = client.messages.send(
    domain_id="YOUR_DOMAIN_UUID",
    from_addr="[email protected]",
    to=["[email protected]"],
    subject="Welcome!",
    text="Thanks for signing up.",
    html="<h1>Welcome!</h1><p>Thanks for signing up.</p>"
)
print(result["ids"])  # ['0193abc0-...']

# Create an inbox for receiving, then read what arrives
inbox = client.inboxes.create(address="[email protected]")
messages = client.inboxes.list_messages(inbox["id"])

TypeScript SDK

Node 18+, Deno, Bun and browsers. No runtime dependencies. Source: sdks/typescript.

Install from npm (not published yet)
npm install @mailaki/sdk
Install from source (works today)
cd sdks/typescript && npm ci && npm run build && npm pack   # then: npm install ./mailaki-sdk-0.1.0.tgz
Send an email
import { Mailaki } from "@mailaki/sdk";

const client = new Mailaki("mf_live_...");

const result = await client.messages.send({
  domain_id: "YOUR_DOMAIN_UUID",
  from: "[email protected]",
  to: ["[email protected]"],
  subject: "Welcome!",
  text: "Thanks for signing up.",
  html: "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
});
console.log(result.ids);

// Create an inbox, then read what arrives
const inbox = await client.inboxes.create({ address: "[email protected]" });
const messages = await client.inboxes.listMessages(inbox.id);

PHP SDK

PHP 8.1+ with ext-curl. No other runtime dependencies. Source: sdks/php.

Install from Packagist (not published yet)
composer require mailaki/mailaki
Install from source (works today)
# composer.json: add sdks/php as a "path" repository, then
composer require mailaki/mailaki
Send an email
<?php
require 'vendor/autoload.php';

$client = new \Mailaki\Client('mf_live_...');

$result = $client->messages->send([
    'domain_id' => 'YOUR_DOMAIN_UUID',
    'from' => '[email protected]',
    'to' => ['[email protected]'],
    'subject' => 'Welcome!',
    'text' => 'Thanks for signing up.',
    'html' => '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
]);
print_r($result['ids']);

Ruby SDK

Ruby 3.0+. No runtime dependencies. Source: sdks/ruby.

Install from RubyGems (not published yet)
gem install mailaki
Install from source (works today)
# Gemfile
gem "mailaki", path: "sdks/ruby"
Send an email
require "mailaki"

client = Mailaki::Client.new("mf_live_...")

result = client.messages.send(
  domain_id: "YOUR_DOMAIN_UUID",
  from: "[email protected]",
  to: ["[email protected]"],
  subject: "Welcome!",
  text: "Thanks for signing up.",
  html: "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
)
puts result["ids"]

Go SDK

Go 1.21+. Standard library only. Source: sdks/go.

Install from Go modules (not published yet)
go get github.com/mailaki/mailaki/sdks/go
Install from source (works today)
# go.mod
require github.com/mailaki/mailaki/sdks/go v0.1.0
replace github.com/mailaki/mailaki/sdks/go => ./path/to/sdks/go
Send an email
package main

import (
	"context"
	"fmt"
	"log"

	mailaki "github.com/mailaki/mailaki/sdks/go"
)

func main() {
	client := mailaki.New("mf_live_...")

	result, err := client.Messages.Send(context.Background(), &mailaki.SendMessageParams{
		DomainID: "YOUR_DOMAIN_UUID",
		From:     "[email protected]",
		To:       []string{"[email protected]"},
		Subject:  "Welcome!",
		Text:     "Thanks for signing up.",
		HTML:     "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(result.IDs)
}

Java SDK

Java 11+. Depends on Jackson for JSON. Sending, scheduled sends, verification, webhook deliveries, data removals, certificates, uploads and usage return typed classes (com.mailaki.model); the inbox, thread, draft, label, pod, attachment and sender-list methods still return Map and List values. Source: sdks/java.

Install from Maven Central (not published yet)
<dependency>
  <groupId>com.mailaki</groupId>
  <artifactId>mailaki</artifactId>
  <version>0.1.0</version>
</dependency>
Install from source (works today)
cd sdks/java && mvn install   # installs com.mailaki:mailaki:0.1.0 into your local Maven repository
Send an email
import com.mailaki.Mailaki;
import com.mailaki.model.SendResult;
import java.util.List;
import java.util.Map;

Mailaki client = new Mailaki("mf_live_...");

SendResult result = client.messages().send(Map.of(
    "domain_id", "YOUR_DOMAIN_UUID",
    "from", "[email protected]",
    "to", List.of("[email protected]"),
    "subject", "Welcome!",
    "text", "Thanks for signing up.",
    "html", "<h1>Welcome!</h1><p>Thanks for signing up.</p>"));
System.out.println(result.getIds());

C# / .NET SDK

.NET 8. No dependencies outside the base class library. Source: sdks/csharp.

Install from NuGet (not published yet)
dotnet add package Mailaki
Install from source (works today)
dotnet add reference path/to/sdks/csharp/src/Mailaki/Mailaki.csproj
Send an email
using Mailaki;

using var client = new MailakiClient("mf_live_...");

var result = await client.Messages.SendAsync(new SendMessageRequest
{
    DomainId = "YOUR_DOMAIN_UUID",
    From = "[email protected]",
    To = new[] { "[email protected]" },
    Subject = "Welcome!",
    Text = "Thanks for signing up.",
    Html = "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
});
Console.WriteLine(string.Join(", ", result.Ids));

cURL

No SDK needed — the API is a standard REST JSON API. Set two headers and you're done:

curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer mf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"domain_id":"...","from":"[email protected]","to":["[email protected]"],"subject":"Hi","text":"Hello"}'

Postman collection

A Postman collection (v2.1) with one request per endpoint of the OpenAPI spec, grouped by resource: mailaki.postman_collection.json. In Postman choose Import and pick the file or paste its URL, then set the collection variable apiKey to your API key. baseUrl defaults to https://mailaki.com/v1.

The collection is generated from the OpenAPI spec, so it covers exactly the endpoints the spec describes. The WebSocket stream (/v1/stream) is not in it, because a Postman HTTP request cannot open a WebSocket.

Mailgun bridge

Moving from Mailgun? Keep your Mailgun client. Point it at the Mailaki bridge and use a Mailaki API key in place of your Mailgun key. Sends go through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/mailgun

Authentication is Mailgun's: HTTP Basic with username api and your Mailaki key as the password. The domain in the path must be a verified domain on your Mailaki account.

cURL
curl -s --user "api:mf_live_your_api_key" \
  https://mailaki.com/bridge/mailgun/v3/yourdomain.com/messages \
  -F from="Your App <[email protected]>" \
  -F to="[email protected]" \
  -F subject="Hello" \
  -F text="Sent through the Mailgun bridge"
Node (mailgun.js)
const mg = new Mailgun(FormData).client({
  username: "api",
  key: process.env.MAILAKI_API_KEY,
  url: "https://mailaki.com/bridge/mailgun",
});
await mg.messages.create("yourdomain.com", {
  from: "Your App <[email protected]>",
  to: ["[email protected]"],
  subject: "Hello",
  text: "Sent through the Mailgun bridge",
});

Supported endpoints

EndpointNotes
POST /v3/{domain}/messagesMultipart or URL-encoded. Returns {"id", "message"} as Mailgun does.
POST /v3/{domain}/messages.mimeto plus a message part holding a complete MIME message. The sender is taken from its From header.
GET /v3/{domain}/eventsMailgun's items and paging. Filters: event, severity, recipient, begin, end, ascending, limit (up to 300).
GET /v3/{domain}/stats/totalCounts per hour, day or month for event (required, repeatable): accepted, delivered, failed, opened, clicked, unsubscribed, complained. start, end, duration (7d, 24h, 1m). Only counters Mailaki records are returned.
GET /v3/{domain}/tag/stats?tag=The same counts for the messages sent with one tag (o:tag), plus tag and description. 404 for a tag no message of the domain was sent with. The provider, device and country filters are refused with 400: Mailaki does not record them.
GET /v3/{domain}/tags, GET /v3/{domain}/tag?tag=The tags your messages were sent with, with first-seen and last-seen; prefix filter and paging.
GET /v3/domainsYour domains, with state active or unverified.
GET /v3/domains/{domain}One domain. DNS records are not mirrored; see the portal.
/v3/{domain}/bounces, /unsubscribes, /complaintsList, get one address, add one or up to 1,000 as a JSON array, delete one address.
/v3/{domain}/templatesList, create, get, update and delete by name. One version per template.
/v3/domains/{domain}/webhooksList, create, replace and delete by name. Delivered in Mailgun's format with Mailgun's signature.
GET /v5/accounts/http_signing_keyThe key those webhooks are signed with.
/v3/lists and /v3/lists/{address}/membersMailing lists and their members, including members.json for up to 1,000 members.

Send fields

FieldStatus
from, to, cc, bcc, subject, text, htmlSupported. Address lists may be comma-separated or repeated.
attachmentSupported.
inlineSupported: sent as an inline part (with the HTML, in multipart/related) whose Content-ID is the file name, so <img src="cid:logo.png"> shows it.
to set to a mailing list addressSent to the list's subscribed members.
o:tagSupported, repeatable.
o:tracking, o:tracking-opens, o:tracking-clicksSupported.
o:deliverytimeSupported (RFC 2822 date).
o:testmodeSupported: the request is accepted and nothing is sent.
h:X-My-Header, h:Reply-ToSupported.
v:my-var, t:variablesUsed as template variables. The v: variables are also kept with the message (up to 50) and returned as user-variables in events and webhooks.
o:certifySupported: Proof of Sending, as on POST /v1/messages. The header X-Mailaki-Certify: true does the same.
o:require-tlsSupported: require TLS for the message.
recipient-variablesSupported. One message per recipient; %recipient.name% in the subject and body is replaced.
templateThe name (or id) of a template in your Mailaki account. Create it through the bridge or the Mailaki API; templates are not copied from Mailgun for you.
o:dkim, o:skip-verification, o:sending-ip-pool, t:version, t:textIgnored.

Events

Events use Mailgun's names: accepted, delivered, failed (with severity permanent or temporary), opened, clicked, complained and unsubscribed. Each item carries id, event, timestamp, recipient, message.headers, tags and, for failures, severity, reason and delivery-status. user-variables holds the send's v: variables. Fields Mailaki does not record, such as geolocation and client-info, are left out.

Webhooks in Mailgun's format

A webhook created through the bridge receives the body your Mailgun receiver already parses, {"signature": {"timestamp", "token", "signature"}, "event-data": {...}}, signed the way Mailgun signs it: hex HMAC-SHA256 of timestamp + token. The key is your Mailaki bridge signing key, not your old Mailgun one. Read it once and put it where your receiver keeps the Mailgun signing key:

curl -s --user "api:mf_live_your_api_key" \
  https://mailaki.com/bridge/mailgun/v5/accounts/http_signing_key

curl -s --user "api:mf_live_your_api_key" \
  https://mailaki.com/bridge/mailgun/v3/domains/yourdomain.com/webhooks \
  -F id=delivered \
  -F url=https://yourapp.com/webhooks/mailgun

Webhook names: accepted (sent when a message is queued), delivered, permanent_fail, temporary_fail, opened, clicked, complained, unsubscribed. Creating or changing webhooks needs an API key with the admin scope.

Differences from Mailgun

AreaDifference
SuppressionsOne list per account, not per domain: every domain of your account shows and changes the same bounces, unsubscribes and complaints. An address is on one of the three lists. code, error and tags are not stored, and a whole list cannot be cleared in one call.
TemplatesPer account, with one version each. POST .../templates/{name}/versions with active=yes replaces that version. Handlebars {{var}}, {{#if}}, {{#unless}}, {{#each}} and {{#with}} render; a helper Mailaki does not have, such as Mailgun's {{#equal}}, makes sends with that template fail.
Eventsrejected and stored do not exist. The message-id in an event is the id the send returned for that recipient.
Mailing listsA list's or member's address cannot be changed. Lists that use double opt-in take new members only through the Mailaki API.

Not mirrored

Routes, per-tag stats, IPs, validation, domain changes and template version history are not mirrored. Those requests return 404 with a message saying so. Use the Mailaki API for inbound routes (/v1/routes) and stats.

Scopes

Reads need the read scope, sending and changes to suppressions and templates need send, changes to mailing lists need inboxes, and changes to webhooks and reading the signing key need admin.

SendGrid bridge

Moving from SendGrid? Keep your SendGrid client. Point it at the Mailaki bridge and use a Mailaki API key in place of your SendGrid key. Each personalization goes through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/sendgrid

Authentication is SendGrid's: Authorization: Bearer with your Mailaki key. The from address must be on a verified domain of your Mailaki account.

cURL
curl -s -X POST https://mailaki.com/bridge/sendgrid/v3/mail/send \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "personalizations": [{"to": [{"email": "[email protected]"}]}],
    "from": {"email": "[email protected]", "name": "Your App"},
    "subject": "Hello",
    "content": [{"type": "text/plain", "value": "Sent through the SendGrid bridge"}]
  }'
Node (@sendgrid/mail)
const sgMail = require("@sendgrid/mail");

sgMail.setApiKey(process.env.MAILAKI_API_KEY);
// After setApiKey: setApiKey resets the base URL to SendGrid's.
sgMail.client.setDefaultRequest("baseUrl", "https://mailaki.com/bridge/sendgrid");

await sgMail.send({
  to: "[email protected]",
  from: { email: "[email protected]", name: "Your App" },
  subject: "Hello",
  text: "Sent through the SendGrid bridge",
});

The client prints a warning that the key does not start with SG.; it still sends it.

Supported endpoints

EndpointNotes
POST /v3/mail/sendReturns 202 with an empty body and an X-Message-Id header, as SendGrid does. Body up to 30 MB.
GET /v3/suppression/bouncesAddresses suppressed for bouncing. reason is a fixed sentence and status is empty.
GET /v3/suppression/spam_reportsAddresses that filed a complaint. ip is empty.
GET /v3/suppression/unsubscribesUnsubscribed addresses.
GET, POST /v3/asm/groups; GET, PATCH, DELETE /v3/asm/groups/{group_id}Unsubscribe groups: name (up to 30 characters, unique), description (up to 100), is_default; reads add unsubscribes. Group ids are numbered per account. Deleting a group deletes its unsubscribes.
GET, POST /v3/asm/groups/{group_id}/suppressions; DELETE .../suppressions/{email}The addresses unsubscribed from one group: a JSON array of addresses; add with {"recipient_emails": [...]} (up to 1,000). Another account's group, or one that does not exist, is 404.
GET /v3/messagesEmail Activity: one entry per recipient, newest first, with msg_id (the X-Message-Id), status (delivered, not_delivered, processing), opens_count, clicks_count, last_event_time. limit up to 1000. query takes field="value" conditions joined by AND on to_email, from_email, subject, msg_id and status; other query syntax is refused with 400.

The suppression lists take limit (up to 500), offset, start_time, end_time and email. Errors use SendGrid's shape: {"errors":[{"message","field","help"}]}.

Send fields

FieldStatus
personalizations[]: to, cc, bcc, subject, from, headers, send_atSupported. Each personalization is its own message. Recipient display names are dropped.
dynamic_template_dataSupported: variables of the template, including nested objects, {{#each}} and {{#if}}.
substitutionsSupported: each token is replaced literally in the subject and content.
from, reply_to, reply_to_list, subject, headers, send_atSupported.
content[]text/plain and text/html. Other types are refused.
attachments[]Supported (content, filename, type). disposition: inline with a content_id is an inline part next to the HTML, so <img src="cid:..."> shows it.
custom_argsSupported, top level and per personalization (string values, up to 10,000 bytes). Kept with each message and returned as top-level keys of each event in a SendGrid-format webhook, as data.metadata in Mailaki webhooks, and as metadata of GET /v1/messages/{id}.
asm.group_idOne of your unsubscribe groups (400 otherwise). The message is not sent to addresses unsubscribed from that group or from everything. Each recipient gets an own copy with a one-click List-Unsubscribe header (unless you set one yourself) that unsubscribes from that group only; <%asm_group_unsubscribe_raw_url%>, <%asm_global_unsubscribe_raw_url%> and <%asm_preferences_raw_url%> in the content become that link, a link that unsubscribes from everything, and the copy's preferences page. The links are signed. Click tracking leaves them alone. groups_to_display (up to 25 of your group ids) limits the groups the preferences page shows; without it the page shows all of them.
Header X-Mailaki-Certify: trueProof of Sending for every message of the request.
template_idThe name or id of a template in your Mailaki account, or the SendGrid id (d-...) of a template you imported from SendGrid. A Mailaki template named after the SendGrid id is used as well.
categoriesSupported, as tags.
tracking_settings.click_tracking, open_trackingSupported (enable).
mail_settings.sandbox_modeSupported: the request is validated, answered 200, and nothing is sent.
batch_id, ip_pool_name, mail_settings.bypass_*, mail_settings.footer, subscription_tracking, ganalyticsIgnored.

Not available yet

GET /v3/suppression/blocks and /invalid_emails always return an empty list, so a client that syncs every list keeps working: an address that does not exist is a hard bounce and appears under bounces, and a block is retried rather than suppressed.

Single-message details (GET /v3/messages/{id}), templates, global suppressions writes (/v3/asm/suppressions/global), stats and the marketing endpoints are not mirrored. Those requests return 404 with a message saying so.

Webhooks in SendGrid's format

Create a webhook with "format": "sendgrid" on POST /v1/webhooks and it is delivered in SendGrid's event format, so your existing receiver keeps working. Fields, event mapping and signing are in Webhooks in another provider's format.

Registration is through POST /v1/webhooks, not SendGrid's PATCH /v3/user/webhooks/event/settings: that call sets one account-wide URL with per-event booleans, which does not fit several Mailaki webhooks, so it is not mirrored.

Postmark bridge

Moving from Postmark? Keep your Postmark client. Point it at the Mailaki bridge and use a Mailaki API key in place of your server token. Sends go through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/postmark

Authentication is Postmark's: the X-Postmark-Server-Token header, holding your Mailaki key. The From address must be on a verified domain of your Mailaki account.

cURL
curl -s -X POST https://mailaki.com/bridge/postmark/email \
  -H "X-Postmark-Server-Token: mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "From": "Your App <[email protected]>",
    "To": "[email protected]",
    "Subject": "Hello",
    "TextBody": "Sent through the Postmark bridge"
  }'
Node (postmark)
const postmark = require("postmark");

const client = new postmark.ServerClient(process.env.MAILAKI_API_KEY, {
  requestHost: "mailaki.com/bridge/postmark",
});

await client.sendEmail({
  From: "Your App <[email protected]>",
  To: "[email protected]",
  Subject: "Hello",
  TextBody: "Sent through the Postmark bridge",
});

Supported endpoints

EndpointNotes
POST /emailReturns {"To", "SubmittedAt", "MessageID", "ErrorCode": 0, "Message": "OK"} as Postmark does.
POST /email/batchUp to 500 messages. Always 200, with one result per message in order: check each ErrorCode.
POST /email/withTemplateTemplateId or TemplateAlias, with TemplateModel as the variables.
POST /email/batchWithTemplates{"Messages": [...]}, up to 500.
GET /messages/outboundcount and offset are required. Filters: recipient, fromemail, tag, status. One entry per recipient.
GET /bouncescount and offset are required. Filters: emailFilter, tag, messageID.

Errors use Postmark's shape, {"ErrorCode", "Message"}, with Postmark's codes: 10 (bad token, 401), 300 (invalid message, 422), 402 (not JSON), 403 (wrong field type), 400 / 401 (the From domain is not on your account / not verified), 406 (every recipient is suppressed), 410 (batch too large) and 1101 (template not found). A rate-limited request is 429 with ErrorCode 429. Request bodies may be up to 10 MB.

Send fields

FieldStatus
From, To, Cc, BccSupported. Up to 50 recipients. Recipient display names are dropped.
Subject, TextBody, HtmlBody, ReplyTo, HeadersSupported.
TagSupported, as a tag.
TrackOpens, TrackLinksSupported. Only links in the HTML part are rewritten, so TextOnly behaves like None. When you leave them out, tracking is on.
AttachmentsSupported (Name, Content, ContentType). With ContentID the file is an inline image.
TemplateId, TemplateAliasThe name or id of a template in your Mailaki account, or the Postmark alias (or id, for a template without an alias) of a template you imported. Without an import, name a Mailaki template after the Postmark alias or id and it is used.
TemplateModelSupported, as the template's variables.
Metadata, MessageStream, InlineCssIgnored.

Not available yet

Message details, bounce activation, webhook management, and the templates, servers, streams, stats and suppressions endpoints are not mirrored. Those requests return 404 with a message saying so. Field names must be written in Postmark's exact case.

Webhooks in Postmark's format

Create a webhook with "format": "postmark" on POST /v1/webhooks and it is delivered in Postmark's event format, so your existing receiver keeps working. Fields, event mapping and signing are in Webhooks in another provider's format.

Brevo bridge

Moving from Brevo (Sendinblue)? Keep your Brevo client. Point it at the Mailaki bridge and use a Mailaki API key in place of your Brevo key. Sends go through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/brevo/v3

Authentication is Brevo's: the api-key header, holding your Mailaki key. The sender's address must be on a verified domain of your Mailaki account.

cURL
curl -s -X POST https://mailaki.com/bridge/brevo/v3/smtp/email \
  -H "api-key: mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "sender": {"name": "Your App", "email": "[email protected]"},
    "to": [{"email": "[email protected]"}],
    "subject": "Hello",
    "textContent": "Sent through the Brevo bridge"
  }'
Node (@getbrevo/brevo)
import { BrevoClient } from "@getbrevo/brevo";

const brevo = new BrevoClient({
  apiKey: process.env.MAILAKI_API_KEY,
  baseUrl: "https://mailaki.com/bridge/brevo/v3",
});

await brevo.transactionalEmails.sendTransacEmail({
  sender: { name: "Your App", email: "[email protected]" },
  to: [{ email: "[email protected]" }],
  subject: "Hello",
  textContent: "Sent through the Brevo bridge",
});

Supported endpoints

EndpointNotes
POST /v3/smtp/emailReturns 201 {"messageId"} as Brevo does, 202 for a scheduled message, and {"messageIds": [...]} with messageVersions.
GET /v3/smtp/blockedContactsYour suppression list. limit, offset, sort, startDate with endDate. senderEmail is null.
GET /v3/smtp/statistics/eventsDelivery events. limit, offset, sort, days or startDate with endDate, email, event, messageId.

Errors use Brevo's shape, {"code", "message"}: unauthorized (401), missing_parameter and invalid_parameter (400), permission_denied (403), not_enough_credits (402, monthly allowance used up), document_not_found (404). Request bodies may be up to 10 MB.

Send fields

FieldStatus
sender, to, cc, bcc, replyToSupported. Recipient display names are dropped. sender.id is refused: pass sender.email.
subject, htmlContent, textContent, headers, tagsSupported.
paramsSupported: {{params.name}} is filled in the subject and content, and in templates. Brevo's filters and tags (| default, {% if %}) are not.
templateIdThe name or id of a template in your Mailaki account, or the Brevo id of a template you imported. Without an import, name a Mailaki template after the Brevo id (for example 7) and it is used.
attachmentSupported with content (base64) and name. url is refused: the bridge does not download files.
scheduledAtSupported.
messageVersionsSupported: one message per version, each with its own recipients, subject, content and params.
batchId, contactPixelTrackingConsent, the sender.ip headerIgnored.

Not available yet

Webhook management, and the templates, senders, contacts, logs and aggregated report endpoints are not mirrored. Those requests return 404 with a message saying so.

Webhooks in Brevo's format

Create a webhook with "format": "brevo" on POST /v1/webhooks and it is delivered in Brevo's event format, so your existing receiver keeps working. Fields, event mapping and signing are in Webhooks in another provider's format.

Mailjet bridge

Moving from Mailjet? Keep your Mailjet client. Point it at the Mailaki bridge and use a Mailaki API key as the secret key. Sends go through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/mailjet

Authentication is Mailjet's: HTTP Basic. The username (Mailjet's public key) can be anything; the password (Mailjet's secret key) is your Mailaki key. The From address must be on a verified domain of your Mailaki account.

cURL
curl -s -X POST https://mailaki.com/bridge/mailjet/v3.1/send \
  --user "mailaki:mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "Messages": [{
      "From": {"Email": "[email protected]", "Name": "Your App"},
      "To": [{"Email": "[email protected]"}],
      "Subject": "Hello",
      "TextPart": "Sent through the Mailjet bridge"
    }]
  }'
Node (node-mailjet)
const Mailjet = require("node-mailjet");

const mailjet = new Mailjet({
  apiKey: "mailaki",
  apiSecret: process.env.MAILAKI_API_KEY,
  config: { host: "mailaki.com/bridge/mailjet" },
});

await mailjet.post("send", { version: "v3.1" }).request({
  Messages: [{
    From: { Email: "[email protected]", Name: "Your App" },
    To: [{ Email: "[email protected]" }],
    Subject: "Hello",
    TextPart: "Sent through the Mailjet bridge",
  }],
});

Supported endpoints

EndpointNotes
POST /v3.1/sendUp to 50 messages. Returns Messages[] with Status, and for each recipient Email, MessageUUID, MessageID and MessageHref; a refused message has Errors[].
POST /v3/sendThe legacy Send API: Recipients or To / Cc / Bcc, Text-part, Html-part, Vars, Attachments. Returns {"Sent": [...]}.
GET /v3/REST/messageOne entry per recipient, newest first: ID (the number the send returned), UUID (the MessageUUID), ContactAlt, Status, Subject, ArrivedAt, AttemptCount. Filters: ContactAlt, FromTS, ToTS, Limit (up to 1000), Offset, CountOnly. Other filters (Campaign, Contact, Sender, ...) are refused with 400.
GET /v3/REST/message/{id}One message, by the MessageID or MessageUUID the send returned.
GET /v3/REST/messagehistory/{id}The events of one message, oldest first: EventAt, EventType (sent, opened, clicked, bounced, blocked, unsub, spam), State, Comment.
/v3/REST/eventcallbackurl, /v3/REST/eventcallbackurl/{ID}Create, list, get, update and delete event callbacks: one URL per EventType, delivered as a Mailaki webhook in Mailjet's format (a JSON array of events, Version 2). Backup URLs are not available. Changes need the admin scope.

MessageUUID is the Mailaki message id; use it with GET /v1/messages/{id}. MessageID is a number derived from it and identifies nothing by itself. If one message of a call is invalid, nothing is sent and the answer is 400 with an error on each message; set AdvanceErrorHandling to true to send the valid ones. Request bodies may be up to 10 MB.

Send properties (v3.1)

PropertyStatus
From, To, Cc, Bcc, ReplyToSupported. Up to 50 recipients. Recipient display names are dropped.
Subject, TextPart, HTMLPart, HeadersSupported.
Variables, TemplateLanguage[[var:name]] is replaced; with TemplateLanguage also {{var:name}} and {{var:name:"default"}}. The rest of Mailjet's template language is not translated.
TemplateIDThe name or id of a template in your Mailaki account. Mailjet templates are not copied over: name a Mailaki template after the Mailjet id and it is used.
Attachments, InlinedAttachmentsSupported. Inline files are referenced with cid: and their ContentID (or file name).
CustomIDRepeated in the response. Not stored.
CustomCampaignSupported, as a tag.
TrackOpens, TrackClicksdisabled switches tracking off; otherwise it is on.
SandboxMode, Globals, AdvanceErrorHandlingSupported. In sandbox mode the messages are checked and nothing is sent.
Sender, EventPayload, Priority, URLTags, DeduplicateCampaign, TemplateErrorReportingIgnored.

Not available yet

The rest of the REST API (contacts, templates, statistics) is not mirrored. Those requests return 404 with a message saying so.

Webhooks in Mailjet's format

Create a webhook with "format": "mailjet" on POST /v1/webhooks and it is delivered in Mailjet's event format, so your existing receiver keeps working. Fields, event mapping and signing are in Webhooks in another provider's format.

Resend bridge

Moving from Resend? Keep your Resend client. Point it at the Mailaki bridge and use a Mailaki API key. Sends go through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/resend

Authentication is Resend's: Authorization: Bearer with your Mailaki key. The from address must be on a verified domain of your Mailaki account.

cURL
curl -s -X POST https://mailaki.com/bridge/resend/emails \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Your App <[email protected]>",
    "to": ["[email protected]"],
    "subject": "Hello",
    "text": "Sent through the Resend bridge"
  }'
Node (resend)
// RESEND_BASE_URL=https://mailaki.com/bridge/resend
import { Resend } from "resend";

const resend = new Resend(process.env.MAILAKI_API_KEY);

await resend.emails.send({
  from: "Your App <[email protected]>",
  to: ["[email protected]"],
  subject: "Hello",
  text: "Sent through the Resend bridge",
});

The Node SDK reads its base URL from the RESEND_BASE_URL environment variable.

Supported endpoints

EndpointNotes
POST /emailsReturns {"id": "..."} as Resend does. The Idempotency-Key header is honoured.
POST /emails/batchA JSON array of up to 100 emails. Returns {"data": [{"id"}]} in order. Every email is checked before any is sent. Attachments work in a batch too.
GET /emails/{id}The message with that id: to, from, subject, created_at, last_event, scheduled_at, tags. html and text are null.

Errors use Resend's shape, {"statusCode", "name", "message"}: missing_api_key and validation_error (401, no key or a wrong key), restricted_api_key (403, the key lacks the scope), missing_required_field, validation_error and invalid_attachment (422), validation_error with 403 when the from domain is not a verified domain of your account, not_found (404), rate_limit_exceeded and monthly_quota_exceeded (429). Request bodies may be up to 10 MB.

Send fields

FieldStatus
from, to, cc, bcc, reply_toSupported. A string or an array, up to 50 addresses per field. Recipient display names are dropped.
subject, html, text, headersSupported. A plain-text part is not generated from the HTML: send text if you want one.
attachmentsSupported with base64 content and filename; content_type optional; content_id makes it an inline image. A remote path is not fetched: the request is refused with invalid_attachment.
tagsSupported. Each {name, value} becomes the tag name:value.
scheduled_atAn ISO 8601 date and time. Natural language (in 1 hour) is refused.
templatetemplate.id is the name or id of a template in your Mailaki account, template.variables its variables. Resend templates are not copied over.
react, topic_idIgnored. (The Node SDK renders react to html before it sends.)

Not available yet

Webhook management (/webhooks), updating or cancelling a scheduled email, and the domains, API keys, audiences, contacts and broadcasts endpoints are not mirrored. Those requests return 404 with a message saying so. Open and click tracking follow Mailaki's default (on); Resend's per-domain tracking setting does not exist here.

Webhooks in Resend's format

Create a webhook with "format": "resend" on POST /v1/webhooks and it is delivered in Resend's event format, so your existing receiver keeps working. Fields, event mapping and signing are in Webhooks in another provider's format.

MailerSend bridge

Moving from MailerSend? Keep your client. Point it at the Mailaki bridge and use a Mailaki API key as the token. Sends go through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/mailersend

Authentication is MailerSend's: Authorization: Bearer with your Mailaki key. The from.email address must be on a verified domain of your Mailaki account.

cURL
curl -s -i -X POST https://mailaki.com/bridge/mailersend/v1/email \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": { "email": "[email protected]", "name": "Your App" },
    "to": [{ "email": "[email protected]" }],
    "subject": "Hello {{name}}",
    "text": "Sent through the MailerSend bridge",
    "personalization": [{ "email": "[email protected]", "data": { "name": "there" } }]
  }'

Supported endpoints

EndpointNotes
POST /v1/email202 with an empty body and the message id in X-Message-Id, as MailerSend does. When some or all recipients are on your suppression list the answer is 202 with MailerSend's warnings body (SOME_SUPPRESSED / ALL_SUPPRESSED).
GET /v1/activity/{domain_id}Events of one sending domain, named by its Mailaki id or its name, newest first: id, type, created_at and email (id, from, subject, tags, recipient.email). Types: delivered, soft_bounced, hard_bounced, deferred, suppressed, opened, clicked, unsubscribed, spam_complaints; queued, sent and the unique and survey types are never recorded and match nothing. event[], date_from, date_to, page, limit (10 to 100, default 25). date_from/date_to are optional here. Paging has no total (links.last is null).
GET /v1/suppressions/{hard-bounces, spam-complaints, unsubscribes, blocklist}Your Mailaki suppression list, by reason. blocklist holds addresses added by hand (each an exact pattern). page, limit (10 to 100). domain_id is not accepted: Mailaki suppressions are per account.
GET /v1/suppressions/on-hold-listAlways empty: Mailaki never puts a recipient on hold. A soft bounce is retried, and after your account's soft-bounce strikes the address is suppressed for good (it then shows under hard-bounces). domain_id must be one of your domains.

Validation errors use MailerSend's shape, 422 {"message", "errors": {"field": ["..."]}}, with the fields named as MailerSend names them (from.email, to.0.email, template_id). A missing or wrong token is 401 {"message": "Unauthenticated."}; a key without the scope is 403; a rate-limited request is 429. Request bodies may be up to 10 MB.

Send fields

FieldStatus
from, to, cc, bcc, reply_toSupported. Up to 50 to, 10 cc, 10 bcc. Recipient names are dropped.
subject, text, html, headers, in_reply_to, referencesSupported.
personalizationSupported: {{name}} in the subject and bodies. With one to address there is one message, with Cc and Bcc as written. With several, every to recipient gets their own message, and Cc / Bcc recipients get a copy addressed to themselves.
variablesSupported: the older {$name} placeholders.
template_idThe name or id of a template in your Mailaki account. MailerSend templates are not copied over.
attachmentsSupported (content, filename). With disposition: "inline" and an id the file is an inline image.
tagsSupported, up to 5.
send_atA Unix timestamp or an ISO 8601 date.
settings.track_opens, settings.track_clicksSupported. When you leave them out, tracking is on.
settings.track_content, precedence_bulk, list_unsubscribe, languageIgnored.

Not available yet

POST /v1/bulk-email, the analytics, messages, domains, templates and webhooks endpoints, and adding or deleting suppressions are not mirrored. Those requests return 404 with a message saying so.

Create a webhook with "format": "mailersend" on POST /v1/webhooks and it is delivered in MailerSend's event format (payload version 2) with MailerSend's Signature header, so your existing receiver keeps working. Fields, event mapping and signing are in Webhooks in another provider's format.

SparkPost bridge

Moving from SparkPost? Keep your SparkPost client. Point it at the Mailaki bridge and use a Mailaki API key. Sends go through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/sparkpost

Authentication is SparkPost's: the key as the bare value of the Authorization header, with no Bearer. (HTTP Basic with the key as the username works as well.) The content.from address must be on a verified domain of your Mailaki account.

cURL
curl -s -X POST https://mailaki.com/bridge/sparkpost/api/v1/transmissions \
  -H "Authorization: mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "recipients": [
      { "address": "[email protected]", "substitution_data": { "name": "there" } }
    ],
    "content": {
      "from": { "email": "[email protected]", "name": "Your App" },
      "subject": "Hello {{name}}",
      "text": "Sent through the SparkPost bridge"
    }
  }'
Node (sparkpost)
const SparkPost = require("sparkpost");

const client = new SparkPost(process.env.MAILAKI_API_KEY, {
  endpoint: "https://mailaki.com/bridge/sparkpost",
});

await client.transmissions.send({
  recipients: [{ address: "[email protected]" }],
  content: {
    from: "[email protected]",
    subject: "Hello",
    text: "Sent through the SparkPost bridge",
  },
});

Supported endpoints

EndpointNotes
POST /api/v1/transmissionsReturns {"results": {"total_rejected_recipients", "total_accepted_recipients", "id"}} as SparkPost does. Recipients on your suppression list are counted as rejected. Up to 1000 recipients.
GET /api/v1/events/messageEvents, newest first: type (delivery, bounce, delay, policy_rejection, open, click, spam_complaint, link_unsubscribe), event_id, timestamp, message_id, rcpt_to, friendly_from, subject, rcpt_tags; reason on bounces, delays and rejections, num_retries on delays, target_link_url on clicks. Filters: events, recipients, messages, from, to, per_page (up to 10000), cursor. Other filters (subaccounts, campaigns, ...) are refused. Types we never record (injection, initial_open, ...) match nothing. cursor is an offset; follow links.next.
GET /api/v1/suppression-list, /api/v1/suppression-list/{recipient}Your Mailaki suppression list. A Mailaki suppression stops all mail, so each entry is transactional and non_transactional. source is Bounce Rule, Spam Complaint, Unsubscribe Link or Manually Added. from, to, types, per_page, cursor.
PUT /api/v1/suppression-list/{recipient}, PUT /api/v1/suppression-listAdd one, or up to 10,000 as {"recipients": [...]}, with type (transactional or non_transactional) and description. The entry stops all mail whichever type you give. One invalid entry refuses the whole bulk request. Needs send.
DELETE /api/v1/suppression-list/{recipient}204; 404 when the address is not on your list. Needs send.

Errors use SparkPost's shape, {"errors": [{"message", "description", "code"}]}, with SparkPost's codes: 1400 (a required field is missing, 422), 1300 (a field is not usable, 422), 1603 (template not found, 422), 7001 (the sending domain is not a verified domain of your account, 400) and 2101 (monthly allowance used up, 420). A missing or wrong key is 401 {"errors": [{"message": "Unauthorized."}]}. Request bodies may be up to 10 MB.

Transmission fields

FieldStatus
recipients[].addressSupported, as a string or {email, name, header_to}. Every recipient gets their own message. Stored recipient lists (list_id) are refused.
header_to with a CC headerSupported, as SparkPost's cc / bcc pattern: a recipient whose header_to is another recipient's address is a copy of that recipient's message, a Cc if content.headers.CC names it and a Bcc otherwise. header_to must be the address of a recipient of the same transmission.
substitution_dataSupported: {{name}} in the subject and bodies. A recipient's data overrides the transmission's. Only plain substitutions: SparkPost's {{if}} / {{each}} statements are not understood (Handlebars block syntax is).
content.from, subject, html, text, reply_to, headersSupported.
content.attachments, content.inline_imagesSupported (name, type, data). Inline images are referenced with cid: and their name.
content.template_idThe name or id of a template in your Mailaki account. SparkPost templates are not copied over.
options.open_tracking, options.click_tracking, options.start_timeSupported.
options.sandboxThe transmission is accepted and recorded as a test message; nothing is delivered. (SparkPost would deliver it from its sandbox domain.)
campaign_id, recipients[].tagsSupported, as tags of the send (the tags of all recipients together).
content.email_rfc822Refused. Send the parts, or a complete message to POST /v1/messages/mime.
metadata, description, return_path, options.transactional, options.ip_pool, options.inline_cssIgnored.

Not available yet

The templates, sending-domains and webhooks endpoints are not mirrored. Those requests return 404 with a message saying so.

Create a webhook with "format": "sparkpost" on POST /v1/webhooks and it is delivered in SparkPost's event format, so your existing receiver keeps working. Fields, event mapping and authentication are in Webhooks in another provider's format.

Mandrill bridge

Moving from Mandrill (Mailchimp Transactional)? Keep your client. Point it at the Mailaki bridge and use a Mailaki API key as the Mandrill key. Sends go through the same pipeline as POST /v1/messages.

Base URL
https://mailaki.com/bridge/mandrill/api/1.0

Authentication is Mandrill's: the key is the "key" field of the JSON body. On this bridge only the body key counts; an Authorization header is ignored. The from_email address must be on a verified domain of your Mailaki account.

cURL
curl -s -X POST https://mailaki.com/bridge/mandrill/api/1.0/messages/send.json \
  -H "Content-Type: application/json" \
  -d '{
    "key": "mf_live_your_api_key",
    "message": {
      "from_email": "[email protected]",
      "from_name": "Your App",
      "to": [{ "email": "[email protected]", "type": "to" }],
      "subject": "Hello *|FNAME|*",
      "text": "Sent through the Mandrill bridge",
      "global_merge_vars": [{ "name": "FNAME", "content": "there" }]
    }
  }'
Node (@mailchimp/mailchimp_transactional)
const client = require("@mailchimp/mailchimp_transactional")(process.env.MAILAKI_API_KEY);
client.basePath = "https://mailaki.com/bridge/mandrill/api/1.0";

await client.messages.send({
  message: {
    from_email: "[email protected]",
    to: [{ email: "[email protected]", type: "to" }],
    subject: "Hello",
    text: "Sent through the Mandrill bridge",
  },
});

Any API version in the path works (/api/1.0, /api/1.3), with or without .json.

Supported calls

CallNotes
messages/sendReturns one {"email", "status", "_id", "reject_reason"} per recipient, as Mandrill does. status is queued, scheduled or rejected. A recipient on your suppression list is rejected with custom; a sender that is not a verified domain of your account rejects every recipient with invalid-sender or unsigned.
messages/send-templatetemplate_name is the name or id of a template in your Mailaki account. Mandrill templates are not copied over, and template_content (editable regions) is ignored.
users/ping, users/ping2"PONG!" and {"PING": "PONG!"}. Needs the read scope.
messages/searchOne entry per recipient, newest first: ts, _id, sender, subject, email, tags, opens, clicks with details, state (sent, bounced, rejected, deferred, queued). query may be empty, *, a recipient address, or one field:value term on email, full_email, sender or subject; other Lucene syntax is refused. date_from, date_to, tags, one address in senders, limit (up to 1000). api_keys is refused. Needs read.
messages/infoOne message by id (the _id the send returned), same fields; an unknown id is Unknown_Message. No smtp_events. Needs read.
rejects/listYour suppression list, optionally for one email: reason (hard-bounce, soft-bounce, spam, unsub, custom), detail, created_at. Suppressions do not expire here, so expires_at is null. Needs read.
rejects/add, rejects/deleteAdd email to your suppression list (with comment) or take it off: {"email", "added": true} / {"email", "deleted": true}. Deleting an address that is not on the list is 404 Invalid_Reject; a subaccount is 404 Unknown_Subaccount. Needs send.

Errors use Mandrill's shape, {"status": "error", "code", "name", "message"}: Invalid_Key (401; 403 when the key lacks the scope), ValidationError (400), Unknown_Template (404), PaymentRequired (402, monthly allowance used up) and GeneralError (rate limit 429, unknown call 404). Request bodies may be up to 10 MB.

Message fields

FieldStatus
from_email, from_name, subject, html, text, headersSupported. Reply-To goes in headers, as on Mandrill.
to[] (email, type), bcc_addressSupported: to, cc and bcc. Names are dropped. Up to 1000 recipients.
preserve_recipientsOff (Mandrill's default): every recipient gets their own message and does not see the others. On: one message with To and Cc as written.
global_merge_vars, merge_vars, merge, merge_languageSupported. *|NAME|* tags are replaced (names are not case sensitive); with merge_language: "handlebars", {{name}}. Only plain tags: Mailchimp's *|IF:..|* conditionals are not understood. With preserve_recipients the one message is merged with the first To recipient's variables.
attachments, imagesSupported (type, name, content). Images are inline and referenced with cid: and their name.
tags, track_opens, track_clicksSupported. When you leave the tracking fields out, tracking is on.
send_atYYYY-MM-DD HH:MM:SS, UTC. A time in the past sends now.
async, ip_pool, important, metadata, subaccount, auto_text, inline_css and the other optionsIgnored.

Not available yet

messages/content, templates, users/info and the other calls are not mirrored. Those requests return 404 with a message saying so, if the key has the admin scope, and 403 otherwise.

Create a webhook with "format": "mandrill" on POST /v1/webhooks and it is delivered as Mandrill's mandrill_events form post with an X-Mandrill-Signature, so your existing receiver keeps working. Fields, event mapping and signing are in Webhooks in another provider's format.

Amazon SES bridge

Moving from Amazon SES? Keep the AWS SDK. Point its endpoint at the Mailaki bridge and give it an access key pair issued by Mailaki. Sends go through the same pipeline as POST /v1/messages.

Endpoint
https://mailaki.com/bridge/ses

Authentication is AWS's: requests are signed with Signature Version 4. Use a Mailaki access key id and secret access key, not your AWS credentials and not a Mailaki API key. Any region works in the signature; the service must be ses. The FromEmailAddress must be on a verified domain of your Mailaki account.

Get an access key pair

With a key that has the admin scope. The secret is in this response only: store it now.

curl -s -X POST https://mailaki.com/v1/ses/keys \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "billing service"}'

{
  "id": "0193...",
  "access_key_id": "AKMKQ7Z3K2M4N5P6R7S2",
  "secret_access_key": "40 characters, shown once",
  "scopes": ["send"],
  "environment": "live",
  "active": true,
  ...
}

scopes is ["send"] by default; add "read" for GetAccount. "environment": "test" gives a pair whose sends are test messages, never delivered. GET /v1/ses/keys lists your pairs (never the secrets); POST /v1/ses/keys/{id}/revoke stops one at once.

Node (@aws-sdk/client-sesv2)
import { SESv2Client, SendEmailCommand } from "@aws-sdk/client-sesv2";

const ses = new SESv2Client({
  region: "us-east-1",
  endpoint: "https://mailaki.com/bridge/ses",
  credentials: {
    accessKeyId: process.env.MAILAKI_SES_ACCESS_KEY_ID,
    secretAccessKey: process.env.MAILAKI_SES_SECRET_ACCESS_KEY,
  },
});

await ses.send(new SendEmailCommand({
  FromEmailAddress: "Your App <[email protected]>",
  Destination: { ToAddresses: ["[email protected]"] },
  Content: {
    Simple: {
      Subject: { Data: "Hello" },
      Body: { Text: { Data: "Sent through the SES bridge" } },
    },
  },
}));
AWS CLI
AWS_ACCESS_KEY_ID=$MAILAKI_SES_ACCESS_KEY_ID \
AWS_SECRET_ACCESS_KEY=$MAILAKI_SES_SECRET_ACCESS_KEY \
aws sesv2 send-email --region us-east-1 \
  --endpoint-url https://mailaki.com/bridge/ses \
  --from-email-address "[email protected]" \
  --destination "[email protected]" \
  --content '{"Simple":{"Subject":{"Data":"Hello"},"Body":{"Text":{"Data":"Sent through the SES bridge"}}}}'

Supported operations

OperationNotes
SendEmail (POST /v2/email/outbound-emails)Returns {"MessageId"} as SES does: the id of the first queued message (one is queued per recipient). Needs the send scope.
SendBulkEmail (POST /v2/email/outbound-bulk-emails)Up to 50 entries with one template (stored, by TemplateName, or inline TemplateContent). Each entry's ReplacementTemplateData is laid over TemplateData; ReplacementTags and ReplacementHeaders replace defaults of the same name. Returns BulkEmailEntryResults, one per entry, with SUCCESS and MessageId or a status such as INVALID_PARAMETER or MESSAGE_REJECTED and Error. Needs the send scope.
GetAccount (GET /v2/email/account)SendingEnabled, EnforcementStatus, ProductionAccessEnabled (false for a test pair) and DedicatedIpAutoWarmupEnabled. There is no SendQuota: allowances are monthly, per plan. Needs read.

Errors use SES's shape: {"message"} with the error name in the x-amzn-ErrorType header, which the AWS SDKs read. MissingAuthenticationTokenException, IncompleteSignatureException, InvalidSignatureException (wrong secret, changed request, or x-amz-date more than 5 minutes from our clock) and UnrecognizedClientException (unknown or revoked access key) are 403; so is AccessDeniedException (the pair lacks the scope, or the IP allowlist refuses). BadRequestException (invalid request), MessageRejected (the sender is not a verified domain of your account, or every recipient is suppressed), AccountSuspendedException and LimitExceededException (monthly allowance) are 400; NotFoundException (template or operation) is 404; TooManyRequestsException is 429. Request bodies may be up to 10 MB.

SendEmail fields

FieldStatus
FromEmailAddress, Destination (ToAddresses, CcAddresses, BccAddresses), ReplyToAddressesSupported. Up to 50 recipients. Recipient display names are dropped. With Simple or Template content at least one ToAddresses entry is needed.
Content.Simple: Subject, Body.Text, Body.Html, HeadersSupported. Charset is ignored: JSON is UTF-8.
Content.Simple.AttachmentsSupported (FileName, RawContent base64, ContentType). With ContentDisposition: INLINE and a ContentId the file is an inline image. ContentDescription and ContentTransferEncoding are ignored.
Content.Raw.DataSupported: a complete MIME message, base64, sent as it is (DKIM-signed by Mailaki). Recipients are Destination when given, otherwise the message's To, Cc and Bcc headers; the Bcc header is removed. The sender is FromEmailAddress, or the From header.
Content.TemplateTemplateName (or the last part of TemplateArn) is the name or id of a template in your Mailaki account, with TemplateData as its variables. TemplateContent (an inline template) works too. SES templates are not copied over.
EmailTagsSupported. Each {Name, Value} becomes the tag Name:Value.
ConfigurationOverrides.TrackingOpenTrackingEnabled and ClickTrackingEnabled switch tracking off or on for the message. When left out, tracking is on.
ConfigurationSetName, FeedbackForwardingEmailAddress, ListManagementOptions, the identity ARNs, EndpointId, TenantNameAccepted and ignored.

Not available yet

The suppressed-destination, identity, template, configuration-set and contact-list operations, events in SES's format through SNS, and the SES v1 query API (Action=SendEmail, SendRawEmail) are not mirrored. Those requests return 404 with a message saying so, if the pair may make them. Events are delivered as Mailaki webhooks.

Full API Reference

See the complete interactive API reference with all endpoints, request/response schemas, and try-it-out functionality:

Open API Reference →