{"_id":"56ad2053d21f1b0d00fd2f82","user":"5582e90181672a3900bb4fc7","category":{"_id":"56abdd81d4432d1900eed235","__v":6,"version":"569f9cf6650e1d1900f96b5e","pages":["56abddd30b9e0b0d006162b1","56abde024e4b730d009eb11a","56abe05f678b58170031ec46","56ad2053d21f1b0d00fd2f82","56ad2a922a7860170013f70d","56ad2b663fc1020d009776da"],"project":"569f9cf6650e1d1900f96b5b","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-29T21:45:37.383Z","from_sync":false,"order":2,"slug":"introduction","title":"Introduction"},"githubsync":"","version":{"_id":"569f9cf6650e1d1900f96b5e","project":"569f9cf6650e1d1900f96b5b","__v":12,"createdAt":"2016-01-20T14:43:02.785Z","releaseDate":"2016-01-20T14:43:02.785Z","categories":["569f9cf7650e1d1900f96b5f","56abdd81d4432d1900eed235","56abe0558beeff0d003b8118","56ad2f8b1c09150d00a183a8","56ad4e1cd21f1b0d00fd2f97","56b00ad88f7a4f0d0029dc92","56b2432e9621f20d00efb2bd","56b25826147e900d00d6497a","56b7af2a4b372d2100722c48","56b8c4d938b1070d0028920f","56b8cdab14feef0d0082415d","58599813cf9e112d0032cdab"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":13,"project":"569f9cf6650e1d1900f96b5b","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-30T20:42:59.846Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"## HTTP errors \n\nIf you send a request to a valid URI, and the request contains properly formatted JSON, you should always receive a response with the status 200 (OK) and a JSON formatted response. The OMA requests always result in one of the following response codes:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Error code\",\n    \"0-0\": \"200\",\n    \"1-0\": \"400\",\n    \"2-0\": \"404\",\n    \"3-0\": \"500\",\n    \"0-1\": \"OK, the response to the request follows in the response body.\",\n    \"1-1\": \"Bad Request. The request contained badly formatted JSON or was otherwise badly formatted.\",\n    \"2-1\": \"Not Found. Non-existent method requested.\",\n    \"3-1\": \"Internal Server Error. Something went terribly wrong and it's not the user's fault.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n## API errors \n\nFor methods that deal with multiple objects, for example **restore_deleted_messages**, the response contains an array of objects, and each object has its own success and potentially **error** and **error_number** fields. In that case, you may see one of the following error response codes:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Error code\",\n    \"h-1\": \"Error text\",\n    \"h-2\": \"Meaning\",\n    \"0-0\": \"0\",\n    \"0-1\": \"Server error.\",\n    \"0-2\": \"Returned when something goes wrong and it is not the client's fault.\",\n    \"1-0\": \"1\",\n    \"1-1\": \"Invalid credentials supplied in request.\",\n    \"1-2\": \"Returned when the user name or password is not valid.\",\n    \"2-0\": \"2\",\n    \"2-1\": \"The requested object does not exist.\",\n    \"2-2\": \"Returned when the object (user, domain, brand, etc) being queried, changed or deleted does not exist.\",\n    \"3-0\": \"3\",\n    \"3-1\": \"This object is an alias.\",\n    \"3-2\": \"Returned when the name of an object to be changed in a request is an alias or an object. Objects can only be changed via their real name.\",\n    \"4-0\": \"4\",\n    \"4-1\": \"Requestor lacks permission to change one or more of the requested attributes.\",\n    \"4-2\": \"Returned when the request specifies a change to an attribute that the user does not have permission to change.\",\n    \"5-0\": \"5\",\n    \"5-1\": \"Request badly formatted (missing required field, or field is not the correct data type).\",\n    \"5-2\": \"Returned when the request is not properly formatted.\",\n    \"6-0\": \"6\",\n    \"6-1\": \"One or more attributes badly formatted.\",\n    \"6-2\": \"Returned when the request to change an object contains an unrecognized attribute or an attribute value that is not well formatted. For example, the value of the key filter might not be a valid number.\",\n    \"7-0\": \"7\",\n    \"7-1\": \"An object with this name already exists.\",\n    \"7-2\": \"Returned when the request to create an object names an object that already exists.\",\n    \"8-0\": \"8\",\n    \"8-1\": \"An object with this name already exists.\",\n    \"8-2\": \"Returned when the request to create an object names an object that already exists.\",\n    \"9-1\": \"Requestor does not own this object or lacks permission to perform this action.\",\n    \"9-0\": \"9\",\n    \"9-2\": \"Returned when the user lacks permission to perform the requested action.\",\n    \"10-0\": \"10\",\n    \"10-1\": \"The requested object is not empty.\",\n    \"10-2\": \"Returned when the request asks to delete an object, but the object is not empty (for example to delete a domain but the domain contains users).\",\n    \"11-0\": \"11\",\n    \"11-1\": \"Company does not exist.\",\n    \"11-2\": \"Returned with the company containing an object to be changed (domain, brand) does not exist.\",\n    \"12-0\": \"12\",\n    \"12-1\": \"Role does not exist\",\n    \"12-2\": \"Returned when attempting to add a non-existent role to a user.\",\n    \"13-0\": \"13\",\n    \"13-1\": \"User does not exist\",\n    \"13-2\": \"Returned when attempting to do something with a user (post a bulletin to a test user) and that user does not exist.\",\n    \"14-0\": \"14\",\n    \"14-1\": \"Brand in use\",\n    \"14-2\": \"Returned when attempting to delete a brand, and that brand is assigned to a user, domain or company.\",\n    \"15-0\": \"15\",\n    \"15-1\": \"Domain users full\",\n    \"15-2\": \"Returned when attempting to create a user, and the user's domain is at its user limit.\",\n    \"16-0\": \"16\",\n    \"16-1\": \"Domain aliases full\",\n    \"16-2\": \"Returned when attempting to create an alias to a user and the domain is at its alias limit.\",\n    \"17-1\": \"Not in\",\n    \"17-2\": \"Returned when an operation requires a user to be an member of something and the user is not.\",\n    \"17-0\": \"17\",\n    \"18-0\": \"18\",\n    \"18-1\": \"Workgroup is default\",\n    \"18-2\": \"Returned when attempting to delete a workgroup that is the domain's default workgroup.\",\n    \"19-0\": \"19\",\n    \"19-1\": \"Migration Job Exists\",\n    \"19-2\": \"Returned when attempting to create a new migration job, and a migration job with the given ID already exists.\",\n    \"20-0\": \"20\",\n    \"20-1\": \"Try again later\",\n    \"20-2\": \"A transient system error occurred. Not the caller's fault. Method should be retried.\",\n    \"21-0\": \"21\",\n    \"21-1\": \"Requestor not permitted from this IP address\",\n    \"21-2\": \"IP restrictions have been set for this admin user and the source IP does not match them.\",\n    \"22-0\": \"22\",\n    \"22-1\": \"Requested object temporarily unavailable, try again later\",\n    \"22-2\": \"Temporary error, please retry in a few minutes.\",\n    \"23-0\": \"23\",\n    \"23-1\": \"Object already exists\",\n    \"23-2\": \"If object already exists and create_only attribute was passed in the request.\",\n    \"24-0\": \"24\",\n    \"24-1\": \"Admins exist that control this object\",\n    \"24-2\": \"\",\n    \"25-0\": \"25\",\n    \"25-1\": \"Failed to obtain provisioning lock\",\n    \"25-2\": \"Temporary error, please retry in a few minutes.\",\n    \"26-0\": \"26\",\n    \"26-1\": \"The requested folder does not exist\",\n    \"27-1\": \"The domain is missing the filtermx setting\",\n    \"27-0\": \"27\",\n    \"28-0\": \"28\",\n    \"28-1\": \"An internal error occurred\",\n    \"29-0\": \"29\",\n    \"29-1\": \"An internal error occurred - failed to connect\",\n    \"30-1\": \"An internal error occurred - failed to send\",\n    \"30-0\": \"30\",\n    \"28-2\": \"If error persists, please contact OpenSRS support\",\n    \"29-2\": \"If error persists, please contact OpenSRS support\",\n    \"30-2\": \"If error persists, please contact OpenSRS support\",\n    \"31-0\": \"31\",\n    \"31-1\": \"User was not type filter\",\n    \"31-2\": \"\",\n    \"32-0\": \"32\",\n    \"32-1\": \"Admin is disabled\",\n    \"33-1\": \"2FA is required\",\n    \"33-0\": \"33\",\n    \"33-2\": \"Returned when second stage Two-Factor Authentication credentials are required\",\n    \"34-0\": \"34\",\n    \"34-1\": \"password must be at least 10 characters\",\n    \"34-2\": \"Returned when using reseller_id credentials during 2FA signup if password is not deemed secure enough\",\n    \"35-0\": \"35\",\n    \"35-1\": \"2fa code validation failure\",\n    \"35-2\": \"Returned when second stage 2FA credentials are incorrect\",\n    \"36-0\": \"36\",\n    \"36-1\": \"password cannot be one of the previous 8 used\",\n    \"36-2\": \"Returned when using reseller_id credentials during 2FA signup and new password was previously used\",\n    \"37-0\": \"37\",\n    \"37-1\": \"Alias domain does not exist\",\n    \"38-0\": \"38\",\n    \"38-1\": \"maximum number of forward recipients reached\",\n    \"38-2\": \"Returned when trying to set more forward recipients than allowed on an account.\",\n    \"39-0\": \"39\",\n    \"39-1\": \"expired\",\n    \"40-0\": \"40\",\n    \"40-1\": \"Password not strong enough\",\n    \"40-2\": \"Returned when a user's password fails the password strength check (see change_user)\",\n    \"41-0\": \"41\",\n    \"41-1\": \"Password on the ban list\",\n    \"41-2\": \"Returned when a user's password fails the password banned check\",\n    \"42-0\": \"42\",\n    \"42-1\": \"2FA is required, not enabled on this account\",\n    \"42-2\": \"Returned during authentication when 2FA is forced for user, user has not enabled it, and user is out of grace logins.\",\n    \"43-1\": \"2FA challenge failed\",\n    \"43-0\": \"43\",\n    \"43-2\": \"Returned when second stage 2FA credentials are incorrect\",\n    \"44-0\": \"44\",\n    \"44-1\": \"2FA Auth required to change 2fa_required_oma\",\n    \"44-2\": \"Attribute can only be changed when user authenticated with 2FA\",\n    \"45-0\": \"45\",\n    \"45-1\": \"Brand settings prevent this action\",\n    \"46-0\": \"46\",\n    \"46-1\": \"Max number of App Passwords has been reached\",\n    \"46-2\": \"Target user has reached maximum (4) number of App Passwords.\",\n    \"47-0\": \"47\",\n    \"47-1\": \"Target is a domain alias\",\n    \"47-2\": \"Cannot rename a user into a domain alias; can only rename the user into the true domain name.\",\n    \"48-0\": \"48\",\n    \"48-1\": \"Password rejected - contains username or other account info\",\n    \"48-2\": \"Returned when a user's password fails the password contains check\",\n    \"49-0\": \"49\",\n    \"49-1\": \"Push denied. Gaining company has not pre-authorized\",\n    \"49-2\": \"Attempted to push a domain to a company that has not authorized this company to push domains to it.\"\n  },\n  \"cols\": 3,\n  \"rows\": 50\n}\n[/block]","excerpt":"","slug":"errors","type":"basic","title":"Errors"}
## HTTP errors If you send a request to a valid URI, and the request contains properly formatted JSON, you should always receive a response with the status 200 (OK) and a JSON formatted response. The OMA requests always result in one of the following response codes: [block:parameters] { "data": { "h-0": "Error code", "0-0": "200", "1-0": "400", "2-0": "404", "3-0": "500", "0-1": "OK, the response to the request follows in the response body.", "1-1": "Bad Request. The request contained badly formatted JSON or was otherwise badly formatted.", "2-1": "Not Found. Non-existent method requested.", "3-1": "Internal Server Error. Something went terribly wrong and it's not the user's fault." }, "cols": 2, "rows": 4 } [/block] ## API errors For methods that deal with multiple objects, for example **restore_deleted_messages**, the response contains an array of objects, and each object has its own success and potentially **error** and **error_number** fields. In that case, you may see one of the following error response codes: [block:parameters] { "data": { "h-0": "Error code", "h-1": "Error text", "h-2": "Meaning", "0-0": "0", "0-1": "Server error.", "0-2": "Returned when something goes wrong and it is not the client's fault.", "1-0": "1", "1-1": "Invalid credentials supplied in request.", "1-2": "Returned when the user name or password is not valid.", "2-0": "2", "2-1": "The requested object does not exist.", "2-2": "Returned when the object (user, domain, brand, etc) being queried, changed or deleted does not exist.", "3-0": "3", "3-1": "This object is an alias.", "3-2": "Returned when the name of an object to be changed in a request is an alias or an object. Objects can only be changed via their real name.", "4-0": "4", "4-1": "Requestor lacks permission to change one or more of the requested attributes.", "4-2": "Returned when the request specifies a change to an attribute that the user does not have permission to change.", "5-0": "5", "5-1": "Request badly formatted (missing required field, or field is not the correct data type).", "5-2": "Returned when the request is not properly formatted.", "6-0": "6", "6-1": "One or more attributes badly formatted.", "6-2": "Returned when the request to change an object contains an unrecognized attribute or an attribute value that is not well formatted. For example, the value of the key filter might not be a valid number.", "7-0": "7", "7-1": "An object with this name already exists.", "7-2": "Returned when the request to create an object names an object that already exists.", "8-0": "8", "8-1": "An object with this name already exists.", "8-2": "Returned when the request to create an object names an object that already exists.", "9-1": "Requestor does not own this object or lacks permission to perform this action.", "9-0": "9", "9-2": "Returned when the user lacks permission to perform the requested action.", "10-0": "10", "10-1": "The requested object is not empty.", "10-2": "Returned when the request asks to delete an object, but the object is not empty (for example to delete a domain but the domain contains users).", "11-0": "11", "11-1": "Company does not exist.", "11-2": "Returned with the company containing an object to be changed (domain, brand) does not exist.", "12-0": "12", "12-1": "Role does not exist", "12-2": "Returned when attempting to add a non-existent role to a user.", "13-0": "13", "13-1": "User does not exist", "13-2": "Returned when attempting to do something with a user (post a bulletin to a test user) and that user does not exist.", "14-0": "14", "14-1": "Brand in use", "14-2": "Returned when attempting to delete a brand, and that brand is assigned to a user, domain or company.", "15-0": "15", "15-1": "Domain users full", "15-2": "Returned when attempting to create a user, and the user's domain is at its user limit.", "16-0": "16", "16-1": "Domain aliases full", "16-2": "Returned when attempting to create an alias to a user and the domain is at its alias limit.", "17-1": "Not in", "17-2": "Returned when an operation requires a user to be an member of something and the user is not.", "17-0": "17", "18-0": "18", "18-1": "Workgroup is default", "18-2": "Returned when attempting to delete a workgroup that is the domain's default workgroup.", "19-0": "19", "19-1": "Migration Job Exists", "19-2": "Returned when attempting to create a new migration job, and a migration job with the given ID already exists.", "20-0": "20", "20-1": "Try again later", "20-2": "A transient system error occurred. Not the caller's fault. Method should be retried.", "21-0": "21", "21-1": "Requestor not permitted from this IP address", "21-2": "IP restrictions have been set for this admin user and the source IP does not match them.", "22-0": "22", "22-1": "Requested object temporarily unavailable, try again later", "22-2": "Temporary error, please retry in a few minutes.", "23-0": "23", "23-1": "Object already exists", "23-2": "If object already exists and create_only attribute was passed in the request.", "24-0": "24", "24-1": "Admins exist that control this object", "24-2": "", "25-0": "25", "25-1": "Failed to obtain provisioning lock", "25-2": "Temporary error, please retry in a few minutes.", "26-0": "26", "26-1": "The requested folder does not exist", "27-1": "The domain is missing the filtermx setting", "27-0": "27", "28-0": "28", "28-1": "An internal error occurred", "29-0": "29", "29-1": "An internal error occurred - failed to connect", "30-1": "An internal error occurred - failed to send", "30-0": "30", "28-2": "If error persists, please contact OpenSRS support", "29-2": "If error persists, please contact OpenSRS support", "30-2": "If error persists, please contact OpenSRS support", "31-0": "31", "31-1": "User was not type filter", "31-2": "", "32-0": "32", "32-1": "Admin is disabled", "33-1": "2FA is required", "33-0": "33", "33-2": "Returned when second stage Two-Factor Authentication credentials are required", "34-0": "34", "34-1": "password must be at least 10 characters", "34-2": "Returned when using reseller_id credentials during 2FA signup if password is not deemed secure enough", "35-0": "35", "35-1": "2fa code validation failure", "35-2": "Returned when second stage 2FA credentials are incorrect", "36-0": "36", "36-1": "password cannot be one of the previous 8 used", "36-2": "Returned when using reseller_id credentials during 2FA signup and new password was previously used", "37-0": "37", "37-1": "Alias domain does not exist", "38-0": "38", "38-1": "maximum number of forward recipients reached", "38-2": "Returned when trying to set more forward recipients than allowed on an account.", "39-0": "39", "39-1": "expired", "40-0": "40", "40-1": "Password not strong enough", "40-2": "Returned when a user's password fails the password strength check (see change_user)", "41-0": "41", "41-1": "Password on the ban list", "41-2": "Returned when a user's password fails the password banned check", "42-0": "42", "42-1": "2FA is required, not enabled on this account", "42-2": "Returned during authentication when 2FA is forced for user, user has not enabled it, and user is out of grace logins.", "43-1": "2FA challenge failed", "43-0": "43", "43-2": "Returned when second stage 2FA credentials are incorrect", "44-0": "44", "44-1": "2FA Auth required to change 2fa_required_oma", "44-2": "Attribute can only be changed when user authenticated with 2FA", "45-0": "45", "45-1": "Brand settings prevent this action", "46-0": "46", "46-1": "Max number of App Passwords has been reached", "46-2": "Target user has reached maximum (4) number of App Passwords.", "47-0": "47", "47-1": "Target is a domain alias", "47-2": "Cannot rename a user into a domain alias; can only rename the user into the true domain name.", "48-0": "48", "48-1": "Password rejected - contains username or other account info", "48-2": "Returned when a user's password fails the password contains check", "49-0": "49", "49-1": "Push denied. Gaining company has not pre-authorized", "49-2": "Attempted to push a domain to a company that has not authorized this company to push domains to it." }, "cols": 3, "rows": 50 } [/block]