- 23 Aug 2023
- 4 Minutes to read
Status and Error Codes
- Updated on 23 Aug 2023
- 4 Minutes to read
HTTP status codes are the responses that indicate whether a request has been successfully completed. These status codes serve as a communication medium between the browser and server.
The first digit of each status code defines the type of response as follows:
- 2XX indicates that your request has been successfully completed.
- 4XX indicates a client error. These are mostly validation errors.
- 5XX indicates a server error caused by the server itself.
Below you can see a list of various HTTP status codes that can return as a response to the requests sent to Insider's APIs, along with sample responses:
200 OK
This code indicates that the request has been successfully completed.
{
"data": {
"successful": {
"count": 1
},
"fail": {}
}
}
200 Campaign Created Successfully
This code indicates that your campaign has been successfully created.
{
"response": "Campaign Created."
}
201 Created
This code indicates that your campaign has been successfully created.
{
"status_code": 201,
"content": {
"message": "Campaign created successfully.",
"builder_id": "1000",
"campaign_id": "1230"
}
}
201 Created Success Message
This code indicates the success message.
{
"message":"created",
"id":"builderID"
}
202 Accepted
This code indicates that your request has been successfully accepted.
{
"message": "Accepted",
"status": 202
}
400 Bad Request
This code indicates that the server cannot proceed due to a client error.
{
"success": false,
"message": "Access Denied. You do not have sufficient access to perform this action."
}
400 Unifier Error
This code indicates that the CRM unifier in your request cannot be found on InOne.
{
"success": false,
"message": "No CRM Unifier found in InOne."
}
400 Invalid Config
This code indicates that the request has invalid config.
{
"success": false,
"message": "Config is invalid."
}
400 Invalid Partner
This code indicates that the partner in the request does not exist.
{
"success": false,
"message": "Partner is invalid."
}
400 Maximum Size
This code indicates that the number of products in the request exceeds the maximum size.
{
"success": false,
"message": "Maximum allowed size is 100."
}
400 Invalid API Key
This code indicates that there is no partner with this API key.
{
"response": "No Partner Found With Api Key."
}
400 Missing Content
This code indicates that the request is missing the 'content' parameter.
{
"errors": [
"Missing 'content' parameter"
],
"message": "bad-request",
"status": 400
}
400 Connection Error
This code indicates that there is a connection error.
{
"success": false,
"message": "Could not get CRM Attributes List."
}
400 Throttling Exception
This code indicates that the request exceeds the maximum number of records.
{
"success": false,
"message": "The request is denied. More than 10000 records were sent."
}
400 Missing Subject Line
This code indicates that the request is missing the 'subject' parameter.
{
"errors": [
"Missing 'subject' parameter"
],
"message": "bad-request",
"status": 400
}
400 Missing Content Type
This code indicates that the request is missing the content type.
{
"message": "content type must be application/json",
"status": 400
}
400 Missing 'To' Parameter
This code indicates that the request is missing the 'to' parameter.
{
"errors": [
"Missing 'to' parameter"
],
"message": "bad-request",
"status": 400
}
400 Missing 'From' Parameter
This code indicates that the request is missing the 'from' parameter.
{
"errors": [
"Missing 'from' parameter"
],
"message": "bad-request",
"status": 400
}
400 Validation Error Message
This code indicates that the request is not validated.
{
"error":"<Field> is required."
}
400 Maximum Allowed Request Size
This code indicates that the maximum allowed request size is exceeded.
{
"success": false,
"message": "Maximum allowed request size is exceeded."
}
400 Maximum Allowed Record Count
This code indicates that the maximum allowed record count is exceeded.
{
"success": false,
"message": "Maximum allowed record count is exceeded."
}
400 Invalid Data Exception: Couldn't parse JSON
This code indicates that the request data is not in the valid JSON format.
{
"success": false,
"message": "Request data is not in valid JSON format."
}
401 Unauthorized
This code indicates that the API key is incorrect.
{
"error": "Bad Api Key."
}
401 Invalid API Key
This code indicates that the provided API key is invalid, expired, or revoked.
{
"message": "The provided API key is invalid, expired or revoked",
"status": 401
}
401 Unauthorized Request
This code indicates that the request is unauthorized.
{
"status_code": 401
}
401 Unauthorized Error Message
This code indicates that the request is not authorized.
{
"error":"unauthorized"
}
401 Partner Cannot Be Validated
This code indicates that the partner cannot be validated.
{
"success": false
}
403 Forbidden
This code indicates that the access is denied and you do not have the sufficient access to perform this action.
{
"success": false,
"message": "Access Denied. You do not have sufficient access to perform this action."
}
403 Authentication Failed
This code indicates that the request has failed due to missing or invalid authentication key.
403 Request Limit Exceeded
This code indicates that the request limit is exceeded.
{
"error" : {
"message" : "Too many attempts, please slow down the request. 30 Requests/minute is allowed."
},
"status": 403
}
405 Invalid Payload
This code indicates that the request payload is invalid.
{
"error": "Invalid Payload."
}
406 Not Acceptable Request
We are able to provide the analytics data for only the last 1 year.
422 Missing Parameter
This code indicates that the request has missing parameter(s).
{
"status_code": 422,
"errors": {
"field": [
"The <field> is required."
]
}
}
422 Unprocessable Entity
This code indicates that the request cannot be processed.
{
"status_code": 422,
"errors": {
"title": [
"The title field is required."
]
}
}
429 Too Many Requests
This code indicates that the request has exceeded the maximum number of requests per a defined time.
500 Internal Server Error
This code indicates that the server cannot process the request due to an unknown error.
{
"success": false,
"message": "The request processing has failed because of an unknown error."
}