Skip to content
Last updated

API Response Codes

This section outlines the standard response codes returned by our API. These codes provide information about what went wrong with a request and help developers diagnose and resolve issues effectively. Each code is accompanied by a human-readable message to assist in understanding the context of the error.

In every API response, you’ll find a meta object that contains the code and message fields. The code is a machine-readable identifier representing the result of the request, while the message provides a human-readable explanation of the code when applicable. A successful response typically includes a code of 1000 and a message of null. For error responses, the code corresponds to one of the values listed below, and the message will contain a descriptive explanation to help guide error handling.

HTTP status and internal response codes

All AdFlex API responses return the fixed HTTP status 200 OK, including application-level errors. Clients must inspect the internal code field in the response body to determine the actual result.

HTTP StatusInternal CodeMeaningMessage
200 OK1000SUCCESSnull
200 OK1001SOMETHING WENT WRONGSomething went wrong. Please try again later.
200 OK1002BAD REQUESTBad Request
200 OK1003NOT FOUNDRoute not found.
200 OK1004UNAUTHORIZEDUnAuthorized
200 OK1005FORBIDDENForbidden
200 OK1006SERVICE UNAVAILABLEMaintenance mode
200 OK1007UNPROCESSABLE ENTITYThe given data is invalid.
200 OK1009INTERNAL SERVER ERRORServer Error
200 OK1401REACH LIMIT CREDITYou reached credit limit.

Note: The HTTP status is always 200 OK and does not represent the application result. Always use the response-body code field for success and error handling.