Web Chat — Overview

Web chat puts a chat button on your website. Visitors click it and chat with your AI assistant, and your team replies from Teambox when it matters. You add it with one line of code, and it runs only on the websites you choose.

Web chat channel

One chat widget. It has a name, the websites it may run on, its look, and a channel key that starts with wc_ which goes in your website's code.

Visitor

A person on your website. A visitor gets an id that starts with wv_ when they start a chat. Names and emails appear once they share or verify them.

Conversation

Every web chat shows up in Teambox next to your WhatsApp, Instagram and Messenger chats, with platform web.

Assistant

Optional. An AI assistant with Web chat as its platform answers visitors first. Your team can take over in Teambox at any time.

Get started

Follow Install web chat on your website. It walks through creating a channel in the dashboard, choosing the websites it may run on, pasting the snippet (plain HTML, WordPress, Google Tag Manager and website builders), checking the install, and the optional parts: signed-in customers, cookie consent, business hours, the pre-chat form, sounds, ratings, live visitors and security.

API endpoints

Use these to show web chat numbers in your own tools, watch who is on your website, and reply to visitors from your own system.

Scopes

Scoped API keys need web_chat:read for the four GET endpoints and web_chat:write to send messages. See API Key Scopes. The web chat scopes appear in the API key form once web chat is on for your account.

Web chat conversations in the other APIs

Web chat conversations work with the existing conversation endpoints:

  • List Conversations returns them with platform: "web". Filter with ?platform=web, or ?channelId= for one web chat channel. channelId is the web chat channel id and customerId is the visitor id.
  • Chat History takes conversationId to read one web chat thread.
  • The Teambox endpoints (assign, status, activity log) accept a web chat conversationId. Moving a web chat to resolved asks the visitor for a rating when ratings are on.

Web chat events

Web chat events are triggers in the Automation Builder (dashboard → Automations), under Web chat. They show there once web chat is on for your account. Use them to post web chat activity to your own URL, like the other automation triggers.

EventWhen it firesMain fields
web.new_messageA visitor sends a messagemessageId, from (visitor id), displayName, body, messageType, mediaUrl, conversationId, contactId, channelId, channelName, pageUrl
web.message_sentYour assistant or your team sends a visitor a messagemessageId, to (visitor id), body, messageType, conversationId, channelId, isAiResponse, visitorOnline, origin, sentByAgentId, sentByAgentName
web.visitor_identifiedA visitor types their details (level given) or verifies by email, WhatsApp or your signed login (level verified)visitorId, conversationId, contactId, level, method, name, email, emailVerified, phone, phoneVerified, externalUserId, fields
web.chat_ratedA visitor rates a resolved chat from 1 to 5conversationId, visitorId, score, comment, ratedAt, assignedAgentId, assignedAgentName, assignedTeamId
web.chat_started_by_agentA visitor replies to a Start chat message from your teamconversationId, visitorId, agentId, agentName, body, sentAt, assigned

Ids you will see

IdLooks likeWhat it is
Channel id6720b1c09d2b4e0011ab5501The web chat channel. Used in API paths
Channel keywc_…Public. Goes in the snippet on your website
Visitor idwv_…One visitor who has chatted on one channel
Conversation id6724c2d19d2b4e0011ab7702The visitor’s chat in Teambox. Used to send messages

Errors every web chat endpoint can return

StatusCodeMeaning
403INSUFFICIENT_SCOPEThe key lacks web_chat:read or web_chat:write
403WEB_CHAT_NOT_ENABLEDWeb chat is not on for this account yet
403FEATURE_NOT_ENABLEDYour plan does not include web chat (featureKey: "web_enabled"). Stats, live visitors and sending need it. Listing channels does not
404CHANNEL_NOT_FOUNDNo web chat channel with that id on this account, or it was deleted
502UPSTREAM_ERRORThe web chat service did not answer. Try again shortly
503WEB_CHAT_UNAVAILABLEWeb chat is not available on this server