mailakiBeta

Migrate from Amazon SES to Mailaki

This guide moves sending from Amazon SES to Mailaki. You replace AWS-signed SendEmail calls with a plain HTTPS request that carries an API key, and SNS notifications with webhooks posted straight to your app.

Know this before you start: Mailaki currently relays outbound mail through Amazon SES. Moving does not change the network your mail finally leaves from. What changes is everything in front of it: a simpler API, a message log, a suppression list you can read and edit, templates and webhooks without SNS.

There are two ways to move, and you can mix them:

  • Keep your Amazon SES client. Mailaki accepts Amazon SES's API format at https://mailaki.com/bridge/ses. You change the base URL and the API key, and your send code stays as it is. It is the quick route. What the bridge does not mirror is listed in the sending section.
  • Call the Mailaki API. You rewrite the send call for POST /v1/messages. It is more work, and it leaves nothing between you and the native API. The field mapping and the before and after code are below.

The import tool does not read Amazon SES accounts. Templates are recreated, and suppression lists are exported and loaded as a file; each section shows how.

Before you start

  • A Mailaki account and an API key. Create an account, then make a key under API Keys in the portal. Live keys start with mf_live_.
  • A test key as well (it starts with mf_test_). A send made with it goes through the same validation, templates and events as a live send, but no email is delivered and it does not count against your plan. Use it to try your integration before real mail moves. See test mode.
  • Access to the DNS zone of the domain you send from. You will add TXT records; you will not remove anything yet.
  • Your Amazon SES account kept open and working. You need it for the import or export below, for the parallel run, and as the way back.
  • A way to choose the provider per message in your code, such as an environment variable or feature flag. The cutover and the rollback both depend on it.

Export these from Amazon SES first:

  • The account-level suppression list, in every region you send from.
  • Every SES template you send with.
  • The SNS topics or event destinations that feed your app, and which event types they carry.
  • The configuration sets and message tags your app relies on.

Add and verify your domain

Add the domain under Domains in the portal, or with the API:

Add a domain
curl -X POST https://mailaki.com/v1/domains \
  -H "Authorization: Bearer $MAILAKI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "yourdomain.com"}'

The response has the domain id (this is the domain_id you send with) and a dns_records object. The portal shows the same records with copy buttons. Publish them:

PurposeTypeNameValue
OwnershipTXT_mailaki.yourdomain.commailaki-verify=... (unique to your domain)
DKIMTXTmf1._domainkey.yourdomain.comv=DKIM1; k=rsa; p=... (your domain's own public key)
SPFTXTyourdomain.comv=spf1 include:spf.mailaki.com ~all
DMARCTXT_dmarc.yourdomain.comv=DMARC1; p=none; rua=mailto:[email protected]
  • Ownership and DKIM are the two that enable sending. The domain is marked verified once both are found.
  • DKIM is a TXT record, not a CNAME. Each domain has its own key. The selector is normally mf1; use the exact name the portal shows.
  • SPF: one record per name. If the domain already has an SPF record, add include:spf.mailaki.com to it; do not publish a second one. Keep your old provider's include in place until the cutover is finished.
  • DMARC: if you already publish a DMARC record, keep yours.
  • No tracking CNAME. Open and click tracking links use mailaki.com. There is no per-domain tracking hostname to set up.

Then press Verify in the portal or call POST /v1/domains/{id}/verify. Mailaki also re-checks a new domain by itself every few minutes during its first week, so you do not have to keep clicking while DNS propagates.

Both providers can be live at once

DKIM records live under a selector, and Mailaki's selector (mf1) is different from the one your current provider uses. Both sets of records can stay published, and mail signed by either provider verifies. Adding Mailaki's records does not interrupt mail you are still sending the old way.

Leave the SES records alone for now: the three Easy DKIM CNAMEs (<token>._domainkey pointing at dkim.amazonses.com) and, if you set one up, the custom MAIL FROM subdomain's MX and SPF records. Your identity in your own AWS account keeps working while Mailaki's records sit beside it.

Sending

Route A: keep your Amazon SES client

Point your existing client at the Mailaki bridge and use a Mailaki API key in place of your Amazon SES one. Sends go through the same pipeline as POST /v1/messages.

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

Authentication stays AWS's: requests are signed with Signature Version 4. Create an access key pair with POST /v1/ses/keys (a key with the admin scope; the secret is shown once) and give it to the SDK in place of your AWS credentials. Any region works; the service is ses. The FromEmailAddress must be on a verified domain of your Mailaki account.

Node (@aws-sdk/client-sesv2): the change
 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,
+  },
 });
