EmailFlare needs a scoped Cloudflare API token to provision sending domains, verify DNS records, and deliver email through Cloudflare Email Sending. This guide walks through every step.
Sign in to dash.cloudflare.com, then click your profile avatar in the top-right corner. Select My Profile, then navigate to the API Tokens tab.
Click Create Token, then at the bottom of the template list choose Create Custom Token.
Give the token a recognisable name so you can identify it later. Something like
emailflare-production or emailflare-yourdomain works well.
Under Permissions, add each of the following rows. Use the + Add more button after each one.
| Resource type | Permission | Access | Why |
|---|---|---|---|
| Account | Email Sending | Edit | Send email via Cloudflare Email Sending API |
| Account | Email Security | Edit | Manage sending domain DKIM and security settings |
| Account | Access: Users | Read | Read account membership for domain scoping |
| Account | Account Settings | Read | Read account metadata |
| Zone | Email Routing Rules | Edit | Create and manage routing rules for sending domains |
| Zone | Zone | Read | Read zone IDs needed to provision domains |
| Zone | DNS | Edit | Create DKIM and return-path DNS records automatically |
Below the permissions table, Cloudflare will ask which resources the token applies to. Configure both sections as shown:
mail.yourdomain.com),
you can select individual zones instead of All zones. Just make sure every domain you add to EmailFlare
falls within the selected zones.
Click Continue to summary, review the permissions, then click Create Token. Cloudflare will show the token exactly once — copy it immediately and keep it somewhere secure.
EmailFlare also needs your CF_ACCOUNT_ID. You can find this on any domain's
overview page in the Cloudflare dashboard — look in the right sidebar under Account ID.
Alternatively, visit
dash.cloudflare.com/?to=/:account
— your Account ID appears in the URL as the path segment after /.
Open your .env.local (or your platform's environment settings) and set:
v1.