Errors & Responses
This section outlines the standard HTTP status codes and MX18-specific validation errors you might encounter while sending emails via the API or SMTP.
MX18 ensures all error responses are returned in a structured JSON format, making it easy to parse and debug.
Standard HTTP status codes
These codes conform to standard HTTP protocol behavior and apply to all API endpoints.
Status Code | Meaning | Description |
---|---|---|
400 |
Bad Request | Malformed request. Required fields might be missing or incorrectly formatted. |
401 |
Unauthorized | API key is missing, expired, or invalid. |
403 |
Forbidden | The authenticated user does not have permission to perform this action. |
404 |
Not Found | The requested endpoint does not exist. |
409 |
Conflict | Duplicate request or conflicting resource creation. |
422 |
Unprocessable Entity | Validation failed. Common issues include missing recipient or subject. |
429 |
Too Many Requests | You've hit the rate limit. Wait or throttle your requests. |
500 |
Internal Server Error | Something went wrong on our end. Please try again later. |
503 |
Service Unavailable | MX18 is temporarily down for maintenance or facing downtime. |
MX18-specific validation errors
These errors are returned as part of the JSON response and have an MX-specific code and human-readable message.
Error Code | Message |
---|---|
MX-0001 |
Mandatory from email address is missing. |
MX-0002 |
from email address is not valid. |
MX-0003 |
Email subject is missing. |
MX-0004 |
Email content is missing. |
MX-0005 |
At least one recipient (to ) must be specified. |
MX-0006 |
Sender domain is invalid or not authorised. |
MX-0007 |
Daily sending limit is over. Contact support. |
MX-0008 |
Sending IPs are not configured for your account. |
Sample error response
{
"error": {
"code": "MX-0005",
"message": "At least one recipient (to) must be specified.",
"status": 422
}
}
You should always handle error responses by checking both the HTTP status code and the MX18-specific code for precise issue tracking.
Need help?
-
Make sure your request payload includes all required fields
-
Check your sender domain and IP configuration
-
Reach out to support@mx18.com for help with persistent errors