cURL through the bridge
# SES requests are signed, so the AWS CLI stands in for cURL here.
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 "Acme <[email protected]>" \
  --destination "[email protected]" \
  --content '{"Simple": {"Subject": {"Data": "Your receipt"},
              "Body": {"Text": {"Data": "Thanks for your order."}}}}'

What the bridge mirrors

  • Sending: SES v2 SendEmail (POST /v2/email/outbound-emails) with Simple content (including Attachments and Headers), Raw content (a complete MIME message) and Template content, and SES's {"MessageId"} response and error names in x-amzn-ErrorType.
  • Fields: FromEmailAddress, Destination, ReplyToAddresses, EmailTags (each becomes the tag Name:Value) and ConfigurationOverrides.Tracking. ConfigurationSetName is accepted and ignored.
  • Account: GetAccount (GET /v2/email/account), with only the values that hold here (no SendQuota).

What it does not mirror

  • Events through SNS. Mailaki posts webhooks straight to your app in its own format, so the SNS subscriber is replaced; see the webhooks section.
  • SendBulkEmail, the suppression, identity, template, configuration-set and contact-list operations, and the SES v1 query API (SendEmail, SendRawEmail as form posts). Those requests return 404.
  • Templates are not looked up in SES. TemplateName is matched against the name or id of a template in your Mailaki account.
  • With Simple or Template content at least one ToAddresses entry is needed; SES accepts Cc or Bcc alone.
  • Presigned URLs and streaming (aws-chunked) bodies are not supported; the SDKs' normal signed requests are.

The full list of endpoints, fields and error shapes is in the docs under Amazon SES bridge. If your code uses something from the second list, use the native API for that part.

Route B: call the Mailaki API

Amazon SESMailaki
EndpointSendEmail (API v2: POST /v2/email/outbound-emails on email.<region>.amazonaws.com)POST https://mailaki.com/v1/messages
AuthAWS Signature Version 4 with IAM credentialsAuthorization: Bearer mf_live_...
BodyJSON, nested Content objectJSON, flat
RegionPer-region endpointOne base URL

Field mapping

Amazon SESMailakiNotes
FromEmailAddressfromName <address> allowed in both
Destination.ToAddresses[]toBare addresses
Destination.CcAddresses, .BccAddressescc, bccJSON arrays of bare addresses
Content.Simple.Subject.Datasubject
Content.Simple.Body.Text.Datatext
Content.Simple.Body.Html.Datahtml
ReplyToAddresses[]headers: {"Reply-To": "[email protected], [email protected]"}Up to five addresses
Content.Raw.DataPOST /v1/messages/mimeBody {"domain_id", "from", "to": [], "message"} with the RFC 5322 message base64 encoded in message
Content.Template.TemplateNametemplate_idA Mailaki template UUID
Content.Template.TemplateData (JSON string)variablesA JSON object, not a string
EmailTags[] (Name, Value)tags[]Plain strings, for example "type:receipt"
ConfigurationSetNameNoneTracking is a per-message option; events go to your webhooks

Before and after

Before: Amazon SES, AWS CLI
# SES needs a SigV4 signature, so the AWS CLI stands in for cURL here.
aws sesv2 send-email \
  --from-email-address "Acme <[email protected]>" \
  --destination "[email protected]" \
  --reply-to-addresses "[email protected]" \
  --content '{
    "Simple": {
      "Subject": {"Data": "Your receipt"},
      "Body": {
        "Text": {"Data": "Thanks for your order."},
        "Html": {"Data": "<p>Thanks for your order.</p>"}
      }
    }
  }'
Before: Amazon SES, Node (@aws-sdk/client-sesv2)
import { SESv2Client, SendEmailCommand } from "@aws-sdk/client-sesv2";

const ses = new SESv2Client({ region: "eu-central-1" });

await ses.send(new SendEmailCommand({
  FromEmailAddress: "Acme <[email protected]>",
  Destination: { ToAddresses: ["[email protected]"] },
  ReplyToAddresses: ["[email protected]"],
  Content: {
    Simple: {
      Subject: { Data: "Your receipt" },
      Body: {
        Text: { Data: "Thanks for your order." },
        Html: { Data: "<p>Thanks for your order.</p>" },
      },
    },
  },
}));
After: Mailaki, cURL
curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer $MAILAKI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_id": "YOUR_DOMAIN_UUID",
    "from": "Acme <[email protected]>",
    "to": ["[email protected]"],
    "subject": "Your receipt",
    "text": "Thanks for your order.",
    "html": "<p>Thanks for your order.</p>",
    "headers": {"Reply-To": "[email protected]"},
    "tags": ["receipt"]
  }'
