Cloudflare Email Routing API Tester

? Cloudflare Email Routing API Tester

Test and manage your Cloudflare Email Routing settings with CORS solutions

? Configuration

? CORS Proxy Settings
Proxy Enabled
Automatically tries fallback proxies if one fails
Create a token with Zone:Zone:Read and Zone:Zone:Edit permissions
Found in your domain's overview page in Cloudflare dashboard
The email pattern to route (for creating rules)
Where emails should be forwarded to

? API Response

Ready to test API calls. Configure your credentials and click any button above. CORS Proxy is ENABLED by default to avoid browser restrictions.

? Understanding CORS & Solutions

What is CORS? Cross-Origin Resource Sharing (CORS) is a browser security feature that blocks requests from one domain (your local HTML file) to another (Cloudflare API).

✅ Recommended: Use the built-in CORS proxy toggle above. It routes your requests through a proxy server that adds the necessary CORS headers.

Multiple Fallbacks: If one proxy fails, the tool automatically tries others in the list.

? Local Proxy Server: Run your own proxy server for better reliability.

# Install dependencies npm init -y npm install express http-proxy-middleware cors # Create server.js const express = require('express'); const { createProxyMiddleware } = require('http-proxy-middleware'); const cors = require('cors'); const app = express(); app.use(cors()); app.use('/api/v4', createProxyMiddleware({ target: 'https://api.cloudflare.com', changeOrigin: true, pathRewrite: { '^/api/v4': '/v4' } })); app.listen(3001, () => console.log('Proxy server running on port 3001')); # Run the server node server.js

Then select "Local Proxy (Port 3001)" from the dropdown above.

⚠️ Testing Only: Disable CORS in Chrome for development (NOT for production!).

# Windows chrome.exe --user-data-dir="C:/Chrome dev" --disable-web-security --disable-features=VizDisplayCompositor # Mac open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security # Linux google-chrome --disable-web-security --disable-features=VizDisplayCompositor --user-data-dir="/tmp/chrome_dev_test"

Warning: This makes your browser less secure. Only use for API testing!

? Required API Permissions & Setup

  • Create API Token: Go to Cloudflare Dashboard → My Profile → API Tokens → Create Token
  • Required Permissions:
    • Zone:Zone:Read - To read zone information
    • Zone:Zone:Edit - To manage email routing settings
  • Zone Resources: Include the specific zone you want to manage
  • Find Zone ID: Dashboard → Your Domain → Right sidebar under "API"
  • Email Routing: Must be enabled on your domain first (Dashboard → Email → Email Routing)
  • CORS Solution: This tool defaults to using CORS proxy - just leave it enabled!