Contexts and the API

Input and output contexts can be activated, created, and altered for intents and sessions using the API.

Setting output and input contexts via API

Like in the console, you can set input and output contexts using the API. You can include the optional contexts object in the QueryParameters to activate them before the query is executed.

In the QueryResult, the activated contexts are included in the outputContexts object.

Create, read, update, and delete contexts via the API

You can use the following API methods to create and manage contexts for a given session: