{"__v":4,"_id":"5845a4a89f6fbb1b004307cf","category":{"version":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","_id":"5845a4a89f6fbb1b004307ba","__v":0,"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,"project":"54d3007669578e0d002730c9","user":"55bf6cdcad601c2b00762d13","version":{"__v":1,"_id":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","createdAt":"2016-12-05T17:32:24.708Z","releaseDate":"2016-12-05T17:32:24.708Z","categories":["5845a4a89f6fbb1b004307b8","5845a4a89f6fbb1b004307b9","5845a4a89f6fbb1b004307ba","5845a4a89f6fbb1b004307bb","5845a4a89f6fbb1b004307bc","5845a4a89f6fbb1b004307bd","5845a4a89f6fbb1b004307be","5845a4a89f6fbb1b004307bf","5845a4a89f6fbb1b004307c0"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"25.0.0","version":"25"},"updates":["57e39e676865da170085a3b5","5862b9071d8b6e19002fd511","5862b90902f1412500300175","58c46a3b5b01961900c2bcdd","58fd658a35c59f0f0028dedf"],"next":{"pages":[],"description":""},"createdAt":"2015-08-03T22:37:12.830Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"* [Overview](#overview)\n* [URLs and Objects](#urls-and-objects)\n* [GET /intents](#get-intents)\n* [GET /intents/{iid}](#get-intentsiid)\n* [POST /intents](#post-intents)\n* [PUT /intents/{iid}](#put-intentsiid)\n* [DELETE /intents/{iid}](#delete-intentsiid)\n* [Intent Object](#intent-object)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Overview\"\n}\n[/block]\nThe **intents** endpoint is used to create, retrieve, update, and delete intent objects.\n\nIntents convert a number of user expressions or patterns into an action. An action is essentially an extraction of the user command or sentence semantics.\n\nSee <a href=\"https://docs.api.ai/docs/concept-intents\" target=\"_blank\">Intents Overview</a> for detailed information on intents.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"URLs and Objects\"\n}\n[/block]\nThe following URLs are available:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"URL\",\n    \"h-1\": \"Definition\",\n    \"0-0\": \"[GET /intents](intents#get-intents)\",\n    \"0-1\": \"Retrieves a list of all intents for the agent.\",\n    \"1-0\": \"[GET /intents/{iid}](intents#get-intentsiid)\",\n    \"2-0\": \"[POST /intents](intents#post-intents)\",\n    \"3-0\": \"[PUT /intents/{iid}](intents#put-intentsiid)\",\n    \"4-0\": \"[DELETE /intents/{iid}](intents#delete-intentsiid)\",\n    \"1-1\": \"Retrieves the specified intent.\",\n    \"2-1\": \"Creates a new intent.\",\n    \"3-1\": \"Updates the specified intent.\",\n    \"4-1\": \"Deletes the specified intent.\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\nThe [intent object](intents#intent-object) contains information on which action to return, based on contexts and parameters. \n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"GET /intents\"\n}\n[/block]\nRetrieves a list of all intents for the agent. \n\n### GET /intents Sample Request\n\nThe following request returns all intents for the agent that is associated with the access token.\n\n    GET https://api.api.ai/v1/intents?v=20150910\n\t\n\tHeaders:\n\tAuthorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\n\t\n### GET /intents Sample cURL Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k -H \\\"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\\\" \\\"https://api.api.ai/v1/intents?v=20150910\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n### GET /intents Response\n\nThe response will be a JSON object that is an array of objects with the following fields:\n[block:html]\n{\n  \"html\": \"<table>\\n<tr>\\n  <th colspan=\\\"2\\\">Name</th>\\n  <th>Type</th> \\n  <th>Description</th>\\n</tr>\\n  <td colspan=\\\"2\\\">id</td>\\n  <td>String</td> \\n  <td>ID of the intent.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">name</td>\\n  <td>String</td> \\n  <td>Name of the intent.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">contextIn</td>\\n  <td>Array of legal names</td> \\n  <td>List of input contexts. These contexts serve as a prerequisite for this intent to be triggered.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">contextOut</td>\\n  <td>Array of legal names</td> \\n  <td>List of output contexts that are set after this intent is executed.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"1\\\">name</td>\\n  <td>String</td> \\n  <td>The name of the output context.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"1\\\">lifespan</td>\\n  <td>Number</td> \\n  <td>The number of queries this context will remain active after being invoked.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">actions</td>\\n  <td>Array of strings</td> \\n  <td>List of actions set by all responses of this intent.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">parameters</td>\\n  <td>Array of objects</td> \\n  <td>List of parameters for the action.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"1\\\">name</td>\\n  <td>Legal name</td> \\n  <td>The name of the parameter.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"1\\\">value</td>\\n  <td>String</td> \\n  <td>The value of the parameter.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"1\\\">defaultValue</td>\\n  <td>String</td> \\n  <td>The default value of the parameter that should be returned when the \\\"value\\\" field returns an empty value.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"1\\\">required</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> if the action cannot be completed without collecting this parameter value. <code>false</code> otherwise.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"1\\\">dataType</td>\\n  <td>String</td> \\n  <td>Entity name prefixed with <code>:::at:::</code>. This field is mandatory if the parameter is required.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"1\\\">prompts</td>\\n  <td>Array of strings</td> \\n  <td>Questions that the agent will ask in order to collect a value for a required parameter.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">priority</td>\\n  <td>Number</td> \\n  <td>Intent priority.</td>\\n</tr>\\n<tr>\\n<tr>\\n  <td colspan=\\\"2\\\">fallbackIntent</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> if this is a <a href=\\\"https://docs.api.ai/docs/concept-intents#fallback-intent\\\" target=\\\"_blank\\\">fallback intent</a>. <code>false</code> if it is a regular intent.</td>\\n</tr>\\n<tr>\\n</table>\"\n}\n[/block]\n### GET /intents Sample Response\n\nThis example shows the JSON response to a GET /intents request. It represents an array of two intent objects corresponding to the intents titled \"hobby\" and \"greetings\".\n\n    [\n       {\n          \"id\": \"8ce9a60f-4a1e-468c-9718-5030de11eb91\",\n          \"name\": \"hobby\",\n          \"contextIn\": [\n             \"hobby\"\n          ],\n          \"parameters\": [\n             {\n                \"dataType\": \"@hobby\",\n                \"name\": \"hobby\",\n                \"value\": \"$hobby\"\n             }\n          ],\n          \"contextOut\": [\n             {\n                \"name\": \"hobby\",\n                \"lifespan\": 0\n             }\n          ],\n          \"actions\": [\n             \"hobby\"\n          ],\n          \"priority\": 500000,\n          \"fallbackIntent\": false\n       },\n       {\n          \"id\": \"c261cb5f-4b31-4390-af4a-1e58620d462c\",\n          \"name\": \"greetings\",\n          \"contextIn\": [\n             \"greetings\"\n          ],\n          \"parameters\": [\n             {\n                \"required\": true,\n                \"dataType\": \"@sys.given-name\",\n                \"name\": \"name\",\n                \"value\": \"$name\",\n                \"prompts\": [\n                   \"Hi! What is your name?\"\n                ]\n             },\n             {\n                \"dataType\": \"@sys.number\",\n                \"name\": \"age\",\n                \"value\": \"$age\",\n                \"prompts\": [],\n                \"defaultValue\": \"unknown\"\n             }\n          ],\n          \"contextOut\": [\n             {\n                \"name\": \"greetings\",\n                \"lifespan\": 10\n             },\n             {\n                \"name\": \"hobby\",\n                \"lifespan\": 5\n             }\n          ],\n          \"actions\": [\n             \"greetings\"\n          ],\n          \"priority\": 500000,\n          \"fallbackIntent\": false\n       }\n    ]\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"GET /intents/{iid}\"\n}\n[/block]\nRetrieves the specified intent.\n\n`{iid}` is the ID of the intent to retrieve.\n\n### GET /intents/{iid}  Sample Request\n\nThe following request returns the intent with ID of 33868522-5747-4a31-88fb-3cd13bd18684.\n\n    GET https://api.api.ai/v1/intents/1502edd3-e0be-4a4b-97f1-950550fbfcc3?v=20150910\n\t\n\tHeaders:\n\tAuthorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\n\t\n### GET /intents/{iid} Sample cURL Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k -H \\\"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\\\" \\\"https://api.api.ai/v1/intents/1502edd3-e0be-4a4b-97f1-950550fbfcc3?v=20150910\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n### GET /intents/{iid} Response\n\nThe response is an [intent object](intents#intent-object).\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"POST /intents\"\n}\n[/block]\nCreates a new intent.\n\n### POST /intents Request\n\nThe POST body is an [intent object](intents#intent-object) without the `\"id\"` element.\n\n### POST /intents Sample Request\n\nThe following request creates an intent for setting the state of an appliance using the entities `@appliance` and `@state`.\n\n    POST https://api.api.ai/v1/intents?v=20150910\n\t\n\tHeaders:\n\tAuthorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\n\tContent-Type: application/json; charset=utf-8\n\n\tPOST body:\n    {\n       \"name\": \"change appliance state\",\n       \"auto\": true,\n       \"contexts\": [],\n       \"templates\": [\n          \"turn @state:state the @appliance:appliance \",\n          \"switch the @appliance:appliance @state:state \"\n       ],\n       \"userSays\": [\n          {\n             \"data\": [\n                {\n                   \"text\": \"turn \"\n                },\n                {\n                   \"text\": \"on\",\n                   \"alias\": \"state\",\n                   \"meta\": \"@state\"\n                },\n                {\n                   \"text\": \" the \"\n                },\n                {\n                   \"text\": \"kitchen lights\",\n                   \"alias\": \"appliance\",\n                   \"meta\": \"@appliance\"\n                }\n             ],\n             \"isTemplate\": false,\n             \"count\": 0\n          },\n          {\n             \"data\": [\n                {\n                   \"text\": \"switch the \"\n                },\n                {\n                   \"text\": \"heating\",\n                   \"alias\": \"appliance\",\n                   \"meta\": \"@appliance\"\n                },\n                {\n                   \"text\": \" \"\n                },\n                {\n                   \"text\": \"off\",\n                   \"alias\": \"state\",\n                   \"meta\": \"@state\"\n                }\n             ],\n             \"isTemplate\": false,\n             \"count\": 0\n          }\n       ],\n       \"responses\": [\n          {\n             \"resetContexts\": false,\n             \"action\": \"set-appliance\",\n             \"affectedContexts\": [\n                {\n                   \"name\": \"house\",\n                   \"lifespan\": 10\n                }\n             ],\n             \"parameters\": [\n                {\n                   \"dataType\": \"@appliance\",\n                   \"name\": \"appliance\",\n                   \"value\": \"\\$appliance\"\n                },\n                {\n                   \"dataType\": \"@state\",\n                   \"name\": \"state\",\n                   \"value\": \"\\$state\"\n                }\n             ],\n             \"speech\": \"Turning the \\$appliance \\$state\\!\"\n          }\n       ],\n       \"priority\": 500000\n    }\n\n### POST /intents Sample cURL Request\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k -H \\\"Content-Type: application/json; charset=utf-8\\\" -H \\\"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\\\" --data \\\"{'name':'change appliance state 1','auto':true,'contexts':[],'templates':['turn @state:state the @appliance:appliance ','switch the @appliance:appliance @state:state '],'userSays':[{'data':[{'text':'turn '},{'text':'on','alias':'state','meta':'@state'},{'text':' the '},{'text':'bug report','alias':'report','meta':'@report'}],'isTemplate':false,'count':0},{'data':[{'text':'switch the '},{'text':'heating','alias':'appliance','meta':'@appliance'},{'text':' '},{'text':'off','alias':'state','meta':'@state'}],'isTemplate':false,'count':0}],'responses':[{'resetContexts':false,'action':'set-appliance','affectedContexts':[{'name':'house','lifespan':10}],'parameters':[{'dataType':'@appliance','name':'appliance','value':'\\\\$appliance'},{'dataType':'@state','name':'state','value':'\\\\$state'}],'speech':'Turning the \\\\$appliance \\\\$state\\\\!'}],'priority':500000}\\\" \\\"https://api.api.ai/v1/intents?v=20150910\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n### POST /intents Response\n\nPOST /intents response has the following fields:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-2\": \"The ID of the new intent.\",\n    \"1-2\": \"Contains data on how the request succeeded or failed.\",\n    \"1-1\": \"<a href=\\\"https://docs.api.ai/docs/status-object\\\" target=\\\"_blank\\\">Status object</a>\",\n    \"0-1\": \"String\",\n    \"0-0\": \"id\",\n    \"1-0\": \"status\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n### POST /intents Sample Response\n\n    {\n      \"id\": \"613de225-65b2-4fa8-9965-c14ae7673826\",\n      \"status\": {\n        \"code\": 200,\n        \"errorType\": \"success\"\n      }\n    }\n[block:api-header]\n{\n  \"type\": \"put\",\n  \"title\": \"PUT /intents/{iid}\"\n}\n[/block]\nUpdates the specified intent.\n\n`{iid}` is the ID of the intent to update.\n\n### PUT /intents/{iid} Request\n\nThe PUT body is an [intent object](intents#intent-object).\n\n### PUT /intents/{iid} Sample Request\nThe following request updates the intent of ID 613de225-65b2-4fa8-9965-c14ae7673826, changing its name to \"set appliance on or off\".\n\n    PUT https://api.api.ai/v1/intents/613de225-65b2-4fa8-9965-c14ae7673826?v=20150910\n\t\n\tHeaders:\n\tAuthorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\n\tContent-Type: application/json; charset=utf-8\n\n\tPUT body:\n    {\n       \"name\": \"set appliance on or off\",\n       \"auto\": true,\n       \"contexts\": [],\n       \"templates\": [\n          \"turn @state:state the @appliance:appliance \",\n          \"switch the @appliance:appliance @state:state \"\n       ],\n       \"userSays\": [\n          {\n             \"data\": [\n                {\n                   \"text\": \"turn \"\n                },\n                {\n                   \"text\": \"on\",\n                   \"alias\": \"state\",\n                   \"meta\": \"@state\"\n                },\n                {\n                   \"text\": \" the \"\n                },\n                {\n                   \"text\": \"kitchen lights\",\n                   \"alias\": \"appliance\",\n                   \"meta\": \"@appliance\"\n                }\n             ],\n             \"isTemplate\": false,\n             \"count\": 0\n          },\n          {\n             \"data\": [\n                {\n                   \"text\": \"switch the \"\n                },\n                {\n                   \"text\": \"heating\",\n                   \"alias\": \"appliance\",\n                   \"meta\": \"@appliance\"\n                },\n                {\n                   \"text\": \" \"\n                },\n                {\n                   \"text\": \"off\",\n                   \"alias\": \"state\",\n                   \"meta\": \"@state\"\n                }\n             ],\n             \"isTemplate\": false,\n             \"count\": 0\n          }\n       ],\n       \"responses\": [\n          {\n             \"resetContexts\": false,\n             \"action\": \"set-appliance\",\n             \"affectedContexts\": [\n                {\n                   \"name\": \"house\",\n                   \"lifespan\": 10\n                }\n             ],\n             \"parameters\": [\n                {\n                   \"dataType\": \"@appliance\",\n                   \"name\": \"appliance\",\n                   \"value\": \"\\$appliance\"\n                },\n                {\n                   \"dataType\": \"@state\",\n                   \"name\": \"state\",\n                   \"value\": \"\\$state\"\n                }\n             ],\n             \"speech\": \"Turning the \\$appliance \\$state\\!\"\n          }\n       ],\n       \"priority\": 500000\n    }\n\t\n### PUT /intents/{iid} Sample cURL request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k -X PUT -H \\\"Content-Type: application/json; charset=utf-8\\\" -H \\\"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\\\" --data \\\"{'name':'set appliance on or off','auto':true,'contexts':[],'templates':['turn @state:state the @appliance:appliance ','switch the @appliance:appliance @state:state '],'userSays':[{'data':[{'text':'turn '},{'text':'on','alias':'state','meta':'@state'},{'text':' the '},{'text':'kitchen lights','alias':'appliance','meta':'@appliance'}],'isTemplate':false,'count':0},{'data':[{'text':'switch the '},{'text':'heating','alias':'appliance','meta':'@appliance'},{'text':' '},{'text':'off','alias':'state','meta':'@state'}],'isTemplate':false,'count':0}],'responses':[{'resetContexts':false,'action':'set-appliance','affectedContexts':[{'name':'house','lifespan':10}],'parameters':[{'dataType':'@appliance','name':'appliance','value':'\\\\$appliance'},{'dataType':'@state','name':'state','value':'\\\\$state'}],'speech':'Turning the \\\\$appliance \\\\$state\\\\!'}],'priority':500000}\\\" \\\"https://api.api.ai/v1/intents/613de225-65b2-4fa8-9965-c14ae7673826?v=20150910\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n### PUT /intents/{iid} Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-2\": \"Contains data on how the request succeeded or failed.\",\n    \"0-1\": \"<a href=\\\"https://docs.api.ai/docs/status-object\\\" target=\\\"_blank\\\">Status object</a>\",\n    \"0-0\": \"status\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"DELETE /intents/{iid}\"\n}\n[/block]\nDeletes the specified intent.\n\n`{iid}` is the ID of the intent to delete.\n\n### Delete /intents/{iid} Sample Request\nThe following request deletes the intent of ID 613de225-65b2-4fa8-9965-c14ae7673826.\n\n    DELETE https://api.api.ai/v1/intents/80f817e8-23fb-4e8e-ba62-eca1fcef7c3a?v=20150910\n\t\n\tHeaders:\n\tAuthorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\n\t\n### Delete /intents/{iid} Sample cURL Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k -X DELETE -H \\\"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\\\" \\\"https://api.api.ai/v1/intents/613de225-65b2-4fa8-9965-c14ae7673826?v=20150910\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n### DELETE /intents/{iid} Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"status\",\n    \"0-1\": \"<a href=\\\"https://docs.api.ai/docs/status-object\\\" target=\\\"_blank\\\">Status object</a>\",\n    \"0-2\": \"Contains data on how the request succeeded or failed.\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Intent Object\"\n}\n[/block]\nThe intent JSON object contains information about intent. It has the following fields:\n[block:html]\n{\n  \"html\": \"<table>\\n<tr>\\n  <th colspan=\\\"3\\\">Name</th>\\n  <th>Type</th> \\n  <th>Description</th>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">id</td>\\n  <td>String</td> \\n  <td>A unique identifier for the intent.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">name</td>\\n  <td>String</td> \\n  <td>The name of the intent.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">auto</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> if Machine learning is on in this intent.<br> <code>false</code> if Machine learning is off in this intent.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">contexts</td>\\n  <td>Array of legal names</td> \\n  <td>A list of contexts required in order for this intent to be triggered (input contexts).</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">templates</td>\\n  <td>Array of strings</td> \\n  <td>Array of templates this intent will match. Each template is a string that may contain legal names corresponding to words and phrases, entity names prefixed with <code>@</code>, accompanied or not by aliases. In addition to alphanumerical characters, it may contain the symbols <code>?</code> and <code>,</code>.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">userSays</td>\\n  <td>Array of objects</td> \\n  <td>Each object corresponds to one example/template from the <a href=\\\"https://docs.api.ai/docs/concept-intents#user-says\\\" target=\\\"_blank\\\">'User says' field</a> in the UI.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">id</td>\\n  <td>String</td> \\n  <td>The id of the example/template.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">data</td>\\n  <td>Array of objects</td> \\n  <td>Information about the text of the example/template and its <a href=\\\"https://docs.api.ai/docs/concept-intents#section-example-annotation\\\" target=\\\"_blank\\\">annotation</a>.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>text</td>\\n  <td>String</td> \\n  <td>Text corresponding to the entire example/template (for examples without annotation and templates) or to one of example's parts (only for annotated examples). </td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>meta</td>\\n  <td>String</td> \\n  <td>Entity name prefixed with <code>@</code>. This field is required for the annotated part of the text and applies only to examples.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>alias</td>\\n  <td>Legal name</td> \\n  <td>Parameter name for the annotated part of example.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>userDefined</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> if the text was annotated by developer. <br> <code>false</code> in the case of automatic annotation.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">isTemplate</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> for <a href=\\\"https://docs.api.ai/docs/concept-intents#section-example-and-template-modes\\\" target=\\\"_blank\\\">template mode</a>. <br> <code>false</code> for <a href=\\\"https://docs.api.ai/docs/concept-intents#section-example-and-template-modes\\\" target=\\\"_blank\\\">example mode</a>.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">count</td>\\n  <td>Number</td> \\n  <td>Equals to <code>n-1</code> where <code>n</code> indicates how many times this example/template was added to this intent.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">responses</td>\\n  <td>Array of objects</td> \\n  <td>A list of responses for this intent.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">action</td>\\n  <td>Legal name</td> \\n  <td>The name of the action.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">resetContexts</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> indicates that all contexts will be reset when this intent is triggered. Otherwise the value is <code>false</code>.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">affectedContexts</td>\\n  <td>Array of objects</td> \\n  <td>A list of contexts that are activated when this intent is triggered (output contexts).</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>name</td>\\n  <td>Legal name</td> \\n  <td>The name of the context.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>lifespan</td>\\n  <td>Number</td> \\n  <td>Indicates the number of requests the context will be active until expired.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">parameters</td>\\n  <td>Array of objects</td> \\n  <td>A list of parameters for the action.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>name</td>\\n  <td>Legal name</td> \\n  <td>The name of the parameter.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>value</td>\\n  <td>String</td> \\n  <td>The value of the parameter. It can be:<br> <ul><li>a constant string</li> <li>a variable defined as the parameter name prefixed with <code>$</code>. Example: <code>$date</code></li> <li>original value defined as <code>$parameter_name.original</code></li> <li>a value from a context defined as <code>#context_name.parameter_name</code></li></ul></td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>defaultValue</td>\\n  <td>String</td> \\n  <td>Default value to use when the \\\"value\\\" field returns an empty value. <br>Default value can be extracted from a context by using the format <code>#context_name.parameter_name</code>.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>required</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> if the action cannot be completed without collecting this parameter value. <code>false</code> otherwise.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>dataType</td>\\n  <td>String</td> \\n  <td>Entity name prefixed with <code>@</code>. This field is mandatory if the parameter is required.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>prompts</td>\\n  <td>Array of strings</td> \\n  <td>Questions that the agent will ask in order to collect a value for a required parameter.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td></td>\\n  <td>isList</td>\\n  <td>Boolean</td> \\n  <td>If <code>true</code>, the parameter value will be returned as a list. <br> If <code>false</code>, the parameter value can be a string, number, or object.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">messages</td>\\n  <td>Array of objects</td> \\n  <td>Agent response corresponding to the <a href=\\\"https://docs.api.ai/docs/concept-intents#response\\\" target=\\\"_blank\\\">'Response' field</a> in the UI. Array of <a href=\\\"https://docs.api.ai/docs/intents#section-message-objects\\\" target=\\\"_blank\\\">message objects</a></td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">defaultResponsePlatforms</td>\\n  <td>Array of strings</td> \\n  <td>Strings correspond to the messaging platform names for which the \\\"Use response from the DEFAULT tab as the first response.\\\" option is enabled.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">priority</td>\\n  <td>Number</td> \\n  <td>Intent priority.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">webhookUsed</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> if <a href=\\\"https://docs.api.ai/docs/webhook\\\" target=\\\"_blank\\\">webhook</a> is enabled in the agent and in the intent. <code>false</code> otherwise.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">webhookForSlotFilling</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> if <a href=\\\"https://docs.api.ai/docs/webhook\\\" target=\\\"_blank\\\">webhook</a> is enabled for the intent required parameters. <code>false</code> otherwise.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">fallbackIntent</td>\\n  <td>Boolean</td> \\n  <td><code>true</code> if this is a <a href=\\\"https://docs.api.ai/docs/concept-intents#fallback-intent\\\" target=\\\"_blank\\\">fallback intent</a>. <code>false</code> if it is a regular intent.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">cortanaCommand</td>\\n  <td>Object</td> \\n  <td>Object containing optional values for <a href=\\\"https://docs.api.ai/docs/cortana-integration\\\" target=\\\"_blank\\\">Cortana integration</a>.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">navigateOrService</td>\\n  <td>String</td> \\n  <td>\\\"NAVIGATE\\\" – for a page that the app should navigate to when it launches<br> \\\"SERVICE\\\" – for an app service name that must handle voice command.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">target</td>\\n  <td>String</td> \\n  <td>Page or service name.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"3\\\">events</td>\\n  <td>Array</td> \\n  <td>Array containing event objects.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td colspan=\\\"2\\\">name</td>\\n  <td>String</td> \\n  <td>Event name.</td>\\n</tr>\\n</table>\"\n}\n[/block]\n## Message objects\n\n### Text response message object\n[block:html]\n{\n  \"html\": \"<table>\\n<tr>\\n  <th width=20%>Name</th>\\n  <th width=15%>Type</th> \\n  <th width=65%>Description</th>\\n</tr>\\n<tr>\\n  <td>type</td>\\n  <td>Number</td> \\n  <td>Equals to 0 for the <a href=\\\"https://docs.api.ai/docs/rich-messages#text-response\\\" target=\\\"_blank\\\">Text response</a> message type.</td>\\n</tr>\\n<tr>\\n  <td>platform</td>\\n  <td>String</td> \\n  <td>Messaging platform name (only those for which rich messages are supported).</td>\\n</tr>\\n<tr>\\n  <td>speech</td>\\n  <td>String or Array</td> \\n  <td>Agent's text response(s). String in case of one variation per one 'Text response' element, array of strings in case of multiple variations. Line breaks (<code>\\\\n</code>) are currently supported for Facebook Messenger, Kik, Slack, and Telegram one-click integrations.</td>\\n</tr>\\n</table>\"\n}\n[/block]\n### Image message object\n[block:html]\n{\n  \"html\": \"<table>\\n<tr>\\n  <th width=20%>Name</th>\\n  <th width=15%>Type</th> \\n  <th width=65%>Description</th>\\n</tr>\\n<tr>\\n  <td>type</td>\\n  <td>Number</td> \\n  <td>Equals to 3 for the <a href=\\\"https://docs.api.ai/docs/rich-messages#image\\\" target=\\\"_blank\\\">Image</a> message type.</td>\\n</tr>\\n<tr>\\n  <td>platform</td>\\n  <td>String</td> \\n  <td>Messaging platform name (only those for which rich messages are supported).</td>\\n</tr>\\n<tr>\\n  <td>imageUrl</td>\\n  <td>String</td> \\n  <td>Public URL to the image file.</td>\\n</tr>\\n</table>\"\n}\n[/block]\n### Card message object\n[block:html]\n{\n  \"html\": \"<table>\\n<tr>\\n  <th colspan=\\\"2\\\" width=20%>Name</th>\\n  <th width=15%>Type</th> \\n  <th width=65%>Description</th>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">type</td>\\n  <td>Number</td> \\n  <td>Equals to 1 for the <a href=\\\"https://docs.api.ai/docs/rich-messages#card\\\" target=\\\"_blank\\\">Card</a> message type.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">platform</td>\\n  <td>String</td> \\n  <td>Messaging platform name (only those for which rich messages are supported).</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">title</td>\\n  <td>String</td> \\n  <td>Card title.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">subtitle</td>\\n  <td>String</td> \\n  <td>Card subtitle.</td>\\n</tr>\\n<tr>\\n  <td colspan=\\\"2\\\">buttons</td>\\n  <td>Array</td> \\n  <td>Array of objects corresponding to card buttons.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td>text</td>\\n  <td>String</td> \\n  <td>Button text.</td>\\n</tr>\\n<tr>\\n  <td></td>\\n  <td>postback</td>\\n  <td>String</td> \\n  <td>A text sent back to API.AI or a URL to open.</td>\\n</tr>\\n</table>\"\n}\n[/block]\n### Quick replies message object\n[block:html]\n{\n  \"html\": \"<table>\\n<tr>\\n  <th width=20%>Name</th>\\n  <th width=15%>Type</th> \\n  <th width=65%>Description</th>\\n</tr>\\n<tr>\\n  <td>type</td>\\n  <td>Number</td> \\n  <td>Equals to 2 for the <a href=\\\"https://docs.api.ai/docs/rich-messages#quick-replies\\\" target=\\\"_blank\\\">Quick replies</a> message type.</td>\\n</tr>\\n<tr>\\n  <td>platform</td>\\n  <td>String</td> \\n  <td>Messaging platform name (only those for which rich messages are supported).</td>\\n</tr>\\n<tr>\\n  <td>title</td>\\n  <td>String</td> \\n  <td>Quick replies title. Required for the Facebook Messenger, Kik, and Telegram one-click integrations.</td>\\n</tr>\\n<tr>\\n  <td>replies</td>\\n  <td>Array</td> \\n  <td>Array of strings corresponding to quick replies.</td>\\n</tr>\\n</table>\"\n}\n[/block]\n### Custom payload message object\n[block:html]\n{\n  \"html\": \"<table>\\n<tr>\\n  <th width=20%>Name</th>\\n  <th width=15%>Type</th> \\n  <th width=65%>Description</th>\\n</tr>\\n<tr>\\n  <td>type</td>\\n  <td>Number</td> \\n  <td>Equals to 4 for the <a href=\\\"https://docs.api.ai/docs/rich-messages#custom-payload\\\" target=\\\"_blank\\\">Custom payload</a> message type.</td>\\n</tr>\\n<tr>\\n  <td>platform</td>\\n  <td>String</td> \\n  <td>Messaging platform name (only those for which rich messages are supported).</td>\\n</tr>\\n<tr>\\n  <td>payload</td>\\n  <td>Object</td> \\n  <td>Developer defined JSON. It is sent without modifications.</td>\\n</tr>\\n</table>\"\n}\n[/block]\n### Sample Intent Object\n\nThe following intent will be triggered if the context \"greetings\" has been already activated and if a user says phrases like \"*Hi*\", \"*Hi, my name is Lucy*\", \"*Hi, I am Bob and I'm 15*\", or similar.\n\nIf the parameter \"name\" value was not provided by the user in the first phrase, the agent will ask to inform it: \"*Hi! What is your name?*\" since the property \"required\" for the parameter \"name\" is defined as `true`.\n\nIf the age was not provided by the user, the \"age\" parameter value will be returned as `unknown` (as defined in the \"defaultValue\" field).\n\n```\n{\n  \"id\": \"51ee06e9-9ff5-428b-aafd-733bbd7e9978\",\n  \"name\": \"greetings\",\n  \"auto\": true,\n  \"contexts\": [\n    \"greetings\"\n  ],\n  \"templates\": [\n    \"hi I am @sys.given-name:name and I am @sys.number:age \",\n    \"hi my name is @sys.given-name:name and yours\",\n    \"hi\"\n  ],\n  \"userSays\": [\n    {\n      \"id\": \"a4fd3a1d-fa7b-4b45-8fb8-f8b1f556872d\",\n      \"data\": [\n        {\n          \"text\": \"hi I am \"\n        },\n        {\n          \"text\": \"Alex\",\n          \"alias\": \"name\",\n          \"meta\": \"@sys.given-name\",\n          \"userDefined\": false\n        },\n        {\n          \"text\": \" and I am \"\n        },\n        {\n          \"text\": \"15\",\n          \"alias\": \"age\",\n          \"meta\": \"@sys.number\",\n          \"userDefined\": false\n        }\n      ],\n      \"isTemplate\": false,\n      \"count\": 1\n    },\n    {\n      \"id\": \"e16ec309-e2b2-4218-b515-d90832ca74e3\",\n      \"data\": [\n        {\n          \"text\": \"hi my name is \"\n        },\n        {\n          \"text\": \"Sam\",\n          \"alias\": \"name\",\n          \"meta\": \"@sys.given-name\",\n          \"userDefined\": false\n        },\n        {\n          \"text\": \" and yours\"\n        }\n      ],\n      \"isTemplate\": false,\n      \"count\": 1\n    },\n    {\n      \"id\": \"4d2c6dcc-6b8d-47b5-bc68-39b4f5aa1184\",\n      \"data\": [\n        {\n          \"text\": \"hi\"\n        }\n      ],\n      \"isTemplate\": false,\n      \"count\": 0\n    }\n  ],\n  \"responses\": [\n    {\n      \"resetContexts\": false,\n      \"action\": \"greetings\",\n      \"affectedContexts\": [],\n      \"parameters\": [\n        {\n          \"required\": true,\n          \"dataType\": \"@sys.given-name\",\n          \"name\": \"name\",\n          \"value\": \"$name\",\n          \"defaultValue\": \"unknown\"\n          \"prompts\": [\n            \"Hi! What is your name?\"\n          ],\n          \"isList\": false\n        },\n        {\n          \"dataType\": \"@sys.number\",\n          \"name\": \"age\",\n          \"value\": \"$age\",\n          \"isList\": false\n        }\n      ],\n      \"messages\": [\n        {\n          \"type\": 0,\n          \"speech\": \"Hi! Nice to meet you, $name! What is your hobby?\"\n        }\n      ]\n    }\n  ],\n  \"priority\": 500000,\n  \"cortanaCommand\": {\n    \"navigateOrService\": \"NAVIGATE\",\n    \"target\": \"\"\n  },\n  \"webhookUsed\": false,\n  \"fallbackIntent\": false\n}\n```","excerpt":"","slug":"intents","type":"basic","title":"/intents"}
* [Overview](#overview) * [URLs and Objects](#urls-and-objects) * [GET /intents](#get-intents) * [GET /intents/{iid}](#get-intentsiid) * [POST /intents](#post-intents) * [PUT /intents/{iid}](#put-intentsiid) * [DELETE /intents/{iid}](#delete-intentsiid) * [Intent Object](#intent-object) [block:api-header] { "type": "basic", "title": "Overview" } [/block] The **intents** endpoint is used to create, retrieve, update, and delete intent objects. Intents convert a number of user expressions or patterns into an action. An action is essentially an extraction of the user command or sentence semantics. See <a href="https://docs.api.ai/docs/concept-intents" target="_blank">Intents Overview</a> for detailed information on intents. [block:api-header] { "type": "basic", "title": "URLs and Objects" } [/block] The following URLs are available: [block:parameters] { "data": { "h-0": "URL", "h-1": "Definition", "0-0": "[GET /intents](intents#get-intents)", "0-1": "Retrieves a list of all intents for the agent.", "1-0": "[GET /intents/{iid}](intents#get-intentsiid)", "2-0": "[POST /intents](intents#post-intents)", "3-0": "[PUT /intents/{iid}](intents#put-intentsiid)", "4-0": "[DELETE /intents/{iid}](intents#delete-intentsiid)", "1-1": "Retrieves the specified intent.", "2-1": "Creates a new intent.", "3-1": "Updates the specified intent.", "4-1": "Deletes the specified intent." }, "cols": 2, "rows": 5 } [/block] The [intent object](intents#intent-object) contains information on which action to return, based on contexts and parameters. [block:api-header] { "type": "get", "title": "GET /intents" } [/block] Retrieves a list of all intents for the agent. ### GET /intents Sample Request The following request returns all intents for the agent that is associated with the access token. GET https://api.api.ai/v1/intents?v=20150910 Headers: Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN ### GET /intents Sample cURL Request [block:code] { "codes": [ { "code": "curl -k -H \"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\" \"https://api.api.ai/v1/intents?v=20150910\"", "language": "curl" } ] } [/block] ### GET /intents Response The response will be a JSON object that is an array of objects with the following fields: [block:html] { "html": "<table>\n<tr>\n <th colspan=\"2\">Name</th>\n <th>Type</th> \n <th>Description</th>\n</tr>\n <td colspan=\"2\">id</td>\n <td>String</td> \n <td>ID of the intent.</td>\n</tr>\n<tr>\n <td colspan=\"2\">name</td>\n <td>String</td> \n <td>Name of the intent.</td>\n</tr>\n<tr>\n <td colspan=\"2\">contextIn</td>\n <td>Array of legal names</td> \n <td>List of input contexts. These contexts serve as a prerequisite for this intent to be triggered.</td>\n</tr>\n<tr>\n <td colspan=\"2\">contextOut</td>\n <td>Array of legal names</td> \n <td>List of output contexts that are set after this intent is executed.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"1\">name</td>\n <td>String</td> \n <td>The name of the output context.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"1\">lifespan</td>\n <td>Number</td> \n <td>The number of queries this context will remain active after being invoked.</td>\n</tr>\n<tr>\n <td colspan=\"2\">actions</td>\n <td>Array of strings</td> \n <td>List of actions set by all responses of this intent.</td>\n</tr>\n<tr>\n <td colspan=\"2\">parameters</td>\n <td>Array of objects</td> \n <td>List of parameters for the action.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"1\">name</td>\n <td>Legal name</td> \n <td>The name of the parameter.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"1\">value</td>\n <td>String</td> \n <td>The value of the parameter.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"1\">defaultValue</td>\n <td>String</td> \n <td>The default value of the parameter that should be returned when the \"value\" field returns an empty value.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"1\">required</td>\n <td>Boolean</td> \n <td><code>true</code> if the action cannot be completed without collecting this parameter value. <code>false</code> otherwise.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"1\">dataType</td>\n <td>String</td> \n <td>Entity name prefixed with <code>@</code>. This field is mandatory if the parameter is required.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"1\">prompts</td>\n <td>Array of strings</td> \n <td>Questions that the agent will ask in order to collect a value for a required parameter.</td>\n</tr>\n<tr>\n <td colspan=\"2\">priority</td>\n <td>Number</td> \n <td>Intent priority.</td>\n</tr>\n<tr>\n<tr>\n <td colspan=\"2\">fallbackIntent</td>\n <td>Boolean</td> \n <td><code>true</code> if this is a <a href=\"https://docs.api.ai/docs/concept-intents#fallback-intent\" target=\"_blank\">fallback intent</a>. <code>false</code> if it is a regular intent.</td>\n</tr>\n<tr>\n</table>" } [/block] ### GET /intents Sample Response This example shows the JSON response to a GET /intents request. It represents an array of two intent objects corresponding to the intents titled "hobby" and "greetings". [    {       "id": "8ce9a60f-4a1e-468c-9718-5030de11eb91",       "name": "hobby",       "contextIn": [          "hobby"       ],       "parameters": [          {             "dataType": "@hobby",             "name": "hobby",             "value": "$hobby"          }       ],       "contextOut": [          {             "name": "hobby",             "lifespan": 0          }       ],       "actions": [          "hobby"       ],       "priority": 500000,       "fallbackIntent": false    },    {       "id": "c261cb5f-4b31-4390-af4a-1e58620d462c",       "name": "greetings",       "contextIn": [          "greetings"       ],       "parameters": [          {             "required": true,             "dataType": "@sys.given-name",             "name": "name",             "value": "$name",             "prompts": [                "Hi! What is your name?"             ]          },          {             "dataType": "@sys.number",             "name": "age",             "value": "$age",             "prompts": [],             "defaultValue": "unknown"          }       ],       "contextOut": [          {             "name": "greetings",             "lifespan": 10          },          {             "name": "hobby",             "lifespan": 5          }       ],       "actions": [          "greetings"       ],       "priority": 500000,       "fallbackIntent": false    } ] [block:api-header] { "type": "get", "title": "GET /intents/{iid}" } [/block] Retrieves the specified intent. `{iid}` is the ID of the intent to retrieve. ### GET /intents/{iid} Sample Request The following request returns the intent with ID of 33868522-5747-4a31-88fb-3cd13bd18684. GET https://api.api.ai/v1/intents/1502edd3-e0be-4a4b-97f1-950550fbfcc3?v=20150910 Headers: Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN ### GET /intents/{iid} Sample cURL Request [block:code] { "codes": [ { "code": "curl -k -H \"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\" \"https://api.api.ai/v1/intents/1502edd3-e0be-4a4b-97f1-950550fbfcc3?v=20150910\"", "language": "curl" } ] } [/block] ### GET /intents/{iid} Response The response is an [intent object](intents#intent-object). [block:api-header] { "type": "post", "title": "POST /intents" } [/block] Creates a new intent. ### POST /intents Request The POST body is an [intent object](intents#intent-object) without the `"id"` element. ### POST /intents Sample Request The following request creates an intent for setting the state of an appliance using the entities `@appliance` and `@state`. POST https://api.api.ai/v1/intents?v=20150910 Headers: Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN Content-Type: application/json; charset=utf-8 POST body: {    "name": "change appliance state",    "auto": true,    "contexts": [],    "templates": [       "turn @state:state the @appliance:appliance ",       "switch the @appliance:appliance @state:state "    ],    "userSays": [       {          "data": [             {                "text": "turn "             },             {                "text": "on",                "alias": "state",                "meta": "@state"             },             {                "text": " the "             },             {                "text": "kitchen lights",                "alias": "appliance",                "meta": "@appliance"             }          ],          "isTemplate": false,          "count": 0       },       {          "data": [             {                "text": "switch the "             },             {                "text": "heating",                "alias": "appliance",                "meta": "@appliance"             },             {                "text": " "             },             {                "text": "off",                "alias": "state",                "meta": "@state"             }          ],          "isTemplate": false,          "count": 0       }    ],    "responses": [       {          "resetContexts": false,          "action": "set-appliance",          "affectedContexts": [             {                "name": "house",                "lifespan": 10             }          ],          "parameters": [             {                "dataType": "@appliance",                "name": "appliance",                "value": "\$appliance"             },             {                "dataType": "@state",                "name": "state",                "value": "\$state"             }          ],          "speech": "Turning the \$appliance \$state\!"       }    ],    "priority": 500000 } ### POST /intents Sample cURL Request [block:code] { "codes": [ { "code": "curl -k -H \"Content-Type: application/json; charset=utf-8\" -H \"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\" --data \"{'name':'change appliance state 1','auto':true,'contexts':[],'templates':['turn @state:state the @appliance:appliance ','switch the @appliance:appliance @state:state '],'userSays':[{'data':[{'text':'turn '},{'text':'on','alias':'state','meta':'@state'},{'text':' the '},{'text':'bug report','alias':'report','meta':'@report'}],'isTemplate':false,'count':0},{'data':[{'text':'switch the '},{'text':'heating','alias':'appliance','meta':'@appliance'},{'text':' '},{'text':'off','alias':'state','meta':'@state'}],'isTemplate':false,'count':0}],'responses':[{'resetContexts':false,'action':'set-appliance','affectedContexts':[{'name':'house','lifespan':10}],'parameters':[{'dataType':'@appliance','name':'appliance','value':'\\$appliance'},{'dataType':'@state','name':'state','value':'\\$state'}],'speech':'Turning the \\$appliance \\$state\\!'}],'priority':500000}\" \"https://api.api.ai/v1/intents?v=20150910\"", "language": "curl" } ] } [/block] ### POST /intents Response POST /intents response has the following fields: [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-2": "The ID of the new intent.", "1-2": "Contains data on how the request succeeded or failed.", "1-1": "<a href=\"https://docs.api.ai/docs/status-object\" target=\"_blank\">Status object</a>", "0-1": "String", "0-0": "id", "1-0": "status" }, "cols": 3, "rows": 2 } [/block] ### POST /intents Sample Response {   "id": "613de225-65b2-4fa8-9965-c14ae7673826",   "status": {     "code": 200,     "errorType": "success"   } } [block:api-header] { "type": "put", "title": "PUT /intents/{iid}" } [/block] Updates the specified intent. `{iid}` is the ID of the intent to update. ### PUT /intents/{iid} Request The PUT body is an [intent object](intents#intent-object). ### PUT /intents/{iid} Sample Request The following request updates the intent of ID 613de225-65b2-4fa8-9965-c14ae7673826, changing its name to "set appliance on or off". PUT https://api.api.ai/v1/intents/613de225-65b2-4fa8-9965-c14ae7673826?v=20150910 Headers: Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN Content-Type: application/json; charset=utf-8 PUT body: {    "name": "set appliance on or off",    "auto": true,    "contexts": [],    "templates": [       "turn @state:state the @appliance:appliance ",       "switch the @appliance:appliance @state:state "    ],    "userSays": [       {          "data": [             {                "text": "turn "             },             {                "text": "on",                "alias": "state",                "meta": "@state"             },             {                "text": " the "             },             {                "text": "kitchen lights",                "alias": "appliance",                "meta": "@appliance"             }          ],          "isTemplate": false,          "count": 0       },       {          "data": [             {                "text": "switch the "             },             {                "text": "heating",                "alias": "appliance",                "meta": "@appliance"             },             {                "text": " "             },             {                "text": "off",                "alias": "state",                "meta": "@state"             }          ],          "isTemplate": false,          "count": 0       }    ],    "responses": [       {          "resetContexts": false,          "action": "set-appliance",          "affectedContexts": [             {                "name": "house",                "lifespan": 10             }          ],          "parameters": [             {                "dataType": "@appliance",                "name": "appliance",                "value": "\$appliance"             },             {                "dataType": "@state",                "name": "state",                "value": "\$state"             }          ],          "speech": "Turning the \$appliance \$state\!"       }    ],    "priority": 500000 } ### PUT /intents/{iid} Sample cURL request [block:code] { "codes": [ { "code": "curl -k -X PUT -H \"Content-Type: application/json; charset=utf-8\" -H \"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\" --data \"{'name':'set appliance on or off','auto':true,'contexts':[],'templates':['turn @state:state the @appliance:appliance ','switch the @appliance:appliance @state:state '],'userSays':[{'data':[{'text':'turn '},{'text':'on','alias':'state','meta':'@state'},{'text':' the '},{'text':'kitchen lights','alias':'appliance','meta':'@appliance'}],'isTemplate':false,'count':0},{'data':[{'text':'switch the '},{'text':'heating','alias':'appliance','meta':'@appliance'},{'text':' '},{'text':'off','alias':'state','meta':'@state'}],'isTemplate':false,'count':0}],'responses':[{'resetContexts':false,'action':'set-appliance','affectedContexts':[{'name':'house','lifespan':10}],'parameters':[{'dataType':'@appliance','name':'appliance','value':'\\$appliance'},{'dataType':'@state','name':'state','value':'\\$state'}],'speech':'Turning the \\$appliance \\$state\\!'}],'priority':500000}\" \"https://api.api.ai/v1/intents/613de225-65b2-4fa8-9965-c14ae7673826?v=20150910\"", "language": "curl" } ] } [/block] ### PUT /intents/{iid} Response [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-2": "Contains data on how the request succeeded or failed.", "0-1": "<a href=\"https://docs.api.ai/docs/status-object\" target=\"_blank\">Status object</a>", "0-0": "status" }, "cols": 3, "rows": 1 } [/block] [block:api-header] { "type": "delete", "title": "DELETE /intents/{iid}" } [/block] Deletes the specified intent. `{iid}` is the ID of the intent to delete. ### Delete /intents/{iid} Sample Request The following request deletes the intent of ID 613de225-65b2-4fa8-9965-c14ae7673826. DELETE https://api.api.ai/v1/intents/80f817e8-23fb-4e8e-ba62-eca1fcef7c3a?v=20150910 Headers: Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN ### Delete /intents/{iid} Sample cURL Request [block:code] { "codes": [ { "code": "curl -k -X DELETE -H \"Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN\" \"https://api.api.ai/v1/intents/613de225-65b2-4fa8-9965-c14ae7673826?v=20150910\"", "language": "curl" } ] } [/block] ### DELETE /intents/{iid} Response [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "status", "0-1": "<a href=\"https://docs.api.ai/docs/status-object\" target=\"_blank\">Status object</a>", "0-2": "Contains data on how the request succeeded or failed." }, "cols": 3, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Intent Object" } [/block] The intent JSON object contains information about intent. It has the following fields: [block:html] { "html": "<table>\n<tr>\n <th colspan=\"3\">Name</th>\n <th>Type</th> \n <th>Description</th>\n</tr>\n<tr>\n <td colspan=\"3\">id</td>\n <td>String</td> \n <td>A unique identifier for the intent.</td>\n</tr>\n<tr>\n <td colspan=\"3\">name</td>\n <td>String</td> \n <td>The name of the intent.</td>\n</tr>\n<tr>\n <td colspan=\"3\">auto</td>\n <td>Boolean</td> \n <td><code>true</code> if Machine learning is on in this intent.<br> <code>false</code> if Machine learning is off in this intent.</td>\n</tr>\n<tr>\n <td colspan=\"3\">contexts</td>\n <td>Array of legal names</td> \n <td>A list of contexts required in order for this intent to be triggered (input contexts).</td>\n</tr>\n<tr>\n <td colspan=\"3\">templates</td>\n <td>Array of strings</td> \n <td>Array of templates this intent will match. Each template is a string that may contain legal names corresponding to words and phrases, entity names prefixed with <code>@</code>, accompanied or not by aliases. In addition to alphanumerical characters, it may contain the symbols <code>?</code> and <code>,</code>.</td>\n</tr>\n<tr>\n <td colspan=\"3\">userSays</td>\n <td>Array of objects</td> \n <td>Each object corresponds to one example/template from the <a href=\"https://docs.api.ai/docs/concept-intents#user-says\" target=\"_blank\">'User says' field</a> in the UI.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">id</td>\n <td>String</td> \n <td>The id of the example/template.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">data</td>\n <td>Array of objects</td> \n <td>Information about the text of the example/template and its <a href=\"https://docs.api.ai/docs/concept-intents#section-example-annotation\" target=\"_blank\">annotation</a>.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>text</td>\n <td>String</td> \n <td>Text corresponding to the entire example/template (for examples without annotation and templates) or to one of example's parts (only for annotated examples). </td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>meta</td>\n <td>String</td> \n <td>Entity name prefixed with <code>@</code>. This field is required for the annotated part of the text and applies only to examples.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>alias</td>\n <td>Legal name</td> \n <td>Parameter name for the annotated part of example.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>userDefined</td>\n <td>Boolean</td> \n <td><code>true</code> if the text was annotated by developer. <br> <code>false</code> in the case of automatic annotation.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">isTemplate</td>\n <td>Boolean</td> \n <td><code>true</code> for <a href=\"https://docs.api.ai/docs/concept-intents#section-example-and-template-modes\" target=\"_blank\">template mode</a>. <br> <code>false</code> for <a href=\"https://docs.api.ai/docs/concept-intents#section-example-and-template-modes\" target=\"_blank\">example mode</a>.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">count</td>\n <td>Number</td> \n <td>Equals to <code>n-1</code> where <code>n</code> indicates how many times this example/template was added to this intent.</td>\n</tr>\n<tr>\n <td colspan=\"3\">responses</td>\n <td>Array of objects</td> \n <td>A list of responses for this intent.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">action</td>\n <td>Legal name</td> \n <td>The name of the action.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">resetContexts</td>\n <td>Boolean</td> \n <td><code>true</code> indicates that all contexts will be reset when this intent is triggered. Otherwise the value is <code>false</code>.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">affectedContexts</td>\n <td>Array of objects</td> \n <td>A list of contexts that are activated when this intent is triggered (output contexts).</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>name</td>\n <td>Legal name</td> \n <td>The name of the context.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>lifespan</td>\n <td>Number</td> \n <td>Indicates the number of requests the context will be active until expired.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">parameters</td>\n <td>Array of objects</td> \n <td>A list of parameters for the action.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>name</td>\n <td>Legal name</td> \n <td>The name of the parameter.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>value</td>\n <td>String</td> \n <td>The value of the parameter. It can be:<br> <ul><li>a constant string</li> <li>a variable defined as the parameter name prefixed with <code>$</code>. Example: <code>$date</code></li> <li>original value defined as <code>$parameter_name.original</code></li> <li>a value from a context defined as <code>#context_name.parameter_name</code></li></ul></td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>defaultValue</td>\n <td>String</td> \n <td>Default value to use when the \"value\" field returns an empty value. <br>Default value can be extracted from a context by using the format <code>#context_name.parameter_name</code>.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>required</td>\n <td>Boolean</td> \n <td><code>true</code> if the action cannot be completed without collecting this parameter value. <code>false</code> otherwise.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>dataType</td>\n <td>String</td> \n <td>Entity name prefixed with <code>@</code>. This field is mandatory if the parameter is required.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>prompts</td>\n <td>Array of strings</td> \n <td>Questions that the agent will ask in order to collect a value for a required parameter.</td>\n</tr>\n<tr>\n <td></td>\n <td></td>\n <td>isList</td>\n <td>Boolean</td> \n <td>If <code>true</code>, the parameter value will be returned as a list. <br> If <code>false</code>, the parameter value can be a string, number, or object.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">messages</td>\n <td>Array of objects</td> \n <td>Agent response corresponding to the <a href=\"https://docs.api.ai/docs/concept-intents#response\" target=\"_blank\">'Response' field</a> in the UI. Array of <a href=\"https://docs.api.ai/docs/intents#section-message-objects\" target=\"_blank\">message objects</a></td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">defaultResponsePlatforms</td>\n <td>Array of strings</td> \n <td>Strings correspond to the messaging platform names for which the \"Use response from the DEFAULT tab as the first response.\" option is enabled.</td>\n</tr>\n<tr>\n <td colspan=\"3\">priority</td>\n <td>Number</td> \n <td>Intent priority.</td>\n</tr>\n<tr>\n <td colspan=\"3\">webhookUsed</td>\n <td>Boolean</td> \n <td><code>true</code> if <a href=\"https://docs.api.ai/docs/webhook\" target=\"_blank\">webhook</a> is enabled in the agent and in the intent. <code>false</code> otherwise.</td>\n</tr>\n<tr>\n <td colspan=\"3\">webhookForSlotFilling</td>\n <td>Boolean</td> \n <td><code>true</code> if <a href=\"https://docs.api.ai/docs/webhook\" target=\"_blank\">webhook</a> is enabled for the intent required parameters. <code>false</code> otherwise.</td>\n</tr>\n<tr>\n <td colspan=\"3\">fallbackIntent</td>\n <td>Boolean</td> \n <td><code>true</code> if this is a <a href=\"https://docs.api.ai/docs/concept-intents#fallback-intent\" target=\"_blank\">fallback intent</a>. <code>false</code> if it is a regular intent.</td>\n</tr>\n<tr>\n <td colspan=\"3\">cortanaCommand</td>\n <td>Object</td> \n <td>Object containing optional values for <a href=\"https://docs.api.ai/docs/cortana-integration\" target=\"_blank\">Cortana integration</a>.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">navigateOrService</td>\n <td>String</td> \n <td>\"NAVIGATE\" – for a page that the app should navigate to when it launches<br> \"SERVICE\" – for an app service name that must handle voice command.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">target</td>\n <td>String</td> \n <td>Page or service name.</td>\n</tr>\n<tr>\n <td colspan=\"3\">events</td>\n <td>Array</td> \n <td>Array containing event objects.</td>\n</tr>\n<tr>\n <td></td>\n <td colspan=\"2\">name</td>\n <td>String</td> \n <td>Event name.</td>\n</tr>\n</table>" } [/block] ## Message objects ### Text response message object [block:html] { "html": "<table>\n<tr>\n <th width=20%>Name</th>\n <th width=15%>Type</th> \n <th width=65%>Description</th>\n</tr>\n<tr>\n <td>type</td>\n <td>Number</td> \n <td>Equals to 0 for the <a href=\"https://docs.api.ai/docs/rich-messages#text-response\" target=\"_blank\">Text response</a> message type.</td>\n</tr>\n<tr>\n <td>platform</td>\n <td>String</td> \n <td>Messaging platform name (only those for which rich messages are supported).</td>\n</tr>\n<tr>\n <td>speech</td>\n <td>String or Array</td> \n <td>Agent's text response(s). String in case of one variation per one 'Text response' element, array of strings in case of multiple variations. Line breaks (<code>\\n</code>) are currently supported for Facebook Messenger, Kik, Slack, and Telegram one-click integrations.</td>\n</tr>\n</table>" } [/block] ### Image message object [block:html] { "html": "<table>\n<tr>\n <th width=20%>Name</th>\n <th width=15%>Type</th> \n <th width=65%>Description</th>\n</tr>\n<tr>\n <td>type</td>\n <td>Number</td> \n <td>Equals to 3 for the <a href=\"https://docs.api.ai/docs/rich-messages#image\" target=\"_blank\">Image</a> message type.</td>\n</tr>\n<tr>\n <td>platform</td>\n <td>String</td> \n <td>Messaging platform name (only those for which rich messages are supported).</td>\n</tr>\n<tr>\n <td>imageUrl</td>\n <td>String</td> \n <td>Public URL to the image file.</td>\n</tr>\n</table>" } [/block] ### Card message object [block:html] { "html": "<table>\n<tr>\n <th colspan=\"2\" width=20%>Name</th>\n <th width=15%>Type</th> \n <th width=65%>Description</th>\n</tr>\n<tr>\n <td colspan=\"2\">type</td>\n <td>Number</td> \n <td>Equals to 1 for the <a href=\"https://docs.api.ai/docs/rich-messages#card\" target=\"_blank\">Card</a> message type.</td>\n</tr>\n<tr>\n <td colspan=\"2\">platform</td>\n <td>String</td> \n <td>Messaging platform name (only those for which rich messages are supported).</td>\n</tr>\n<tr>\n <td colspan=\"2\">title</td>\n <td>String</td> \n <td>Card title.</td>\n</tr>\n<tr>\n <td colspan=\"2\">subtitle</td>\n <td>String</td> \n <td>Card subtitle.</td>\n</tr>\n<tr>\n <td colspan=\"2\">buttons</td>\n <td>Array</td> \n <td>Array of objects corresponding to card buttons.</td>\n</tr>\n<tr>\n <td></td>\n <td>text</td>\n <td>String</td> \n <td>Button text.</td>\n</tr>\n<tr>\n <td></td>\n <td>postback</td>\n <td>String</td> \n <td>A text sent back to API.AI or a URL to open.</td>\n</tr>\n</table>" } [/block] ### Quick replies message object [block:html] { "html": "<table>\n<tr>\n <th width=20%>Name</th>\n <th width=15%>Type</th> \n <th width=65%>Description</th>\n</tr>\n<tr>\n <td>type</td>\n <td>Number</td> \n <td>Equals to 2 for the <a href=\"https://docs.api.ai/docs/rich-messages#quick-replies\" target=\"_blank\">Quick replies</a> message type.</td>\n</tr>\n<tr>\n <td>platform</td>\n <td>String</td> \n <td>Messaging platform name (only those for which rich messages are supported).</td>\n</tr>\n<tr>\n <td>title</td>\n <td>String</td> \n <td>Quick replies title. Required for the Facebook Messenger, Kik, and Telegram one-click integrations.</td>\n</tr>\n<tr>\n <td>replies</td>\n <td>Array</td> \n <td>Array of strings corresponding to quick replies.</td>\n</tr>\n</table>" } [/block] ### Custom payload message object [block:html] { "html": "<table>\n<tr>\n <th width=20%>Name</th>\n <th width=15%>Type</th> \n <th width=65%>Description</th>\n</tr>\n<tr>\n <td>type</td>\n <td>Number</td> \n <td>Equals to 4 for the <a href=\"https://docs.api.ai/docs/rich-messages#custom-payload\" target=\"_blank\">Custom payload</a> message type.</td>\n</tr>\n<tr>\n <td>platform</td>\n <td>String</td> \n <td>Messaging platform name (only those for which rich messages are supported).</td>\n</tr>\n<tr>\n <td>payload</td>\n <td>Object</td> \n <td>Developer defined JSON. It is sent without modifications.</td>\n</tr>\n</table>" } [/block] ### Sample Intent Object The following intent will be triggered if the context "greetings" has been already activated and if a user says phrases like "*Hi*", "*Hi, my name is Lucy*", "*Hi, I am Bob and I'm 15*", or similar. If the parameter "name" value was not provided by the user in the first phrase, the agent will ask to inform it: "*Hi! What is your name?*" since the property "required" for the parameter "name" is defined as `true`. If the age was not provided by the user, the "age" parameter value will be returned as `unknown` (as defined in the "defaultValue" field). ``` { "id": "51ee06e9-9ff5-428b-aafd-733bbd7e9978", "name": "greetings", "auto": true, "contexts": [ "greetings" ], "templates": [ "hi I am @sys.given-name:name and I am @sys.number:age ", "hi my name is @sys.given-name:name and yours", "hi" ], "userSays": [ { "id": "a4fd3a1d-fa7b-4b45-8fb8-f8b1f556872d", "data": [ { "text": "hi I am " }, { "text": "Alex", "alias": "name", "meta": "@sys.given-name", "userDefined": false }, { "text": " and I am " }, { "text": "15", "alias": "age", "meta": "@sys.number", "userDefined": false } ], "isTemplate": false, "count": 1 }, { "id": "e16ec309-e2b2-4218-b515-d90832ca74e3", "data": [ { "text": "hi my name is " }, { "text": "Sam", "alias": "name", "meta": "@sys.given-name", "userDefined": false }, { "text": " and yours" } ], "isTemplate": false, "count": 1 }, { "id": "4d2c6dcc-6b8d-47b5-bc68-39b4f5aa1184", "data": [ { "text": "hi" } ], "isTemplate": false, "count": 0 } ], "responses": [ { "resetContexts": false, "action": "greetings", "affectedContexts": [], "parameters": [ { "required": true, "dataType": "@sys.given-name", "name": "name", "value": "$name", "defaultValue": "unknown" "prompts": [ "Hi! What is your name?" ], "isList": false }, { "dataType": "@sys.number", "name": "age", "value": "$age", "isList": false } ], "messages": [ { "type": 0, "speech": "Hi! Nice to meet you, $name! What is your hobby?" } ] } ], "priority": 500000, "cortanaCommand": { "navigateOrService": "NAVIGATE", "target": "" }, "webhookUsed": false, "fallbackIntent": false } ```