# Context

Operations for asynchronously setting context for active NLX conversations.

## Set conversation context

> Send contextual information for active conversations, especially Voice+.  Provides structured context about web page elements, form fields, and available actions  to the active voice session.<br>

```json
{"openapi":"3.0.3","info":{"title":"NLX Conversation API","version":"1.0.0"},"tags":[{"name":"Context","description":"Operations for asynchronously setting context for active NLX conversations."}],"servers":[{"url":"https://apps.nlx.ai","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"nlx-api-key","description":"Standard authentication for Conversation endpoints."}},"schemas":{"ContextRequest":{"type":"object","required":["conversationId","context"],"properties":{"conversationId":{"type":"string","description":"The conversation ID for this session."},"context":{"type":"object","description":"Structured context data. Additional custom context keys are allowed.","additionalProperties":true,"properties":{"nlx:vpContext":{"type":"object","properties":{"uri":{"type":"string","description":"The current page URI path."},"actions":{"type":"array","description":"Available actions the user can perform.","items":{"$ref":"#/components/schemas/VoicePlusContextAction"}},"fields":{"type":"array","description":"List of interactive form fields on the page.","items":{"$ref":"#/components/schemas/VoicePlusContextField"}},"destinations":{"type":"array","description":"List of navigation destinations.","items":{"type":"string"}},"scopes":{"type":"array","description":"List of scope tags applicable to the current interaction.","items":{"type":"string"}}}}}}}},"VoicePlusContextAction":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string","description":"The identifier of the action."},"description":{"type":"string","description":"Description of what the action does."},"input":{"type":"object","description":"Additional context describing user specific input related to the action."},"schema":{"type":"object","description":"Optional JSON schema describing parameters for the action.","additionalProperties":true}}},"VoicePlusContextField":{"type":"object","required":["id","name","type"],"properties":{"id":{"type":"string","description":"Unique ID of the form field."},"name":{"type":"string","description":"Human readable name of the field."},"type":{"type":"string","description":"Input type (e.g., text, select, number)."},"description":{"type":"string","description":"Contextual description for the AI."},"placeholder":{"type":"string","description":"UI placeholder text."},"value":{"nullable":true,"description":"Current value of the field."},"options":{"type":"array","description":"Available options for select/radio fields.","items":{"$ref":"#/components/schemas/VoicePlusContextFieldOption"}}}},"VoicePlusContextFieldOption":{"type":"object","properties":{"value":{"nullable":true,"description":"The underlying value of the option."},"text":{"nullable":true,"description":"The display text of the option."},"selected":{"type":"boolean","description":"Whether this option is currently selected."}}}}},"paths":{"/c/{deploymentKey}/{channelKey}/context":{"post":{"tags":["Context"],"summary":"Set conversation context","description":"Send contextual information for active conversations, especially Voice+.  Provides structured context about web page elements, form fields, and available actions  to the active voice session.\n","operationId":"sendVoicePlusContext","parameters":[{"name":"deploymentKey","in":"path","required":true,"schema":{"type":"string"},"description":"The unique key identifying the NLX app deployment."},{"name":"channelKey","in":"path","required":true,"schema":{"type":"string"},"description":"The unique key identifying the specific channel.  **Must include the language code suffix** (e.g., `-en-US`).\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRequest"}}}},"responses":{"200":{"description":"Context successfully received and processed.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request - Invalid context format."},"403":{"description":"Forbidden - Invalid API key or unauthorized context submission."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nlx.ai/platform/developers/voice+-api/track/context.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
