Skip to main content

Web Interface Setup (API & WebSocket)

If you want to integrate FahemAI's intelligence directly into your own custom website, mobile app, or internal dashboard, you can use our robust Web API or real-time WebSocket interface.

Configuration Guide

Follow these steps to enable and configure the Web API for your bot:

Select Web API Adapter

  1. Go to your FahemAI dashboard and select your bot.
  2. Navigate to Connect > Integrations.
  3. Select Web API from the list of platforms.
Select Web API Adapter

Configure API Settings

  1. Set an API Key (Bearer) for authentication.
  2. Define your Messages and Health endpoint paths.
Web API Credentials and Paths

Set Webhook and Streaming

  1. Enter your Webhook Base URL.
  2. Enable Stream Reply if you want real-time text delivery.
  3. Click Save to apply changes.
Webhook and Streaming Settings

Integration Details

Traditional HTTP Integration

The Web API is perfect for standard messaging where you send a message and wait for a complete response.

Endpoint Details:

  • Method: POST
  • Path: {YOUR_MESSAGES_PATH} (e.g., /adapter/api/messages)

Required Payload:

{
"text": "Hello, how can you help me?",
"user_id": "user_unique_id",
"session_id": "optional_session_id"
}

Why use individual interfaces?

Full UI Control

Design the chat interface to match your brand exactly.

App Integration

Embed the AI directly into your iOS or Android applications.

Custom Logic

Add custom processing before or after the AI response.

Important

Ensure your server URL is correctly configured and that you handle authentication securely if you are proxying requests.