Skill 02 · Cloudflare Email Service
Subchapter 2.3
references/rest-api.mdMarkdown2 KBView on GitHub
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.
| Task | Read |
|---|---|
| Authenticate, send an email, or find the complete request schema | REST API (opens in a new tab) and its linked Email Sending API reference |
| Set multiple recipients, CC/BCC, or named addresses | Specify recipients (opens in a new tab) (REST examples) |
| Encode attachments | REST attachments (opens in a new tab) |
| Add custom headers | Email headers (opens in a new tab) |
| Check recipient, message-size, or sending quotas | Limits (opens in a new tab) |
| Interpret delivery outcomes | REST response (opens in a new tab) |
| Diagnose errors and decide whether to retry | REST error handling (opens in a new tab) |
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.