Voice+ Script API

Voice+ Script API endpoints for tracking user progress through voice-enabled journeys. Separate API service (mm.nlx.ai) for coordinating multimodal experiences with step tracking, context sharing, and journey analytics. Use with @nlxai/voice-plus-core SDK.

Voice+ step tracking

post

Track user progress through Voice+ multimodal journeys by sending step transitions. This endpoint is part of the Voice+ Script API (mm.nlx.ai) and is separate from the main conversation API.

SDK Integration: Use @nlxai/voice-plus-core for seamless integration:

import { create } from "@nlxai/voice-plus-core";

const client = create({
  apiKey: "your_voice_plus_api_key",
  workspaceId: "your_workspace_id", 
  scriptId: "script_uuid",
  conversationId: "conversation_id_from_voice_bot",
  languageCode: "en-US"
});

client.sendStep("step_uuid", { selectedSeat: "4A" });

Use Cases:

  • Track user progress through multimodal voice experiences

  • Send contextual data back to voice applications

  • Coordinate between web interfaces and voice interactions

  • Analytics and journey optimization

Authentication: Uses Voice+ API key authentication with x-api-key and x-nlx-id headers

Authorizations
Header parameters
x-nlx-idstringRequired

Workspace identifier required for Voice+ API authentication.

SDK Setup: Configured as workspaceId in client creation

Example: workspace_abc123
Body
stepIdstringRequired

UUID v4 identifier for the step being tracked. Must be a valid UUID format.

SDK Method: client.sendStep("stepId", context) or client.sendStep({ stepId, stepTriggerDescription })

Example: 550e8400-e29b-41d4-a716-446655440000Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
conversationIdstringRequired

Unique identifier for the Voice+ conversation session. This ID links the step tracking to the active voice conversation.

SDK Setup: Passed from voice bot or extracted from URL parameters

Example: conv_voice_abc123
journeyIdstringRequired

UUID identifier for the Voice+ journey/script being executed.

SDK Setup: Configured in client creation as scriptId Note: journeyId field is deprecated, use scriptId in SDK

Example: journey_uuid_def456
languageCodestringRequired

Language code for the Voice+ experience (format: 'xx-XX'). Must match the language codes configured in the journey.

Example: en-USPattern: ^[a-z]{2}-[A-Z]{2}$
stepTriggerDescriptionstring · max: 500Optional

Optional human-readable description of what triggered this step transition. Useful for debugging, analytics, and journey optimization.

SDK Usage: client.sendStep({ stepId, stepTriggerDescription })

Example: User selected seat 4A via voice command
Responses
200

Step successfully tracked

application/json
post
POST /v1/track HTTP/1.1
Host: bots.studio.nlx.ai
x-api-key: YOUR_API_KEY
x-nlx-id: text
Content-Type: application/json
Accept: */*
Content-Length: 143

{
  "stepId": "550e8400-e29b-41d4-a716-446655440000",
  "conversationId": "conv_voice_abc123",
  "journeyId": "journey_uuid_def456",
  "languageCode": "en-US"
}
{
  "success": true,
  "stepId": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "conversationId": "conv_voice_abc123",
  "journeyId": "journey_uuid_def456"
}