Error Codes

The MoneyLine API uses conventional HTTP status codes to indicate the outcome of a request. All errors return a consistent JSON format so you can handle them predictably in your application.

Error Response Format

Every error response includes a success flag set to false along with an error object containing the HTTP status, a machine-readable code, and a human-readable message. Some errors also include an optional recovery hint:

Error structure
{
  "success": false,
  "data": null,
  "meta": {
    "requestId": "ml_req_ab12cd34ef56"
  },
  "error": {
    "message": "Descriptive error message here.",
    "statusCode": 400,
    "code": "ERR_VALIDATION",
    "hint": "Review the endpoint parameters in the API reference."
  }
}

Branch on error.code rather than parsing message text. Preserve meta.requestId in logs and include it when contacting support. Treat error.hint as optional because older or endpoint-specific errors may omit it.

HTTP Status Codes

Below is a complete list of error codes the API may return:

CodeStatusDescription
400Bad RequestInvalid query parameters or missing required fields
401UnauthorizedMissing or invalid API key
403ForbiddenThe request is authenticated but blocked from a private or admin-only resource
404Not FoundThe requested resource does not exist
429Too Many RequestsPer-minute rate limit exceeded or monthly credits exhausted with auto-upgrade disabled
500Internal Server ErrorSomething went wrong on our end