Skip to main content
All API responses follow a consistent structure. On failure, the success field is false and an error message is included.

Error response structure

{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "email": ["The email field is required."]
  }
}

HTTP status codes

StatusMeaning
200Success
201Resource created
400Bad request — missing or invalid parameters
401Unauthenticated — missing or invalid token
403Forbidden — valid token but insufficient permissions
404Resource not found
422Validation error — request data failed validation
429Rate limited
500Server error

Validation errors

When validation fails, the response includes a field-level errors object:
{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "email": ["The email field must be a valid email address."],
    "password": ["The password must be at least 8 characters."]
  }
}

Error codes

Some endpoints return a machine-readable error_code for programmatic handling:
CodeMeaning
INVALID_CREDENTIALSEmail or password is incorrect
ACCOUNT_BLOCKEDAccount has been suspended
INVALID_TOKENJWT or reset token is invalid or expired
VALIDATION_ERRORRequest data failed validation
INVITATION_NOT_FOUNDInvitation token does not exist
INTERNAL_SERVER_ERRORUnexpected server error