REST API Response Codes - MailerSend
Knowledge base
REST API response codes
REST API response codes can be found in the Status line of a HTTP response message. Their purpose is to provide information about the results of a request, which can help developers manage and troubleshoot activity and errors on their apps.
The most common API response codes you might see are listed below with an explanation of what they mean and some suggestions of what might be causing the response. Sometimes there is further information accompanying the error, and you'll find some examples of this below.
| Status code | Description | Description |
|---|---|---|
| 200 - OK | Good news! The request is formatted correctly and the requested action should be taken/data returned. This is the positive response for most PUT , GET , and some POST requests in the API documentation. | Good news! The request is formatted correctly and the requested action should be taken/data returned. This is the positive response for most PUT , GET , and some POST requests in the API documentation. |
| 201 - Created | This means there were no issues found with the request and the requested action has been taken. The 201 response will appear on some API requests, such as successful POST requests to our webhooks and inbound routes endpoints. | This means there were no issues found with the request and the requested action has been taken. The 201 response will appear on some API requests, such as successful POST requests to our webhooks and inbound routes endpoints. |
| 202 - Accepted | Hurrah! This response is associated with our email and bulk-email endpoints and means there were no issues found with the request and the email has been queued for sending. 202 responses may occasionally have a response body, here are some examples: {"message":"The bulk email is being processed.","bulkemailid":"621f6ce82a27ea2fea32f582"} Copy code to clipboard This is the accompanying response for successful API requests sent to the bulk-email endpoint. Each bulk email request will have a unique bulk_email_id. {"message":"There are some warnings for your request.","warnings": [{"type":"ALLSUPPRESSED","message":"All of the recipients provided have been suppressed.","recipients":[{"email":"hello@example.com","name":null,"reasons":["hardbounced"]}]}]} Copy code to clipboard If all or some of the recipients in the email list have been suppressed, a variation of this message will be sent back in response. There will always be a 202 response, but the email won’t be sent if all recipients are suppressed. | Hurrah! This response is associated with our email and bulk-email endpoints and means there were no issues found with the request and the email has been queued for sending. 202 responses may occasionally have a response body, here are some examples: {"message":"The bulk email is being processed.","bulkemailid":"621f6ce82a27ea2fea32f582"} Copy code to clipboard This is the accompanying response for successful API requests sent to the bulk-email endpoint. Each bulk email request will have a unique bulk_email_id. {"message":"There are some warnings for your request.","warnings": [{"type":"ALLSUPPRESSED","message":"All of the recipients provided have been suppressed.","recipients":[{"email":"hello@example.com","name":null,"reasons":["hardbounced"]}]}]} Copy code to clipboard If all or some of the recipients in the email list have been suppressed, a variation of this message will be sent back in response. There will always be a 202 response, but the email won’t be sent if all recipients are suppressed. |
| 204 - Success | This response code is most commonly seen in response to DELETE requests sent to our recipients and webhooks endpoints. And similar to the 200 and 201 responses, this means there were no issues found with the request and the requested action has been taken. | This response code is most commonly seen in response to DELETE requests sent to our recipients and webhooks endpoints. And similar to the 200 and 201 responses, this means there were no issues found with the request and the requested action has been taken. |
| 400 - Bad request | Bad request errors normally indicate a server-side problem. If you are still faced with this error after trying again, contact the technical support team. | Bad request errors normally indicate a server-side problem. If you are still faced with this error after trying again, contact the technical support team. |
| 401 - Unauthorized | This response will nearly always be accompanied by the following response body message: {"message":"Unauthenticated."} Copy code to clipboard This normally suggests an issue with the token you have provided. To troubleshoot, check the following: Your token has been added correctly to the request The token has not been deleted or paused If everything is in order, try creating a new token and attempt the request again to see if this resolves the issue. | This response will nearly always be accompanied by the following response body message: {"message":"Unauthenticated."} Copy code to clipboard This normally suggests an issue with the token you have provided. To troubleshoot, check the following: Your token has been added correctly to the request The token has not been deleted or paused If everything is in order, try creating a new token and attempt the request again to see if this resolves the issue. |
| 403 - Forbidden | 403 indicates an issue with the request or the account attached to the request. Several different messages can appear on a 403 response. “Your account is suspended" : If you attempt to send a request with a suspended account, you will receive this response and the request will not be fulfilled. "Invalid scope(s) provided" : This could indicate that you are using a custom API token that doesn't have the required permissions. For example, if you’re sending a request to the email endpoint using a token that does not allow email access. If you receive this error, check that you are using a token that has the required access. "This action is unauthorized" : This message will be returned if a rejected account tries to send a request to the email endpoint. "You do not have permission to add another domain” : Multiple domains are available for Starter plans and above. Trial, Free and Hobby plan accounts will see this message if they try and add an additional domain via API. "This account access is blocked. Contact support” : This error message is returned if API/SMTP access has been switched off for your account. "You've reached the webhook limit. Upgrade to add more webhooks” : Free plan accounts can add 1 webhook, Hobby plans can add 5, and Starter plans, 50. If you reach your plan limit and attempt to add another webhook, you will receive this message. | 403 indicates an issue with the request or the account attached to the request. Several different messages can appear on a 403 response. “Your account is suspended" : If you attempt to send a request with a suspended account, you will receive this response and the request will not be fulfilled. "Invalid scope(s) provided" : This could indicate that you are using a custom API token that doesn't have the required permissions. For example, if you’re sending a request to the email endpoint using a token that does not allow email access. If you receive this error, check that you are using a token that has the required access. "This action is unauthorized" : This message will be returned if a rejected account tries to send a request to the email endpoint. "You do not have permission to add another domain” : Multiple domains are available for Starter plans and above. Trial, Free and Hobby plan accounts will see this message if they try and add an additional domain via API. "This account access is blocked. Contact support” : This error message is returned if API/SMTP access has been switched off for your account. "You've reached the webhook limit. Upgrade to add more webhooks” : Free plan accounts can add 1 webhook, Hobby plans can add 5, and Starter plans, 50. If you reach your plan limit and attempt to add another webhook, you will receive this message. |
| 404 - Not found | This is a standard 404 message. It means the endpoint URL you are attempting to send a request to cannot be found. Check the URL and the URL formatting. If the URL is correct, contact support. | This is a standard 404 message. It means the endpoint URL you are attempting to send a request to cannot be found. Check the URL and the URL formatting. If the URL is correct, contact support. |
| 405 - Method not allowed | In the unlikely event that you receive this response code, please contact support. | In the unlikely event that you receive this response code, please contact support. |
| 408 - Request timeout | Like the 400 bad request response, request timeout errors normally indicate a server-side problem. If you continue to receive this response, please contact support. | Like the 400 bad request response, request timeout errors normally indicate a server-side problem. If you continue to receive this response, please contact support. |
| 422 - Unprocessable entity - validation error | 422 usually means the API call has not been correctly formatted and/or there is a validation error due to the reasons outlined below. "The attachments.0.content size exceeds the threshold of 10 MB.” Copy code to clipboard As stated, this will be sent in response if an attachment is included and its size exceeds the 10MB threshold. "The to field is required.” / "The from.email field is required.” / "The subject field is required.” Copy code to clipboard These messages can appear in response to a POST request sent to the email endpoint with the required parameters missing. It is also not uncommon to see this message when these parameters have been added. This may indicate they have been added incorrectly or there is a problem with the formatting of the code. "You must provide one of html, text or template_id.” Copy code to clipboard At least one of the following must be added to a send an email request for it to be successful: html version, text version, or template_id. If none of these are added to the request then this message will be returned. As with the similar message above, it is not uncommon to see this message when these parameters have been added, which may indicate they have been added incorrectly or there is a problem with the formatting of the code. “{recipient email} is being duplicated in the to recipients list.” Copy code to clipboard If the to.*.email is duplicated in a send an email request, this message will be returned. "The from.email must be verified.” Copy code to clipboard The domain on the from.email must be verified on your account to be able to send emails. Please make sure this domain has a "is_verified" value set to 'true' via the API or the app. You can also add the from email address as a sender identity if you're on a Starter or Professional plan. "This file type is not supported.” Copy code to clipboard Supported file types are listed here . "Email quota reached.” Copy code to clipboard This response is given when an account's quota has been reached. "Recipient limit exceeded.” / "CC recipient limit exceeded.” / "BCC recipient limit exceeded.” Copy code to clipboard This response is sent if the limit of CC and BCC recipients in a single email object is reached. The limits are as follows: Approved accounts: Up to 10 BCC recipients and up to 10 CC recipients per email object. Not yet approved accounts: Up to 1 BCC recipient and up to 1 CC recipient per email object. "Could not validate the attached file. Filename and attached file does not match." Copy code to clipboard This error could mean the file name you have entered does not match. For example, if you have uploaded a GIF file but entered the file name as "me.png". | 422 usually means the API call has not been correctly formatted and/or there is a validation error due to the reasons outlined below. "The attachments.0.content size exceeds the threshold of 10 MB.” Copy code to clipboard As stated, this will be sent in response if an attachment is included and its size exceeds the 10MB threshold. "The to field is required.” / "The from.email field is required.” / "The subject field is required.” Copy code to clipboard These messages can appear in response to a POST request sent to the email endpoint with the required parameters missing. It is also not uncommon to see this message when these parameters have been added. This may indicate they have been added incorrectly or there is a problem with the formatting of the code. "You must provide one of html, text or template_id.” Copy code to clipboard At least one of the following must be added to a send an email request for it to be successful: html version, text version, or template_id. If none of these are added to the request then this message will be returned. As with the similar message above, it is not uncommon to see this message when these parameters have been added, which may indicate they have been added incorrectly or there is a problem with the formatting of the code. “{recipient email} is being duplicated in the to recipients list.” Copy code to clipboard If the to.*.email is duplicated in a send an email request, this message will be returned. "The from.email must be verified.” Copy code to clipboard The domain on the from.email must be verified on your account to be able to send emails. Please make sure this domain has a "is_verified" value set to 'true' via the API or the app. You can also add the from email address as a sender identity if you're on a Starter or Professional plan. "This file type is not supported.” Copy code to clipboard Supported file types are listed here . "Email quota reached.” Copy code to clipboard This response is given when an account's quota has been reached. "Recipient limit exceeded.” / "CC recipient limit exceeded.” / "BCC recipient limit exceeded.” Copy code to clipboard This response is sent if the limit of CC and BCC recipients in a single email object is reached. The limits are as follows: Approved accounts: Up to 10 BCC recipients and up to 10 CC recipients per email object. Not yet approved accounts: Up to 1 BCC recipient and up to 1 CC recipient per email object. "Could not validate the attached file. Filename and attached file does not match." Copy code to clipboard This error could mean the file name you have entered does not match. For example, if you have uploaded a GIF file but entered the file name as "me.png". |
| 429 - Exceeded limit | "Daily API quota limit was reached.” Copy code to clipboard Every request is counted against the quota and is reset daily at midnight UTC: Trial and Free plan accounts have a limit of 100 API requests per day. Hobby plan accounts are limited to 1,000 requests per day. Starter plans can send up to 100,000 requests per day, and Professional and Enterprise plans can send up to 500,000. "Too Many Attempts.” Copy code to clipboard This response will be sent back if you attempt to send requests to our API more frequently than we allow: MailerSend has a default rate limit of 60 requests per minute on general API endpoints and 120 for email endpoints. Please wait for the amount of seconds indicated by 'retry-after' and try again. | "Daily API quota limit was reached.” Copy code to clipboard Every request is counted against the quota and is reset daily at midnight UTC: Trial and Free plan accounts have a limit of 100 API requests per day. Hobby plan accounts are limited to 1,000 requests per day. Starter plans can send up to 100,000 requests per day, and Professional and Enterprise plans can send up to 500,000. "Too Many Attempts.” Copy code to clipboard This response will be sent back if you attempt to send requests to our API more frequently than we allow: MailerSend has a default rate limit of 60 requests per minute on general API endpoints and 120 for email endpoints. Please wait for the amount of seconds indicated by 'retry-after' and try again. |
| 500 - Server error | A 500 response indicates a server-side error. If you continue to receive this error, please contact support. | A 500 response indicates a server-side error. If you continue to receive this error, please contact support. |
Getting started: Sending your first email Navigating the app interface
Email Add and verify a sending domain How to merge multiple SPF records Start sending transactional emails SMTP relay Testing email sending with blackhole recipients Email Activity Analytics Bulk email sending Custom headers Custom unsubscribe headers Sending domains Domain reputation Domain tracking options Personalization in emails Sender identities Split Testing Surveys Tagging emails Templates How to translate email templates automatically How to configure SMTP connections correctly (421: Service not available error) How to enable Google Email Actions & Highlights How transactional emails work The difference between transactional emails and marketing emails
SMS Purchase an SMS phone number Start sending SMS SMS: How to handle opt-in and opt-out SMS verification and usage limits
WhatsApp Getting started with WhatsApp How to connect and use the WhatsApp sandbox Managing WhatsApp Business phone numbers How to create and manage WhatsApp templates WhatsApp message activity WhatsApp inbound messaging: How it works and how to set it up
Developer tools Managing API tokens Webhooks API & SMTP request logs REST API response codes
Deliverability Blocklist monitoring DMARC monitoring How to verify an email list Deferred emails Suppressions On Hold blocklist Spam complaints 403, 422, & 429 errors What are hard and soft bounces? Improve email deliverability Reduce unsubscribe rates Account reputation statuses
Account, billing & add-ons Plans, features and limits Plan add-ons User management Change password Two-factor authentication Switch accounts How to whitelist IPs How to add a domain space to your account How to request a dedicated IP How to set a billing limit on your account How to change your payment method How to change or cancel your plan Delete account VAT Collection for EU Customers VAT Collection for UK Customers GST Collection for Customers in India GST Collection for Customers in Canada VAT (IVA) Collection for Customers in Chile Sandbox mode and the Professional trial Sales Tax Collection for Customers in New York
Integrations How to integrate MailerSend with Zapier How to integrate MailerSend with Supabase How to integrate MailerSend with Airtable How to integrate MailerSend with Slack for email event notifications WordPress WooCommerce How to configure MailerSend on Google Cloud How to connect MailerSend's MCP with your AI tools
Agency guides Creating sub-accounts for clients Sending emails for clients: domains vs. sender identities
API reference ↗
Getting started: Sending your first email
Add and verify a sending domain
How to merge multiple SPF records
Start sending transactional emails
Testing email sending with blackhole recipients
How to translate email templates automatically
How to configure SMTP connections correctly (421: Service not available error)
How to enable Google Email Actions & Highlights
The difference between transactional emails and marketing emails
SMS: How to handle opt-in and opt-out
SMS verification and usage limits
How to connect and use the WhatsApp sandbox
Managing WhatsApp Business phone numbers
How to create and manage WhatsApp templates
WhatsApp inbound messaging: How it works and how to set it up
What are hard and soft bounces?
How to add a domain space to your account
How to set a billing limit on your account
How to change your payment method
How to change or cancel your plan
VAT Collection for EU Customers
VAT Collection for UK Customers
GST Collection for Customers in India
GST Collection for Customers in Canada
VAT (IVA) Collection for Customers in Chile
Sandbox mode and the Professional trial
Sales Tax Collection for Customers in New York
How to integrate MailerSend with Zapier
How to integrate MailerSend with Supabase
How to integrate MailerSend with Airtable
How to integrate MailerSend with Slack for email event notifications
How to configure MailerSend on Google Cloud
How to connect MailerSend's MCP with your AI tools
Creating sub-accounts for clients