Skip to content

Cloudflare Email Relay · HTTP API Reference

3 endpoints

Covers every route of the native Cloudflare send_email HTTP gateway: Bearer POST /v1/send, legacy panel /v1/panel, and the 7-point /healthz readiness probe.

POSTAuthorization: Bearer + IP Allowlist + Optional RATE_LIMITERPrimary Standard Endpoint

Standard Bearer Send Route

POST /v1/send

Validates framing, CF-Connecting-IP CIDR allowlists, optional rate limiters, 128 KiB UTF-8 JSON body, constant-time multi-token auth, and strict recipient/content bounds before EMAIL.send.

Inspect all 11 error codes ↗

✅ Capabilities

  • Supports zero-downtime key rotation via comma-separated SHA-256 XOR comparison across all AUTH_TOKENS
  • Runs field/domain checks strictly after auth so unauthenticated probes cannot enumerate ALLOWED_SENDER_DOMAINS

⛔ Explicit Limits / Rejections

  • Omits HTML templates, attachments, custom headers, URL query params, and compressed bodies (415)
  • HTTP 200 proves Cloudflare EMAIL binding acceptance rather than final inbox deliverability

Headers & UTF-8 Payload Constraints

AuthorizationheaderBearer <token>Required

Must match ^[A-Za-z0-9._~+/=-]{32,512}$.

from / to / subject / text|htmlbodySTANDARD_FIELDSRequired

Max 128 KiB body, 96 KiB per text/html, 256 B subject, <= MAX_RECIPIENTS total.

Status & Error Envelope Codes

200 OKAccepted by Cloudflare EMAIL binding
400 / 401 / 403 / 413 / 415 / 429 / 502 / 503Distinct invalid_request, invalid_field, unauthorized, forbidden, rate_limited, or not_configured envelope