Getting started with Email Center: turn it on, verify your domain and send your first e-mail

E-mail·· 2 views· 3 min read

The short answer: three steps. Turn on Email Center on the Transactional e-mail page in Meu MozOut, verify your domain with the DNS records we give you, and send with a POST /v1/email/messages request. Before going live, test with a Sandbox key: nothing is sent and nothing is charged.

What you need

1 Email Center active on your account. You turn it on in Meu MozOut, on the Transactional e-mail page. Without it, the API answers 403 with the reason email_account_required.
2 An API key with the email_center:write permission to send and make changes, and email_center:read to look things up. Careful: email:read and email:write are different permissions, for hosting mailboxes.
3 A domain of your own, where you can change the DNS. Free mailbox domains such as gmail.com are not accepted as senders.

Step by step

1 Turn the service on. Open the Transactional e-mail page in Meu MozOut and activate it. The page has the sections you will need: domains, sending, templates, history, statistics and suppressions.
2 Add your domain and publish the records it shows in your DNS: three DKIM CNAME records (required), an SPF TXT record and a DMARC TXT record (recommended). Details in adding a sender domain.
3 Click Verify (or call POST /v1/email/domains/{domain}/verify). DNS can take a few hours to spread. Once the DKIM records are live, the domain becomes verified.
4 Create the API key in Meu MozOut, with only the Email Center permissions. Start with a Sandbox key.
5 Make your first request with the sender, the recipient, the subject and the content. See the example below.
6 Check the result in the history on the page or with GET /v1/email/messages/{id}.

Your first request

curl https://api.mozout.co.mz/v1/email/messages \
-H "Authorization: Bearer sandbox_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: fatura-2026-214" \
-d '{"from": "Invoices <invoices@asuaempresa.co.mz>",
"to": ["ana@example.com"],
"subject": "Your invoice is ready",
"text": "Hello Ana, your invoice is now available."}'

The answer has the id of the e-mail and its status. With a Sandbox key the status is simulated; with a Production key and no send_at, the e-mail goes out straight away and the answer has its real status. Every field is in the fields of POST /v1/email/messages.

Always send the Idempotency-Key header, with one unique value per e-mail (the invoice number, for example). If the connection drops and your system repeats the request, the e-mail does not go out twice.
An API key is a password. Keep it on the server, never in page code or a public repository. If it has been exposed, follow what to do when a key leaks.

Want your application sending e-mail from your own domain? See the API and talk to us about Email Center.

See the API page

SEE ALSO

Transactional e-mail: the invoices, confirmations and password resets your system sends on its own

Adding a sender domain to Email Center: the DKIM, SPF and DMARC records to publish

Sending a transactional e-mail through the API: the fields of POST /v1/email/messages

Testing transactional e-mail without sending: Sandbox keys, test mode and simulated bounces

Email Center credits and the daily limit: what a credit pays for and when it comes back

An API key or token has leaked: what to do, in the right order

RECOMMENDED PRODUCT

Register your .co.mz domain

Secure your company name before someone else registers it. from $41.68/yr

Search a domain
Was this answer helpful? Your answer helps us improve this article.