@getversive/embed is a lightweight (~4 KB gzipped), zero-dependency JavaScript SDK that embeds Versive studies — text surveys and AI voice/video interviews — directly in your product. The SDK renders the study in an iframe and manages the modal/inline UI, loading states, and a secure postMessage event bridge. All study logic, AI moderation, and branding stay server-side; the SDK never touches study content.
Embedding studies
Modal and inline modes, zero-code data attributes, and passing context.
API reference
Every method, option, event, and error code.
Installation
- npm
- Script tag
Quick start
Modal
Open a study in a modal overlay — for example after a user completes an action in your app:Inline
Embed a study directly in your page. The iframe automatically resizes to fit the study content:Zero-code (script tag)
With the script tag, you can embed without writing any JavaScript:Before you ship
Voice and video studies also need microphone/camera permissions delegated to the Versive iframe — the SDK setsallow="microphone; camera" on the iframe for you, but your own Content Security Policy and Permissions Policy must not block the Versive origin. Details in Security & domains.