ZChat API Reference

Before You Begin

Please install ZChat API demo site and APP Server on your server so that you can be familiar with configuring ChatApiKey and ChatApiNotificationUrl.

The following guide assumes that you're deploying APP Server at zchatdemo.com and API Demo Site at zchatAPIdemo.com.

ZChat API is split up two different areas.

  • Consume a web service from APP Server.
  • Submit new Cases or Notes attached to Leads, including detailed debug information.

Consuming a Web Service from ZChat APP Server

Creating a ChatApiAgent Object

ChatApiAgent class is used to store information about a chat agent who works for an organization.

class ChatApiAgent
{
  bool Disabled { get; set; }         /* Determines whether the agent account is disabled*/
  string DisplayName { get; set; }    /* A friendly name that can be displayed to users. */
  string Email { get; set; }          /* Gets or sets the e-mail address of the agent.*/
  bool IsAdmin { get; set; }          /* Determines whether the user is a member of the Administrators group.*/
  string LoginName { get; set; }      /* Gets or sets the agent's logon name.*/
  string Password { get; set; }       /* Gets or sets the agent's password.*/
  int UserId { get; set; }            /* Gets or sets the user ID of the agent. */
}

Creating a ChatApiDepartment Object

ChatApiDepartment class is used to store information about a department.

class ChatApiDepartment
{
  ChatApiAgent[] Agents { get; set; }   /* Gets all agents of the department.*/
  int DepartmentId { get; set; }        /* Gets or sets the department's ID. */
  string Description  { get; set; }     /* Gets or sets the department's description.*/
  string Name  { get; set; }            /* Gets or sets the department's name.*/
}

Creating a SupportSession Object

SupportSession class is used to store information about a single conversation.

class SupportSession
{
  DateTime ActiveTime { get; set; }  /* The last active time of the chat room. */
  int AgentRating { get; set; }      /* Gets or sets the agent's rating score received from the visitor. */
  string AgentUserId  { get; set; }  /* Gets or sets the agent's UserId(eg User:3).*/
  DateTime BeginTime { get; set; }   /* The last active time of the chat room. */
  string Browser { get; set; }       /* Gets or sets the visitor's browser details.*/
  string ContextData { get; set; }   /* Gets or sets the contextual data of ZChat.*/
  string Culture { get; set; }       /* Gets or sets the visitor's browser language preference.*/
  string CustomData { get; set; }    /* Gets or sets the custom data.*/
  /* Gets or sets the visitor's Chat ID(eg Guest:@userkey or Guest:xxxxxxxx-xxxx-xxxx-xxxx-xxxx).*/
  string CustomerId { get; set; }
  int DepartmentId  { get; set; }    /* Gets or sets the department's ID selected by the visitor.*/
  string DisplayName { get; set; }   /* Gets or sets the user name input by the visitor.*/
  string Email { get; set; }         /* Gets or sets the e-mail address input by the visitor.*/
  string Question  { get; set; }     /* Gets or sets the question input by the visitor.*/
  string IPAddress  { get; set; }    /* Gets or sets the IP Address of the visitor.*/
  string OAuthInfo  { get; set; }    /* Gets or sets the custom data.*/
  string OAuthKey  { get; set; }     /* Gets or sets the custom data.*/
  string PageTitle  { get; set; }    /* Gets or sets the page title where a visitor initiates a chat.*/
  string PageUrl  { get; set; }      /* Gets or sets the page url where a visitor initiates a chat.*/
  string Platform  { get; set; }     /* Gets or sets the visitor's operating system info.*/
  string ProductKey  { get; set; }   /* Gets or sets the ProductKey which is set using Javascript API.*/
  string ProductName  { get; set; }  /* Gets or sets the ProductName which is set using Javascript API.*/
  string Referrer   { get; set; }    /* Gets or sets the referrer URL where the visitor has arrived to the page.*/
  string SessionData   { get; set; } /* Gets or sets the session data of ZChat.*/
  int SessionId   { get; set; }      /* Gets or sets the session ID of the chat.*/
}

Creating a ChatMsgData Object

ChatMsgData class is used to store information about a chat message.

class ChatApiDepartment
{
  string Html  { get; set; }     /* Gets or sets the department's description.*/
  int MessageId { get; set; }    /* Gets or sets the department's ID. */
  string Sender { get; set; }    /* Gets or sets the department's description.*/
  string SenderId  { get; set; } /* Gets or sets the department's description.*/
  int SessionId { get; set; }    /* Gets or sets the department's ID. */
  string Text  { get; set; }     /* Gets or sets the department's name.*/
  DateTime  Time { get; set; }   /* Gets or sets the department's name.*/
}
Owned customer support software

Deploy live chat on your own terms, not on someone else's pricing model.

ZChat gives you the installable server, web dashboard, website widget, and desktop agent tools in one self-hosted product you buy once and keep. Run it on infrastructure you trust and connect AI only if and how you want it.

Deployment

Install on Windows or Linux, behind IIS or Nginx, in a VM, or in Docker if that fits your stack.

Commercial model

One-time purchase, perpetual license, and no monthly per-agent bill attached to growth.

AI Flexibility

Use Ollama locally or connect OpenAI and Anthropic with your own provider accounts.