You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set custom headers for threading, list management, or tracking. Refer to the [email headers reference](/email-service/reference/headers/) for the full list of allowed headers.
A successful response returns the delivery status for each recipient:
132
+
133
+
```json
134
+
{
135
+
"success": true,
136
+
"errors": [],
137
+
"messages": [],
138
+
"result": {
139
+
"delivered": ["recipient@example.com"],
140
+
"permanent_bounces": [],
141
+
"queued": []
142
+
}
143
+
}
144
+
```
145
+
146
+
-`delivered` - Email addresses to which the message was delivered immediately.
147
+
-`permanent_bounces` - Email addresses that permanently bounced.
148
+
-`queued` - Email addresses for which delivery was queued for later.
149
+
129
150
## Error handling
130
151
131
-
The REST API returns standard Cloudflare API responses. A failed request returns an `errors` array:
152
+
The REST API returns standard Cloudflare API error responses. A failed request returns an `errors` array with numeric error codes:
132
153
133
154
```json
134
155
{
135
156
"success": false,
136
157
"errors": [
137
158
{
138
-
"code": "E_SENDER_NOT_VERIFIED",
159
+
"code": 1000,
139
160
"message": "Sender domain not verified"
140
161
}
141
-
]
162
+
],
163
+
"messages": [],
164
+
"result": null
142
165
}
143
166
```
144
167
145
-
Refer to the [error codes table](/email-service/api/send-emails/workers-api/#error-codes) for the full list of error codes and their causes.
168
+
:::note[Workers binding vs REST API errors]
169
+
The REST API returns standard Cloudflare API numeric error codes, while the [Workers binding](/email-service/api/send-emails/workers-api/) throws errors with string codes (for example, `E_SENDER_NOT_VERIFIED`). Refer to the [Workers API error codes table](/email-service/api/send-emails/workers-api/#error-codes) for the string error codes.
0 commit comments