API Keys 🔑
An API key is how your code proves it’s allowed to use your Mailofly account. Think of it as a password — but one that your app uses instead of you typing it in every time.Creating a key
- Go to API Keys in your dashboard
- Click Create Key and give it a name (like
productionorstaging) - Copy the key — it’ll start with
mfly_live_
Using it in your app
Every API request needs this header:Tips for keeping your key safe
- 🔑 One key per service — if a key leaks, you only have to rotate that one
- 🚫 Never commit it to git — seriously, even “just for testing”
- ⏰ Use short-lived keys for contractors, staging, or one-off scripts
- 🔄 Rotate regularly — especially if you think it might have been exposed
What’s next?
- Connect a sending account — you’ll need an
acc_…key to actually send emails - Node.js quickstart — send your first email in 60 seconds
- API Reference — full docs for every endpoint

