{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"API Response Codes"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"api-response-codes","__idx":0},"children":["API Response Codes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In every API response, you’ll find a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["meta"]}," object that contains the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}," fields. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," is a machine-readable identifier representing the result of the request, while the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}," provides a human-readable explanation of the code when applicable. A successful response typically includes a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1000"]}," and a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},". For error responses, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," corresponds to one of the values listed below, and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}," will contain a descriptive explanation to help guide error handling."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"http-status-and-internal-response-codes","__idx":1},"children":["HTTP status and internal response codes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All AdFlex API responses return the fixed HTTP status ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]},", including application-level errors. Clients must inspect the internal ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," field in the response body to determine the actual result."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"HTTP Status"},"children":["HTTP Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Internal Code"},"children":["Internal Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Message"},"children":["Message"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1000"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SUCCESS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1001"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SOMETHING WENT WRONG"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Something went wrong. Please try again later."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1002"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BAD REQUEST"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bad Request"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1003"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NOT FOUND"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Route not found."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1004"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UNAUTHORIZED"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UnAuthorized"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1005"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FORBIDDEN"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Forbidden"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1006"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SERVICE UNAVAILABLE"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maintenance mode"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1007"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UNPROCESSABLE ENTITY"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The given data is invalid."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1009"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["INTERNAL SERVER ERROR"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Server Error"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 OK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1401"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["REACH LIMIT CREDIT"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["You reached credit limit."]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," The HTTP status is always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}," and does not represent the application result. Always use the response-body ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," field for success and error handling."]}]}]},"headings":[{"value":"API Response Codes","id":"api-response-codes","depth":1},{"value":"HTTP status and internal response codes","id":"http-status-and-internal-response-codes","depth":2}],"frontmatter":{"seo":{"title":"API Response Codes"}},"lastModified":"2026-08-19T15:12:20.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/response_codes","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}