After: Mailaki, Node
// Node 18+ has fetch built in. No SDK needed.
const res = await fetch("https://mailaki.com/v1/messages", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MAILAKI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    domain_id: process.env.MAILAKI_DOMAIN_ID,
    from: "Acme <[email protected]>",
    to: ["[email protected]"],
    subject: "Your receipt",
    text: "Thanks for your order.",
    html: "<p>Thanks for your order.</p>",
    headers: { "Reply-To": "[email protected]" },
    tags: ["receipt"],
  }),
});
if (!res.ok) throw new Error(`Mailaki ${res.status}: ${await res.text()}`);
const { ids, dropped } = await res.json(); // one id per recipient

There are Mailaki client libraries for seven languages, but none is published to a package registry yet and the repository that holds them is private, so the examples use plain HTTP. The full field list is in the API reference, and the OpenAPI spec is public if you want to generate a client.

What the Mailaki request looks like

One endpoint, JSON in, Authorization: Bearer <api key> (or an x-api-key header):

POST https://mailaki.com/v1/messages returns 202
{
  "ids": ["0193abc0-1234-7000-8000-000000000001"],
  "status": "queued",
  "dropped": []
}
  • domain_id is required. It is the UUID from GET /v1/domains. If the value is not one of your domains, Mailaki uses your domain that the from address is on.
  • from is a bare address or Name <address> and must be on a verified domain.
  • to is always an array of bare addresses. You get one message id per recipient.
  • cc and bcc are arrays of bare addresses and are delivered. The message carries To and Cc headers; Bcc addresses are never written into it.
  • Reply-To goes in the headers map. Other custom headers go there too.
  • attachments is an array of {"filename", "content_type", "data"} with data base64 encoded. Add a content_id to send the file as an inline image.
  • Open and click tracking are applied only when the request asks for them. Add "tracking": {"opens": true, "clicks": true}; inside the object each of the two defaults to true. A request with no tracking object is sent untouched. See tracking.
  • scheduled_at takes an ISO 8601 time. tags is an array of strings.
  • Send an X-Idempotency-Key header to make a retry safe.
  • Recipients already on your suppression list are skipped and listed in dropped with a reason.
  • With a live key, recipients on test domains such as example.com or .test are refused. Use a test key (mf_test_) for those, or an address you can read.

SMTP settings

If your app sends over SMTP, these are the values to swap:

SettingBeforeMailaki
Hostemail-smtp.<region>.amazonaws.commail.mailaki.com
Port587587 (STARTTLS) or 465 (TLS from connect)
UsernameYour SES SMTP user nameAnything. It is not checked
PasswordYour SES SMTP password (not your AWS secret key)A Mailaki API key that is allowed to send

mail.mailaki.com presents a trusted Let's Encrypt certificate on both ports, so clients that verify certificates connect without extra settings.

Provider-specific SMTP headers that carry tags, variables or options are not interpreted by Mailaki. If you rely on them, use the REST API for those messages.

Templates

The import tool does not read Amazon SES accounts, so you recreate each template in Mailaki, by hand in the portal editor (it has a live preview) or with a script. If you send through the bridge, name each Mailaki template after its Amazon SES id so that the bridge finds it.

