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.
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
Workspace identifier required for Voice+ API authentication.
SDK Setup: Configured as workspaceId
in client creation
workspace_abc123
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 })
550e8400-e29b-41d4-a716-446655440000
Pattern: ^[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}$
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
conv_voice_abc123
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
journey_uuid_def456
Language code for the Voice+ experience (format: 'xx-XX'). Must match the language codes configured in the journey.
en-US
Pattern: ^[a-z]{2}-[A-Z]{2}$
Optional human-readable description of what triggered this step transition. Useful for debugging, analytics, and journey optimization.
SDK Usage: client.sendStep({ stepId, stepTriggerDescription })
User selected seat 4A via voice command
Step successfully tracked
Bad Request - Invalid step data or format
Unauthorized - Invalid or missing Voice+ API credentials
Forbidden - Valid credentials but access denied to journey/script
Too Many Requests - Voice+ API rate limit exceeded
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"
}