Errors and limits
Envelope
Every response — success or failure — looks like this:Status codes
Validation errors
A422 response lists every field that failed, so one round trip is enough to
fix the request:
errors is an object keyed by field name. Each value is a plain text string
that explains the fix, so a client can display it directly. Multiple messages
for the same field are joined with spaces. Send the
corrected field and try again.
Rules that apply to the request as a whole — no recipients at all, more than
10,000 recipients, an invalid address somewhere in a list — are reported under
the key __all__, because no single field owns them:
400 is different: the request was readable, but it cannot be sent. The
common case is a message with neither textBody nor htmlBody.
A body that cannot be parsed at all is a 422 reported under request with
"Invalid request payload". A missing required key is reported under that key
with "Required field".
Rate limits
Authentication endpoints are throttled per IP (20 requests/minute), with five failed password attempts locking sign-in for 15 minutes. Sending is paced by your plan’s per-minute rate and monthly allowance instead — see Billing.Validation
Bodies are validated field by field: email addresses must parse, required fields must be present, and passwords need at least 12 characters. Theerrors object
identifies what failed; fix it and resend. Unknown JSON fields are ignored, so a
typo in an optional field can pass silently — check the spelling of from,
replyTo and envelopeSender when a message does not behave as expected.