SES templates use Handlebars-style placeholders, as Mailaki does, so {{name}}, {{#if}} and {{#each}} normally carry over. SES does not send a templated message when a variable is missing; Mailaki sends it with that spot empty, so check your data rather than relying on an error.

BeforeMailaki
{{name}}, {{#if}}, {{#each}}Same
Template.TemplateName: "welcome""template_id": "<uuid>"
TemplateData: "{\"name\":\"Alice\"}""variables": {"name": "Alice"}

Mailaki templates use Handlebars: {{name}}, {{user.city}}, {{#if premium}}...{{else}}...{{/if}}, {{#unless x}}...{{/unless}} and {{#each items}}{{this.name}}{{/each}}. A variable that is not supplied renders as nothing, so check that you pass every value.

Recreate them

  1. List them with aws sesv2 list-email-templates, then fetch each with aws sesv2 get-email-template --template-name NAME for its Subject, Html and Text.
  2. Convert the placeholders as in the table above.
  3. Create each one in Mailaki. The response has the new template id.
  4. Keep a map from your old template identifier to the new id. Mailaki template ids are UUIDs.
  5. Send each template to yourself and look at it before real traffic uses it.
Create a template
curl -X POST https://mailaki.com/v1/templates \
  -H "Authorization: Bearer $MAILAKI_API_KEY" \
  -H "Content-Type: application/json" \
  -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}}."
  }'
Send with it
curl -X POST https://mailaki.com/v1/messages \
  -H "Authorization: Bearer $MAILAKI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_id": "YOUR_DOMAIN_UUID",
    "from": "Acme <[email protected]>",
    "to": ["[email protected]"],
    "template_id": "TEMPLATE_UUID",
    "variables": {"name": "Alice", "company": "Acme"}
  }'

A subject, text or html in the request replaces that part of the template. Each plan has a limit on the number of stored templates; see limits.

Suppression lists

Move these before you send anything through Mailaki. Otherwise you will mail people who bounced or unsubscribed with your old provider, and those bounces and complaints count against your new account.

Export from your old provider

If the account-level suppression list is turned on, export it with the CLI. It is paged: repeat the call with --next-token until none is returned. Each entry has EmailAddress and Reason.

Old listWhere to get itMailaki type
BOUNCEaws sesv2 list-suppressed-destinationsbounce
COMPLAINTSame commandcomplaint

The list is per region; export every region you send from. SES does not keep unsubscribes for you unless you use its subscription management, so take those from your own database. If the account-level list was never enabled, build the list from the bounce and complaint notifications your app has stored.

Load into Mailaki

POST /v1/suppressions/import takes a CSV file or a JSON list, up to 25 MB and 500,000 rows per import. In the portal it is Settings, Suppression List, Import. Addresses already on your list are left untouched, so importing the same file twice changes nothing.

CSV: address, type, and an optional reason and date
# suppressions.csv:
#   address,type,reason,date
#   [email protected],bounce,550 no such user,2026-01-31T12:00:00Z
#   [email protected],unsubscribe,,
curl -X POST https://mailaki.com/v1/suppressions/import \
  -H "Authorization: Bearer $MAILAKI_API_KEY" \
  -H "Content-Type: text/csv" \
  --data-binary @suppressions.csv
JSON: the same fields
curl -X POST https://mailaki.com/v1/suppressions/import \
  -H "Authorization: Bearer $MAILAKI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {"address": "[email protected]", "type": "bounce"},
    {"address": "[email protected]", "type": "unsubscribe"}
  ]'

The reply reports received, imported, skipped_existing, duplicates and invalid_count, with the invalid rows listed by line number so you can fix them. A body over 512 KB is imported in the background: the reply is 202 with a status_url to read until it says completed.

  • type is bounce, complaint or unsubscribe. Rows without one get the value of the ?reason= query parameter, manual by default.
  • Matching is exact and case-sensitive. Lowercase the addresses before importing, and send to lowercase addresses.
  • Suppressions are per account, not per domain or stream.
  • Imported entries are not counted in your complaint rate.
  • Check the result with GET /v1/suppressions, or download it with GET /v1/suppressions/export.

More in the docs under Import a suppression list.

Webhooks

The Amazon SES bridge does not deliver webhooks in Amazon SES's format. Whichever route you send by, events arrive in Mailaki's format, so your receiver changes as described here.

Create a webhook in the portal or with the API. See pricing for which plans include webhooks.

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

The response contains the signing secret (whsec_...), once. 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.

Mailaki sends one JSON object per event:

A delivery
POST /hooks/mailaki
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": "0193abc2-...",
  "event_type": "bounced",
  "message_id": "0193abc0-...",
  "tenant_id": "0193aaaa-...",
  "timestamp": "2026-11-19T10:00:00Z",
  "data": { }
}

message_id is the id you got back when you sent. data holds details that depend on the event, such as the URL of a click. To get the recipient, look the message up with GET /v1/messages/{message_id}. id is the event id: use it to ignore an event you have already processed, because a retry delivers the same event again.

Event names

BeforeMailakiSent to your webhook?
SendNone. The 202 reply to your send is the confirmationNo equivalent
DeliverydeliveredYes
DeliveryDelaydeferredYes
BouncebouncedYes
RejectbouncedYes
ComplaintcomplainedYes
OpenopenedYes
ClickclickedYes
Rendering FailureNone. A template that fails to render is an error on the send requestNo equivalent
SubscriptionNoneNo equivalent

opened and clicked only happen for messages that were sent with tracking on; see the sending section.

Checking that a call is genuine

