Developer introduction

Get a clear map of everything DGbot exposes for developers — APIs, events, WebSockets, and integration patterns.

~5 minutes Free

What developers can do

DGbot exposes four integration surfaces for developers:

1. Widget embed — The standard JavaScript snippet that installs the chat widget on any web page. Most integrations start and end here. See Install widget.

2. Widget JavaScript API — A programmatic API to control the widget after installation: open/close, identify users, send events, listen to conversation events. See JS API & events.

3. WebSocket API — Full real-time conversation protocol. Build custom chat UIs, native mobile clients, or server-side conversation handlers using the WebSocket protocol. See WebSocket protocol.

4. Custom API actions — Configure your chatbot to call any HTTPS endpoint in response to visitor actions. The bot can send visitor data to your backend and use the response to inform its answer. See Custom actions.

Coming in Phase 2: Full REST API (CRUD operations over chatbots, sources, conversations, and analytics) and webhooks.


Integration architecture

text
Your website / app
        │
        ├─ Widget snippet (script tag)
        │   └── Connects via WebSocket to wss://dgbot.dgtech.co.in/ws
        │         • Sends visitor messages
        │         • Receives streamed AI responses
        │         • Receives tool action events
        │
        └─ Widget JS API (window.DGbot)
            • open() / close()
            • identify(user) — passes signed user identity
            • on('event', handler) — subscribe to events

Authentication

Widget authentication — The widget identifies itself using the data-chatbot-id attribute. This is your public chatbot identifier — it's safe to include in your website HTML.

Visitor identity verification — If you want to pass verified user data to the bot (for personalised responses or secure lookups), sign the user identity with your HMAC secret. See the Widget configuration guide.

REST API (Phase 2) — Will use Bearer token authentication with API keys generated in Settings → API keys.


Base URLs & environments

EnvironmentBase URL
Productionhttps://dgbot.dgtech.co.in
WebSocketwss://dgbot.dgtech.co.in/ws
Widget scripthttps://dgbot.dgtech.co.in/static/widget.js
API v1https://dgbot.dgtech.co.in/api/v1/

If you've configured a custom domain, use that domain in place of dgbot.dgtech.co.in.