gear-codeREST

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

gears

Building custom web chat widgets or mobile app integrations

server

Server-to-server communication where streaming is not required

key-skeleton

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

The Application URL and API Key are located in the API Delivery channel setup.

Click Setup instructions to view Application URL and API Key.

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)

The deploymentKey and channelKey values can be found below the Application URL and API Key in the Setup instructions dialog pictured in the Authentication instructions above.

Request structure

The API supports two main types of input:

  1. Unstructured: Free-form text (natural language).

  2. 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