Skip to main content
When an AntifraudAI API request cannot be completed successfully, the response body will always contain a structured JSON error object. Every error response includes an error.code (a machine-readable string), an error.message (a human-readable explanation), and an optional error.details object with additional context specific to that error type.
Use error.code in your application logic — it is stable across API versions. error.message is intended for logging and debugging and may change over time.

HTTP Status Codes

Error Code Reference

Handling Errors in Code

The examples below show a robust error-handling pattern that inspects error.code and takes action accordingly.
Always log the full error response body — including error.code, error.message, and error.details — in your integration. The details field often contains field-level validation information (e.g., which specific field failed and why) that makes debugging significantly faster.