Documentation
Install the widget and integrate with the API.
1. Install the widget
Add this script tag to every page where the widget should appear. Find your personal key under Dashboard → Widget.
<script src="https://voicetask.nl/widget/voicetask.js" data-key="pk_YOUR_KEY" data-lang="nl" defer></script>data-lang="nl" or "en" sets the language. Without it, the widget follows the page's <html lang> and falls back to the default language from your dashboard.
2. Embedded mode (optional)
Choose "Embedded" as position and place this element where the widget should render:
<voicetask-widget></voicetask-widget>3. Operator presence (optional)
If you use the widget yourself, add your personal operator token so we don't email you while the widget is open:
<script src="https://voicetask.nl/widget/voicetask.js" data-key="pk_YOUR_KEY" data-lang="nl" data-operator-token="op_YOUR_TOKEN" defer></script>API reference
The widget uses these public endpoints. All endpoints accept and return JSON and support CORS.
| GET | /api/widget/config?key=pk_… | Widget appearance & feature settings |
| POST | /api/widget/chat | { key, messages: [{ role, content }], locale } → { answer, sources } |
| POST | /api/widget/request | { key, title, notes?, email? } → creates a task in your task list |
| POST | /api/widget/heartbeat | { key, sessionId, operatorToken? } → presence tracking |