{"_id":"5845a4a89f6fbb1b004307d1","project":"54d3007669578e0d002730c9","__v":0,"user":"55bf6cdcad601c2b00762d13","category":{"_id":"5845a4a89f6fbb1b004307ba","__v":0,"version":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-30T06:53:33.020Z","from_sync":false,"order":2,"slug":"api-reference","title":"API reference"},"parentDoc":null,"version":{"_id":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","__v":2,"createdAt":"2016-12-05T17:32:24.708Z","releaseDate":"2016-12-05T17:32:24.708Z","categories":["5845a4a89f6fbb1b004307b8","5845a4a89f6fbb1b004307b9","5845a4a89f6fbb1b004307ba","5845a4a89f6fbb1b004307bb","5845a4a89f6fbb1b004307bc","5845a4a89f6fbb1b004307bd","5845a4a89f6fbb1b004307be","5845a4a89f6fbb1b004307bf","5845a4a89f6fbb1b004307c0","592deb23644f060f008e5aa6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"25.0.0","version":"25"},"updates":["57b127ed4c0c6f0e0000787f"],"next":{"pages":[],"description":""},"createdAt":"2015-08-03T22:37:43.682Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":10,"body":"The **status** object is returned with every request and indicates if the request was successful. If it is not successful, error information is included. See <a href=\"https://docs.api.ai/docs/status-and-error-codes\" target=\"_blank\">Status and Error Codes</a> for more information on the returned errors.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Elements\"\n}\n[/block]\nThe following elements are in the **status** object:\n[block:html]\n{\n  \"html\": \"<div></div>\\n<table>\\n<tr>\\n  <th colspan=\\\"2\\\">Name</th>\\n  <th>Type</th> \\n  <th>Description</th>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">status</td>\\n  <td></td> \\n  <td>Contains data on how the request succeeded or failed.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td>code</td>\\n  <td>Integer</td> \\n  <td>HTTP status code</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td>errorType</td>\\n  <td>String</td> \\n  <td>Text description of error, or \\\"success\\\" if no error.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td>errorId</td>\\n  <td>String</td> \\n  <td>ID of the error. Optionally returned if the request failed.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td>errorDetails</td>\\n  <td>String</td> \\n  <td>Text details of the error. Only returned if the request failed.</td>\\n</tr>\\n</table>\\n<style></style>\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example Successful Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": {\\n    \\\"code\\\": 200,\\n    \\\"errorType\\\": \\\"success\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example Unsuccessful Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": {\\n    \\\"code\\\": 400,\\n    \\\"errorType\\\": \\\"bad_request\\\",\\n    \\\"errorDetails\\\": \\\"Json request query property is missing\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"status-object","type":"basic","title":"Status Object"}
The **status** object is returned with every request and indicates if the request was successful. If it is not successful, error information is included. See <a href="https://docs.api.ai/docs/status-and-error-codes" target="_blank">Status and Error Codes</a> for more information on the returned errors. [block:api-header] { "type": "basic", "title": "Elements" } [/block] The following elements are in the **status** object: [block:html] { "html": "<div></div>\n<table>\n<tr>\n <th colspan=\"2\">Name</th>\n <th>Type</th> \n <th>Description</th>\n</tr>\n<tr>\n <td colspan=\"2\">status</td>\n <td></td> \n <td>Contains data on how the request succeeded or failed.</td>\n</tr>\n<tr>\n <td></td>\n <td>code</td>\n <td>Integer</td> \n <td>HTTP status code</td>\n</tr>\n<tr>\n <td></td>\n <td>errorType</td>\n <td>String</td> \n <td>Text description of error, or \"success\" if no error.</td>\n</tr>\n<tr>\n <td></td>\n <td>errorId</td>\n <td>String</td> \n <td>ID of the error. Optionally returned if the request failed.</td>\n</tr>\n<tr>\n <td></td>\n <td>errorDetails</td>\n <td>String</td> \n <td>Text details of the error. Only returned if the request failed.</td>\n</tr>\n</table>\n<style></style>" } [/block] [block:api-header] { "type": "basic", "title": "Example Successful Response" } [/block] [block:code] { "codes": [ { "code": "{\n \"status\": {\n \"code\": 200,\n \"errorType\": \"success\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Example Unsuccessful Response" } [/block] [block:code] { "codes": [ { "code": "{\n \"status\": {\n \"code\": 400,\n \"errorType\": \"bad_request\",\n \"errorDetails\": \"Json request query property is missing\"\n }\n}", "language": "json" } ] } [/block]