Errors

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

CodeMessage
101From email address cannot be empty
102Subject cannot be empty
103Template invokeName cannot be empty
104Content cannot be empty
106Exist wrong format of TO
107Exist wrong format of CC
108Exist wrong format of BCC
109Exist wrong format of FROM
110Exist wrong format of REPLY_TO
111TO addresses should be no more than 100
112CC addresses should be no more than 100
113BCC addresses should be no more than 100
114REPLY_TO addresses should be no more than 3
115TO cannot be empty
202The number of to did not match the variables
203Wrong format of HTML
204Content size should be no more than 200KB
301Account does not exist
302Password wrong
303Client IP error
304Account deleted or disabled
305Account does not active
306Template invoke name does not exist
401Account balance is insufficient
900Unknown anomaly