SES events reach you through Amazon SNS: your endpoint first confirms a subscription, then receives an SNS envelope whose Message field holds the event, and you verify the SNS signature against Amazon's signing certificate. Mailaki posts the event to your URL directly. There is no subscription step and no envelope.

Every Mailaki delivery is signed in two independent ways. Check either one, always against the raw request body:

  • HMAC. X-Mailaki-Signature is the hex HMAC-SHA256 of the raw body, keyed with the webhook's secret.
  • Ed25519, with no shared secret. X-Mailaki-Signature-Ed25519 has t (Unix seconds), kid (the key id) and sig (base64). The signed bytes are t, a dot, then the raw body. The public keys are published, without authentication, at https://mailaki.com/.well-known/mailaki/webhook-keys. Reject requests whose t is more than a few minutes from your clock.

Code for both checks is in the docs under Verifying a delivery.

  • Retries. Answer with any 2xx within 10 seconds. A failed delivery is retried up to 7 more times: 8 attempts over about 44 hours, waiting 1 minute, 5 minutes, 30 minutes, then 2, 6, 12 and 24 hours. Pending retries are stored, so they survive a restart on Mailaki's side.
  • After the eighth failure the event moves to a failed list that you can read and resend: GET /v1/webhooks/{id}/failed and POST /v1/webhooks/{id}/failed/replay-all.
  • Hard bounces and complaints add the address to your suppression list automatically.
  • The event name is in eventType (or notificationType) in SES and in event_type in Mailaki. One Mailaki event is about one recipient, where an SES bounce can list several.

Cutover checklist

  1. The domain shows as verified in Mailaki. Your SES DNS records are untouched.
  2. Suppression lists are imported and the counts match your export.
  3. Templates are in Mailaki and you have looked at a real send of each one.
  4. Your code can send through either provider, chosen by a setting. With the bridge, that setting is the base URL and the key.
  5. Rehearse with a test key. Run your send path with an mf_test_ key: no email is delivered and the outcome is simulated, so you can watch the events arrive.
  6. Ask for your limit. A new Mailaki account can queue 100 emails a day until it has been reviewed. Email [email protected] with your expected volume before you move real traffic.
  7. Start small. Send one low-risk message type, or a small share of traffic, through Mailaki. Keep the rest on SES.
  8. Watch. Look at the message log in the portal and at bounced, deferred and complained events. Compare the bounce rate with what you normally see. GET /v1/messages/{id} shows the status and last error of one message, and the status page shows the service.
  9. Increase the share in steps. When you are satisfied, switch everything.
  10. Keep the SES account and its DNS records for a while after the switch. Its webhooks still report on mail you sent before the switch.
  11. When you are sure, clean up: delete the three Easy DKIM CNAMEs and any custom MAIL FROM records, delete the SES identity if nothing else uses it, and remove the IAM user or SMTP credentials your app used. Revoke the old API keys.

Rolling back

Rolling back is the setting from step 4: point your code back at SES. Nothing else has to change, because the old DNS records were never removed and the old account is still open.

Before you do, download GET /v1/suppressions/export from Mailaki and add any new bounces, complaints and unsubscribes to SES, so the people who opted out during the trial stay opted out.

What is different

  • The last hop is still SES. Mailaki relays through Amazon SES today. Do not expect a different set of sending IPs.
  • No AWS IAM. Access is by API key.
  • No configuration sets, event destinations or SNS. Events go to HTTPS webhooks.
  • One location, not a choice of AWS regions.
  • Your sending quota is Mailaki's to raise, not AWS's. Ask before moving volume.
  • Mailaki is in public beta. It sends real mail, but it runs in a single location and has no uptime guarantee yet.
  • The bridge covers sending and a few read endpoints, not all of Amazon SES's API, and webhooks arrive in Mailaki's format. The sending section lists what is not mirrored.
  • The import tool does not read Amazon SES accounts. You recreate templates and load suppressions as a file, as described above.
  • Tracking is opt-in per request on POST /v1/messages: without a tracking object there is no open pixel and no rewritten link.
  • No custom tracking domain. Tracked links and the open pixel use mailaki.com.
  • No published SDKs yet. The client libraries are not on any package registry. Use plain HTTP, or generate a client from the OpenAPI spec.
  • Outbound mail is relayed through Amazon SES. Mailaki signs it with your domain's DKIM key first.

Also in Mailaki

For prices and plan limits side by side, see Mailaki and Amazon SES compared.

Stuck on something this guide does not cover? Email [email protected].