MailerSend 422 "The to field is required" in Bubble and Make
This 422 usually means MailerSend received an empty or unparseable request body, so every required field counted as missing. Send Content-Type: application/json, make sure dynamic values are filled at run time (the usual Bubble cause), and log the full response body on every call.
Sohail Hussain9 min readShort answer
- Six "required" errors at once usually mean MailerSend received an empty or unparsed body: the request was not sent as JSON, or your dynamic values were blank when the call ran.
- Replay the exact payload with curl. If curl returns 202, fix how your tool builds the request, then log the status code and response body on every call.
You called MailerSend's email endpoint and got this:
422 Unprocessable Entity
The to field is required. (and 5 more errors)
People report it from Bubble (a scheduled workflow fails with the same payload that worked at initialization), from Make, and from the Python SDK, where some users get no email and no error at all.
Why it happens
A 422 means the request reached the server but could not be processed. MDN describes it as a request whose content type was understood and whose syntax was correct, but whose instructions could not be processed. MDN also notes that repeating a 422 request without changing it should be expected to fail the same way. Retrying will not help; the payload has to change.
MailerSend shows the first validation message in message and counts the rest in parentheses. The full list is in the errors object of the response body. Roughly (shortened, keys depend on what you sent):
{
"message": "The to field is required. (and 5 more errors)",
"errors": {
"to": ["The to field is required."],
"from.email": ["The from.email field is required."],
"subject": ["The subject field is required."]
}
}
One bad value gives one error. Six errors covering recipient, sender, subject and content point to a body that was empty or never parsed.
| Cause | Symptom | Fix |
|---|---|---|
| Body not sent as JSON | Every required field listed | Set Content-Type: application/json and a JSON body type |
| Dynamic values empty at run time | Works when you test, fails when scheduled | Pass values as workflow parameters; log the sent request |
| Broken JSON from quotes or line breaks | Fails only for some recipients or texts | Escape dynamic text as JSON-safe |
| One invalid field | One or two errors | Read the errors object and fix that field |
| Response never read | No email, no error | Log status, body and x-message-id |
| Make module fault | replaceBrackets error, no API response | Inspect module input, or use a plain HTTP request |
Step-by-step fixes
1. Replay the payload with curl
Use your own token and a sender on a domain you verified in MailerSend:
curl -X POST https://api.mailersend.com/v1/email \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"from": {"email": "you@example.com", "name": "Your Name"},
"to": [{"email": "recipient@example.net", "name": "Recipient"}],
"subject": "Test",
"text": "Plain text body",
"html": "<p>HTML body</p>"
}'
A successful call returns 202 Accepted with an empty body. If curl works, MailerSend is fine and your tool is building the request differently. Compare what the tool actually transmits with this, character by character.
2. Make sure the body goes out as JSON
- Open the request your tool actually made (a request inspector or the HTTP client's debug output), not the one you configured.
- Confirm the header
Content-Type: application/jsonis present. - Set the body type to JSON, not form data or raw text.
- Keep the
Authorization: Bearerheader.
3. Bubble: check that dynamic values are filled at run time
A Bubble user on the Bubble forum reported that the call initialized fine but a scheduled workflow got a 422 with every field missing. That pattern points to values, not configuration. At initialization the API Connector uses the sample values you typed; in a scheduled workflow it uses whatever your expressions return then, and that can be empty.
- Open the workflow run in Bubble's server logs and read the request that was sent, not just the response.
- Check that each dynamic parameter (recipient, sender, subject, body) resolves in a backend workflow. Expressions like Current User return nothing when no one is logged in, so pass data in as workflow parameters or search for the record explicitly.
- Look for double quotes or line breaks in dynamic subjects and bodies. They can break the JSON string. Use the API Connector's JSON-safe option for dynamic text.
- If
tois built as an array of objects, confirm the brackets and quotes are still balanced after substitution. - Re-initialize the call with realistic sample data; do not leave any parameter blank.
Initialization can hide the bug
A call that passes at initialization proves only that your sample values are valid. Test the real workflow with a real record before you trust it.
4. Read the errors when you get fewer than six
If one or two errors come back, the body arrived and one field is wrong. Common ones:
from.emailis on a domain not verified in your MailerSend account.tois a plain string instead of an array of objects with anemailkey.- There is no content: you need
text,htmlor atemplate_id. subjectis empty and no template supplies one.
5. Make: the replaceBrackets error
A Make community user reported a replaceBrackets error from the MailerSend module. That error comes from inside the module, not from a MailerSend response, so it is not a 422. I can't verify its cause. What helps:
- Open the scenario's run history and inspect the module's input on the failing run. Check that mapped fields, especially arrays and the recipient list, are not empty or the wrong type.
- Re-add the module in case the issue has since been fixed.
- As a workaround, use Make's generic HTTP "Make a request" module against
https://api.mailersend.com/v1/emailwith the JSON body from the curl example. You then control the payload exactly.
Silent failures: no email and no error
A Python SDK user reported in a GitHub issue on the MailerSend Python repository that nothing arrived and nothing raised an error. I can't tell you the root cause of that report. These are the usual reasons for the symptom in general:
- A 202 only means the request was accepted. MDN defines 202 as received but not yet acted upon, so check the message's status in MailerSend's activity view.
- Many HTTP wrappers return a response object without raising on a 4xx. If you never read the status and body, you never see the 422.
- A broad
try/exceptswallows the exception, or a scheduled job's logs are never read.
A minimal check with plain requests:
import requests
resp = requests.post(
"https://api.mailersend.com/v1/email",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
},
json=payload,
timeout=30,
)
print(resp.status_code, resp.headers.get("x-message-id"), resp.text)
resp.raise_for_status()
If this prints a 202 and a message ID but nothing lands, the problem is downstream. Check the recipient, your sending domain's SPF and DKIM setup, and the message status in MailerSend. If it landed in spam, the email header analyzer shows the authentication results.
Do not retry a 422 in a loop
The same payload fails the same way every time. Retry only 429 and 5xx responses, and fail loudly on 422 so a person sees it.
Checklist before you try again
- The curl command above returns 202 with your real values.
- The request your tool sends has
Content-Type: application/jsonand a JSON body. tois an array of objects, each with anemailkey.- The
fromaddress is on a domain verified in MailerSend. - Content is present:
text,htmlortemplate_id. - Every dynamic value is non-empty in the context that runs (scheduled, backend, not logged in).
- Your code logs the status code, response body and
x-message-id.
If nothing works
Contact MailerSend support when curl with your exact payload returns a 422 you can't explain, or you get a 202 but the message is missing from the activity view. Include the timestamp with timezone, the x-message-id header if you got one, the full response body, the request body with the token removed, and what you already tried.
Subject: POST /v1/email returns 422 (and 5 more errors) / 202 but no message in activity
Hi, I'm sending through the MailerSend API from {Bubble / Make / Python}.
Timestamp: {date, time, timezone}
Endpoint: POST https://api.mailersend.com/v1/email
Response status: {422 or 202}
x-message-id: {value or "none returned"}
Response body: {paste in full}
Request body (token removed): {paste}
Already tried: the same payload via curl returns {result}; Content-Type is
application/json; sender domain is verified.
Can you tell me why this request was rejected or where the message went?
Prevent it
Keep one known-good curl command as your reference. Validate recipient and subject in your own code before the call, so an empty variable fails with a clear message rather than a six-error 422. Alert on any response other than 202, and track real delivery with MailerSend's activity data or webhooks; our guide to email APIs and webhooks covers the pattern.
Common questions
Does a 422 mean MailerSend blocked my account?
No. A 401 points to a bad or missing token. A 422 means the request got through authentication and failed validation.
Why does the same payload work at initialization and fail later?
Initialization uses the sample values you typed. A scheduled run uses live expressions, which can be empty when no user is logged in or a record was not found.
Does a 202 mean the email was delivered?
No. It means the request was accepted for processing. Check the message status in MailerSend and the recipient side for delivery. See MDN's list of client error responses if you need the other status codes.
Should I use the Python SDK or plain HTTP?
Either works if you read the response. If the SDK hides errors from you, calling the endpoint with requests as above shows exactly what the server said.
Explore: Email Deliverability
Related Articles
SMTP2GO "error 8" and Other Email Provider Signup Rejections
When SMTP2GO shows "error 8", or SendGrid or MailerSend deny your account without a reason, an account-level screening decision was made before you sent anything. Use an aged domain with a real website, a business email address and a specific use case, appeal once with details, then switch providers if it fails.
0x800ccc0e: Outlook Unable to Connect to SMTP Server, Fixed
Outlook error 0x800ccc0e means the app could not open a connection to your outgoing (SMTP) server. Usually the port, encryption setting or password is wrong, or antivirus, a firewall or your ISP is blocking it. Set port 587 with STARTTLS, turn on SMTP authentication, and test again.
SocketLabs "421 4.5.1 Too many errors" blacklist: how to fix it
`421 4.5.1 Too many errors, you have been temporarily blacklisted` means a SocketLabs server saw repeated auth or bad-address errors from your IP and paused it. Stop whatever is retrying, fix credentials and invalid recipients, clear the queue, and wait. The block usually lifts within minutes, but returns if retries resume.
421-4.7.0 Gmail Has Detected This Message Is Suspicious: Fix
The 421-4.7.0 "suspicious due to the nature of the content and/or the links" error means Gmail's content filter rejected your message after DATA, not an authentication check. Remove click tracking or move it to your own domain, drop URL shorteners, check link reputation, then retest with a plain message.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free