Skip to main content
Reference vendor/cloudflare 2 min read

rest-api

Sending Emails — REST API

Use the REST API for HTTP integrations from external applications, or when the user explicitly requests it inside a Worker. Otherwise prefer the Workers binding.

Read the relevant page before building the request. Keep credentials in the project’s existing secret or environment-variable mechanism, and inspect the installed client SDK version if one is used.

TaskRead
Authenticate, send an email, or find the complete request schemaREST API and its linked Email Sending API reference
Set multiple recipients, CC/BCC, or named addressesSpecify recipients (REST examples)
Encode attachmentsREST attachments
Add custom headersEmail headers
Check recipient, message-size, or sending quotasLimits
Interpret delivery outcomesREST response
Diagnose errors and decide whether to retryREST error handling

Do not reuse a Workers binding payload or response parser unchanged: verify field names, attachment encoding, response shape, and error handling for the chosen API. Validate both successful responses and failures through the project’s existing checks; distinguish retryable service failures from requests that need correction.