REST
The NLX Conversation REST API is the primary interface for building custom conversational experiences. It follows a standard RESTful pattern, allowing you to send user inputs (text or structured data) and receive a complete JSON response containing the AI app's reply.
When to use this API
Building custom web chat widgets or mobile app integrations.
Server-to-server communication where streaming is not required.
Integration with legacy systems that do not support Server-Sent Events (SSE).
Authentication
This API uses a custom header for authentication. You must include your NLX API key in every request.
Header
Value
nlx-api-key
YOUR_API_KEY
Content-Type
application/json
Base URL
All requests are made to the NLX App runtime. Note that the URL must include the language code (e.g., -en-US, -es-MX) appended to the channel key.
https://apps.nlx.ai/c/{deploymentKey}/{channelKey}-{languageCode}
deploymentKey: The unique identifier for your specific AI app deployment.
channelKey: The identifier for the channel.
languageCode: The ISO language-country code (e.g.,
en-US).
Request Structure
The API supports two main types of input:
Unstructured: Free-form text (natural language).
Structured: Explicit intent triggering or button clicks.
Example: Sending a Text Message
Response Format
The API returns a standard JSON object containing the AI app's messages, metadata, and updated session context.
Last updated

