Documentation

API keys

Live keys send mail. Test keys run everything except the sending.

Every account gets one of each, and the prefix says which is which: mg_live_ or mg_test_.

Test keys

A test key runs the entire pipeline — suppression checks, event generation, webhook delivery, the message log — and sends no real mail, spends no quota. Use it in CI and in staging. It behaves the same over REST and over SMTP.

Scopes

A key can be narrowed to only what it needs. A key used by a webhook receiver does not need permission to send, and narrowing it limits the damage if it leaks.

Keys are shown once and stored only as hashes. Rotate by issuing a new key, moving traffic to it, then revoking the old one — revoking is immediate and closes SMTP access at the same time.

Related