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.
Early access
403 WEB_CHAT_NOT_ENABLED.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.
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.
Every web chat shows up in Teambox next to your WhatsApp, Instagram and Messenger chats, with platform web.
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.
- GET/v2.0/web-chat/channelsList web chat channels
- GET/v2.0/web-chat/channels/{channelId}Get one channel
- GET/v2.0/web-chat/channels/{channelId}/statsChats, AI vs team, leads and rating
- GET/v2.0/web-chat/channels/{channelId}/live-visitorsWho is on your website now
- POST/v2.0/web-chat/messagesSend a message to a visitor
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.channelIdis the web chat channel id andcustomerIdis the visitor id. - Chat History takes
conversationIdto read one web chat thread. - The Teambox endpoints (assign, status, activity log) accept a web chat
conversationId. Moving a web chat toresolvedasks 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.
| Event | When it fires | Main fields |
|---|---|---|
web.new_message | A visitor sends a message | messageId, from (visitor id), displayName, body, messageType, mediaUrl, conversationId, contactId, channelId, channelName, pageUrl |
web.message_sent | Your assistant or your team sends a visitor a message | messageId, to (visitor id), body, messageType, conversationId, channelId, isAiResponse, visitorOnline, origin, sentByAgentId, sentByAgentName |
web.visitor_identified | A 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_rated | A visitor rates a resolved chat from 1 to 5 | conversationId, visitorId, score, comment, ratedAt, assignedAgentId, assignedAgentName, assignedTeamId |
web.chat_started_by_agent | A visitor replies to a Start chat message from your team | conversationId, visitorId, agentId, agentName, body, sentAt, assigned |
Check before you trust a detail
web.visitor_identified, an email or phone is only proven when emailVerified or phoneVerified is true. Details a visitor typed are not checked.Ids you will see
| Id | Looks like | What it is |
|---|---|---|
| Channel id | 6720b1c09d2b4e0011ab5501 | The web chat channel. Used in API paths |
| Channel key | wc_… | Public. Goes in the snippet on your website |
| Visitor id | wv_… | One visitor who has chatted on one channel |
| Conversation id | 6724c2d19d2b4e0011ab7702 | The visitor’s chat in Teambox. Used to send messages |
Errors every web chat endpoint can return
| Status | Code | Meaning |
|---|---|---|
| 403 | INSUFFICIENT_SCOPE | The key lacks web_chat:read or web_chat:write |
| 403 | WEB_CHAT_NOT_ENABLED | Web chat is not on for this account yet |
| 403 | FEATURE_NOT_ENABLED | Your plan does not include web chat (featureKey: "web_enabled"). Stats, live visitors and sending need it. Listing channels does not |
| 404 | CHANNEL_NOT_FOUND | No web chat channel with that id on this account, or it was deleted |
| 502 | UPSTREAM_ERROR | The web chat service did not answer. Try again shortly |
| 503 | WEB_CHAT_UNAVAILABLE | Web chat is not available on this server |