API and SDK

Developer integrations

Use API keys, webhooks, Zapier and Make kits, the widget SDK, and referral badge links to connect DuChat with external systems.

Access

API keys

Create scoped bearer tokens from Dashboard, Settings, Developers, API keys. Tokens are shown once, so store them in your automation platform secret field.

Use the smallest scope set needed by the automation.
Send tokens with the Authorization header as a bearer token.
Rotate keys when an automation owner changes.

Events

Webhooks

Webhooks deliver signed product events such as captured leads, new messages, handoff requests, and completed training jobs.

Webhook event shape
{
  "eventId": "evt_test_lead",
  "eventType": "lead.captured",
  "createdAt": "2026-01-01T09:00:00.000Z",
  "data": {
    "chatbotId": "chatbot_123",
    "conversationId": "conversation_123",
    "email": "visitor@example.com"
  }
}

Automation

Zapier and Make

The Developers page includes Zapier and Make kits with API base URL, OpenAPI URL, required scopes, webhook mappings, test payloads, and exportable manifest and recipe JSON.

Create an API key with the kit scopes.
Register your Zapier catch hook or Make custom webhook URL.
Send the provided test payload before enabling the automation.

Embed

Widget SDK

Use the SDK when an app needs to open, close, reset, or destroy the widget from application code while preserving the normal script embed behavior.

Vanilla SDK
import { loadDuChat } from "@duchat/widget";

const widget = await loadDuChat({
  appUrl: "https://app.example.com",
  botId: "YOUR_CHATBOT_ID"
});

widget.open();

Branding

Referral badge

Workspace branding controls whether the powered by badge is shown. Badge impressions and clicks are tracked with hashed request metadata.

Next doc

Troubleshooting

Common issues and the first checks to run when chatbot creation, training, publishing, billing, invites, or traffic fails.

Open