Skip to main content
The Everhour API uses standard HTTP status codes. All error responses include a JSON body with a code and message field.

Error response format

{
  "code": 404,
  "message": "Resource not found"
}
Some errors include an additional errors field with per-field validation details:
{
  "code": 422,
  "message": "Validation failed",
  "errors": {
    "time": ["must be a positive integer"]
  }
}

Status codes

CodeMeaning
200Success
201Resource created
204Success, no content returned
400Bad request — malformed JSON or missing required parameter
401Unauthorized — missing or invalid API key
403Forbidden — your account does not have permission for this action
404Not found — resource does not exist or is not accessible to your account
422Unprocessable entity — request was valid JSON but failed validation
429Too many requests — rate limit exceeded. See Rate limits
500Internal server error — something went wrong on our end

Handling errors

Check the HTTP status code before parsing the response body. A 2xx status indicates success. For anything else, read the message field for a human-readable explanation.
response=$(curl -s -w "\n%{http_code}" https://api.everhour.com/projects \
  -H "X-Api-Key: YOUR_API_KEY")
body=$(echo "$response" | head -1)
status=$(echo "$response" | tail -1)
if [ "$status" -ge 400 ]; then
  echo "Error: $body"
fi
If you encounter a 500 error that persists, contact support via chat inside your Everhour account or at ask@everhour.com with the request details.