Skip to main content

Overview

The Helpdesk API provides a comprehensive solution for integrating customer support functionality into your applications. It combines RESTful HTTP endpoints for data retrieval with Socket.IO for real-time messaging.
While API integration offers maximum flexibility, we recommend using our SDK for faster implementation and built-in best practices.

Prerequisites

To integrate with the Helpdesk API, you need:
  • Ability to make HTTP requests
  • Socket.IO client library for real-time communication
  • Valid API key from your api key settings

Integration Flow

1

Create Customer Interface

Build a support interface where customers can send messages
2

Generate Session ID

Create a unique session_id for each customer using your interface
3

Fetch Conversations

Use the session_id to retrieve existing customer conversations
4

Load Messages

Get individual messages for each conversation
5

Connect Real-time

Establish Socket.IO connection for live messaging
6

Handle Events

Listen and respond to real-time events for seamless communication

Authentication

All API requests require authentication using your API key:
Authorization: Bearer YOUR_API_KEY
Keep your API key secure and never expose it in client-side code. Store it as an environment variable on your server.

Base URL

All API endpoints use the following base URL:

Quick Start Example

Here’s a basic implementation flow:
const API_BASE_URL = '{api_base_url}';

// 1. Fetch customer conversations
const conversations = await fetch(`${API_BASE_URL}/api/v1/helpdesk/customer/${sessionId}/conversations/`, {
  headers: {
    'Authorization': `Bearer ${API_KEY}`
  }
});

// 2. Connect to Socket.IO for real-time messaging
const socket = io(`${API_BASE_URL}/helpdesk?token_source=api&token=${API_KEY}`);

// 3. Handle connection
socket.on('connect', () => {
  console.log('Connected to helpdesk');
});

// 4. Send customer message
socket.emit('support', {
  session_id: sessionId,
  message: customerMessage,
  attachment: false,
  ticket_chat_id: conversationId || null
});

// 5. Listen for responses
socket.on('support', (response) => {
  if (response.status_code === 200) {
    displayMessage(response.data);
  }
});

Next Steps

Implementation Guides