Skip to content

Embed the widget

The widget is a single IIFE bundle hosted on cdn.reqdesk.support. The bundle exposes window.ReqdeskWidget; you boot it with a small init(...) call.

Minimal

<script async src="https://cdn.reqdesk.support/widget/latest/index.iife.js"></script>
<script>
window.addEventListener('load', () => {
window.ReqdeskWidget.init({
apiKey: 'your-project-api-key',
apiUrl: 'https://api.reqdesk.support',
language: document.documentElement.lang || 'en',
})
})
</script>

That is the entire integration. The widget mounts as a floating launcher at the page’s bottom-end (right in LTR, left in RTL).

Pin to a specific version

For production, pin to a specific version so a CDN release never silently changes your surface:

<script async src="https://cdn.reqdesk.support/widget/1.2.22/index.iife.js"></script>

The init(...) call is identical regardless of which version’s IIFE you pinned.

init() options

FieldRequiredDescription
apiKeyyesAPI key issued for the project the widget should write into.
apiUrlnoBase URL of the Reqdesk API. Defaults to window.location.origin. Set explicitly when embedding on a third-party site.
languagenoen or ar. Defaults to the page’s <html lang>.
themenoTheme override object (colors, radii).
customernoPre-fill known-user metadata ({ email, name, externalId }).
positionnoLauncher position — bottom-end, bottom-start, top-end, top-start.
displaynoDisplay mode — sheet, dialog, inline.
hideFabnoHide the floating action button (use ReqdeskWidget.open() to drive it from your own UI).

Programmatic API

After init() returns, window.ReqdeskWidget exposes:

ReqdeskWidget.open() // open the widget
ReqdeskWidget.close() // close the widget
ReqdeskWidget.toggle() // toggle open state
ReqdeskWidget.setLanguage('ar') // switch locale at runtime
ReqdeskWidget.setTheme({ /* … */ }) // override theme tokens at runtime
ReqdeskWidget.identify({ // attach known-user metadata
email: 'customer@example.com',
name: 'Customer Name',
})
ReqdeskWidget.on('ticket-created', t => { /* … */ })
ReqdeskWidget.destroy() // tear down

CSP

If your site runs a strict CSP, allow:

script-src https://cdn.reqdesk.support https://challenges.cloudflare.com
connect-src https://api.reqdesk.support https://challenges.cloudflare.com
frame-src https://challenges.cloudflare.com

Cloudflare Turnstile is required to keep automated abuse out of the public ticket-creation surface.