Error Codes

HTTP response codes

Pepipost returns standard HTTP response codes. Any feedbacks related to this are welcomed on support@pepipost.com

  • 200 - Success. Everything went smooth. In case of GET requests.

  • 201 - Created. The request has been fulfilled and resulted in a new resource being created. Example; In case of Template Creation, you will receive this response.

  • 202 - Accepted. The request has been accepted for processing but the processing has not been completed. Example; In case of Send Email request, you will receive this response.

  • 400 - Bad Request. The request could not be understood by the server due to malformed syntax.

  • 401 - Unauthorized. Missing or incorrect API key in the header.

  • 405 - Method not allowed. GET, POST etc is incorrect.

  • 500 - Internal server error. This is an issue with Pepipost’s servers processing your request. In most cases the message is lost during the process, and we are notified so that we can investigate the issue. In such a case, you need to make a retry.

API error codes

Whenever the Pepipost server detects an input error it will return an HTTP 400 status code along with a JSON object containing error details as shown below:

{
"error_info": {
"error_message": "Invalid api_key passed",
"error_code": 101
},
"message": "Authentication_Error"
}

These error_code field can be used to programmatically detect the type of error. Here are the supported error codes:

Error Code error_message (Details of the error) message (Module in which error is there) Event
405 Method not allowed Method_error This error code indicates that the request method is known by the server but has been disabled for this API call. Learn more
100 api_key is not passed in the header Validation_error API key is not passed in the header
101 Invalid api_key passed Invalid API key is passed in the API call
102 APIs from this IP address is not allowed APIs from this IP address is not allowed
110 Blank content is passed in the payload Common_error Blank content is passed in the payload
111 Invalid JSON format passed in the API call Invalid JSON format passed in the API call
113 Parameter [KEY] not passed in the API call Parameter [KEY] not passed in the API call
130 Invalid domain name Domain_error Invalid domain name
131 Domain already added The domain which you're trying to add was already added.
140 Invalid email address passed Suppression_error Invalid email address passed.
141 Invalid email domain passed Invalid email domain passed
150 Invalid Tempalate ID passed Template_error Invalid Tempalate ID passed
151 Invalid Tempalate Name Invalid Tempalate Name
152 Template Content is passed as blank Template Content is passed as blank
153 Template size should be less than 10MB Template size should be less than 10MB
160 Start date and end date both should be in required format (yyyy-mm-dd) Credit_error Start date and end date both should be in required format (yyyy-mm-dd)
161 Start date should be less than end date Start date should be less than end date
112 Invalid fromEmail used in API call. Hence authentication failed SendEmail_error Invalid fromEmail used in API call. Hence authentication failed
114 Empty recipient list, please make sure you mention at least one recipient Empty recipient list, please make sure you mention at least one recipient
115 Your account has expired Your account has expired
116 Subject not specified Subject not specified
117 Content not specified Content not specified
118 Invalid TemplateID Invalid TemplateID
119 Invalid AttachmentID Invalid AttachmentID
120 Personalization should be an Array object Personalization should be an Array object

In case you have encountered some error which is not listed above or have any feedbacks, please reach us on our 24x7 chat support or write to support@pepipost.com with a detailed information about the incident.