Error Codes

If your request fails we will respond with a status code and a response body.

The message is for the developer and the code is for your machine. If it is a validation error there will also be a "field" key, telling you where the error is.

{
  "errors": [
    {
      "message": "The name field is required.",
      "code": "validation.required",
      "field": "name"
    },
    {
      "message": "The user.email has already been taken.",
      "code": "validation.exists",
      "field": "user.email"
    }
  ]
}

General errors

Status code: 402
Code: quota.exceeded
Explanation: You have met the record quota for the current subscription. (See the Subscription and billing section in this documentation.)

Status code: 403
Code: unauthorized
Explanation: Your API credentials are wrong, or you are not allowed to access this part of the API

Status code: 404
Code: not_found
Explanation: The endpoint does not exists

Status code: 405
Code: method_not_allowed
Explanation: The request method is not not allowed

Status code: 410
Code: missing
Explanation: The resource is deleted

Status code: 415
Code: content_type
Explanation: The Content-Type header must be application/json

Status code 422
Code: validation.*
Explanation: Your request could not be validated.

Status code: 500
Code: error
Explanation: Something went wrong. You will get a id that will allow the EASI’R team to look into the error

Validation errors

Code: validation.active_url
Explanation: The url must have a DNS record

Code: validation.after
Explanation: The date provided must be after a specific date

Code: validation.alpha
Explanation: The value can only contain letters

Code: validation.alpha_dash
Explanation: The value can only contain letters, numbers, and dashes

Code: validation.alpha_num
Explanation: The value can only contain letters and numbers

Code: validation.before
Explanation: The date provided must be before a specific date

Code: validation.numeric_between
Explanation: The number must be in a specific range

Code: validation.length_between
Explanation: The value length must be in a specific range

Code: validation.boolean
Explanation: The value must be either true or false

Code: validation.date
Explanation: The value must be a valid date

Code: validation.email
Explanation: The value must be a valid email

Code: validation.invalid
Explanation: The value is invalid

Code: validation.image
Explanation: The file must be a image

Code: validation.integer
Explanation: The value must be a integer

Code: validation.ip
Explanation: The value must be a valid IP

Code: validation.numeric_max
Explanation: The number must be under a specific value

Code: validation.filesize_max
Explanation: The filesize must be under a specific value

Code: validation.length_max
Explanation: The value length must be under a specific value

Code: validation.numeric_min
Explanation: The number must be over a specific value

Code: validation.filesize_min
Explanation: The filesize must be over a specific value

Code: validation.length_min
Explanation: The value length must be over a specific value

Code: validation.numeric
Explanation: The value must be numeric

Code: validation.required
Explanation: The field is required

Code: validation.exists
Explanation: The value is already taken

Code: validation.url
Explanation: The value must be a valid URL

Code: validation.timezone
Explanation: The value must be a valid timezone

Further elaboration can be found in the message field of the error message.