Voice+ Context API

Voice+ multimodal context endpoints for providing web page state, available actions, form fields, and navigation information.

Send Voice+ context information

post

Send contextual information for Voice+ multimodal conversations. This endpoint allows you to provide structured context about web page elements, available actions, form fields, and navigation destinations.

Use Cases:

  • Provide page context for voice-enabled web applications

  • Define available actions the AI can perform

  • Specify form fields that can be filled

  • Set navigation destinations

Security: Requires valid API key and conversation context

Authorizations
Path parameters
deploymentKeystringRequired

The unique deployment identifier

channelKeystringRequired

Channel identifier

Body
conversationIdstringRequired

The conversation ID for this Voice+ session

Example: conv_voice123
noncestringOptional

Security nonce for request validation (currently not enforced)

Example: nonce_abc123
Responses
200

Context successfully received and processed

application/json
Responseobject
post
POST /c/{deploymentKey}/{channelKey}/context HTTP/1.1
Host: bots.studio.nlx.ai
nlx-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1628

{
  "conversationId": "conv_voice_bank123",
  "nonce": "nonce_auto_generated",
  "context": {
    "nlx:vpContext": {
      "uri": "https://mybank.com/transfer",
      "fields": [
        {
          "id": "fromAccount",
          "name": "From Account",
          "type": "select",
          "description": "Source account for the money transfer",
          "value": "savings_account_001"
        },
        {
          "id": "toAccount",
          "name": "To Account",
          "type": "select",
          "description": "Destination account for the money transfer",
          "value": ""
        },
        {
          "id": "amount",
          "name": "Transfer Amount",
          "type": "number",
          "description": "Amount to transfer in USD (minimum $0.01, maximum $5000.00)",
          "placeholder": "Enter amount",
          "value": ""
        },
        {
          "id": "memo",
          "name": "Transfer Memo",
          "type": "text",
          "description": "Optional memo for the transfer",
          "placeholder": "Optional memo",
          "value": ""
        }
      ],
      "actions": [
        {
          "action": "submitTransfer",
          "description": "Execute the money transfer with current form data and user verification",
          "schema": {
            "type": "object",
            "required": [
              "fromAccount",
              "toAccount",
              "amount"
            ],
            "properties": {
              "fromAccount": {
                "type": "string",
                "description": "Source account identifier"
              },
              "toAccount": {
                "type": "string",
                "description": "Destination account identifier"
              },
              "amount": {
                "type": "number",
                "minimum": 0.01,
                "maximum": 5000,
                "description": "Transfer amount in USD"
              },
              "memo": {
                "type": "string",
                "maxLength": 100
              }
            }
          }
        },
        {
          "action": "validateTransfer",
          "description": "Validate transfer details without executing",
          "schema": {
            "type": "object",
            "properties": {
              "fromAccount": {
                "type": "string"
              },
              "toAccount": {
                "type": "string"
              },
              "amount": {
                "type": "number"
              }
            }
          }
        },
        {
          "action": "clearForm",
          "description": "Reset all form fields to default values"
        }
      ],
      "destinations": [
        "/account/history",
        "/account/dashboard",
        "/help/transfers",
        "/account/settings"
      ]
    }
  }
}
{}