Error Response
Authentication
A request is successfully accepted with an HTTP status code of 2xx. Otherwise, it indicates that something goes wrong with an HTTP status code of 4xx or 5xx.
A structured response body is returned when errors occur, here is an example of the response body for errors:
{
"timestamp": 1711419544019,
"status": 401,
"error": "Unauthorized",
"message": "Invalid API Key"
"path": "/v1/email/send"
}
After Pass Authentication
{
"code": "101",
"message": "From email address cannot be empty",
"data": null
}
Error Object
code
REQUIRED. YONI-TECH defines the error code.
message
A human-readable representation of the error. It is intended as an aid to developers and is not suitable for exposure to end users.
data
Always null
Code List
| Code | Message |
|---|---|
| 101 | From email address cannot be empty |
| 102 | Subject cannot be empty |
| 103 | Template invokeName cannot be empty |
| 104 | Content cannot be empty |
| 106 | Exist wrong format of TO |
| 107 | Exist wrong format of CC |
| 108 | Exist wrong format of BCC |
| 109 | Exist wrong format of FROM |
| 110 | Exist wrong format of REPLY_TO |
| 111 | TO addresses should be no more than 100 |
| 112 | CC addresses should be no more than 100 |
| 113 | BCC addresses should be no more than 100 |
| 114 | REPLY_TO addresses should be no more than 3 |
| 115 | TO cannot be empty |
| 202 | The number of to did not match the variables |
| 203 | Wrong format of HTML |
| 204 | Content size should be no more than 200KB |
| 301 | Account does not exist |
| 302 | Password wrong |
| 303 | Client IP error |
| 304 | Account deleted or disabled |
| 305 | Account does not active |
| 306 | Template invoke name does not exist |
| 401 | Account balance is insufficient |
| 900 | Unknown anomaly |
