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:
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Invalid query parameters or missing required fields |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | The request is authenticated but blocked from a private or admin-only resource |
| 404 | Not Found | The requested resource does not exist |
| 429 | Too Many Requests | Per-minute rate limit exceeded or monthly credits exhausted with auto-upgrade disabled |
| 500 | Internal Server Error | Something went wrong on our end |