Insights Company

Embed Interview

Get ready-to-paste code to embed an interview directly into your product.

Returns the embed URL and copy-paste code snippets for running a Persona interview inside your own product — no redirect required. Supports iframes, JavaScript widgets, and React Native.

Embeds will not work until the domain hosting them is added to the allowlist. See Domain allowlist below.

The project must be launched before its embed URL is active. See Launch Project.

Get embed snippets

Returns the embed URL and ready-to-paste code snippets for embedding this project's interview into your own platform. Includes iframe, widget script (inline and overlay), and React Native variants.

Authentication

x-api-key header

Path Parameters

NameTypeDescription
project_id*string

Headers

NameTypeDescription
x-api-keystring

Responses

FieldTypeDescription
embed_urlrequired
stringEmbed Url
interview_idrequired
stringInterview Id
project_idrequired
stringProject Id
snippetsrequired
object
iframerequired
string
widget_inlinerequired
stringWidget Inline
widget_overlay_centerrequired
stringWidget Overlay Center
widget_overlay_dock_rightrequired
stringWidget Overlay Dock Right
mobile_webviewrequired
stringMobile Webview
mobile_modalrequired
stringMobile Modal

Example request

GET /v1/projects/{project_id}/embed
curl "https://external-api.prod.insightscompany.io/v1/projects/<project_id>/embed" \
-H "x-api-key: <api_key>"

Example response

Response 200
{
  "embed_url": "https://call.insightscompany.io/embed/c3d4e5f6-0000-0000-0000-000000000002/b2c3d4e5-0000-0000-0000-000000000001",
  "interview_id": "c3d4e5f6-0000-0000-0000-000000000002",
  "project_id": "b2c3d4e5-0000-0000-0000-000000000001",
  "snippets": {
    "iframe": "<iframe src=\"...\" width=\"100%\" ...></iframe>",
    "mobile_modal": "import { Modal } from 'react-native'; ...",
    "mobile_webview": "import { WebView } from 'react-native-webview'; ...",
    "widget_inline": "<script defer src=\"...\"></script>",
    "widget_overlay_center": "<div id=\"persona-launch\">...</div>\n<script defer ...></script>",
    "widget_overlay_dock_right": "<div id=\"persona-launch\">...</div>\n<script defer ...></script>"
  }
}
{
  "embed_url": "https://call.insightscompany.io/embed/c3d4e5f6-.../b2c3d4e5-...",
  "interview_id": "c3d4e5f6-...",
  "project_id": "b2c3d4e5-...",
  "snippets": {
    "iframe": "<iframe src=\"...\" width=\"100%\" ...></iframe>",
    "widget_inline": "<script defer src=\"...\"></script>",
    "widget_overlay_center": "<div id=\"persona-launch\">...</div>\n<script defer ...></script>",
    "widget_overlay_dock_right": "<div id=\"persona-launch\">...</div>\n<script defer ...></script>",
    "mobile_webview": "import { WebView } from 'react-native-webview'; ...",
    "mobile_modal": "import { Modal } from 'react-native'; ..."
  }
}

Response fields

FieldTypeDescription
embed_urlstringDirect URL to the interview — use as the src in a custom embed
interview_idUUIDInterview associated with this project
project_idUUIDThe project ID
snippets.iframestringHTML <iframe> ready to paste into any webpage
snippets.widget_inlinestringJavaScript widget that renders inline on the page
snippets.widget_overlay_centerstringJavaScript widget that opens as a centred overlay — includes a launcher button
snippets.widget_overlay_dock_rightstringJavaScript widget that opens as a right-docked overlay — includes a launcher button
snippets.mobile_webviewstringReact Native <WebView> snippet
snippets.mobile_modalstringReact Native <Modal> wrapping a <WebView> snippet

Domain allowlist

Each project has an allowlist of domains permitted to embed its interview. Any domain not on the list will be blocked. You can add as many domains as needed — for example https://app.example.com and https://staging.example.com can both be active at the same time.

The allowlist can also be managed from the Recruit tab in the Persona dashboard.

Get allowlist

Returns the list of domains currently permitted to embed this project's interview. An empty list means no domains are allowed yet — the embed will not work until at least one domain is added.

Authentication

x-api-key header

Path Parameters

NameTypeDescription
project_id*string

Headers

NameTypeDescription
x-api-keystring

Responses

FieldTypeDescription
project_idrequired
stringProject Id
allowed_urlsrequired
string[]Domains currently permitted to embed this project's interview.
GET /v1/projects/{project_id}/embed/allow-list
curl "https://external-api.prod.insightscompany.io/v1/projects/<project_id>/embed/allow-list" \
-H "x-api-key: <api_key>"
{
  "project_id": "b2c3d4e5-0000-0000-0000-000000000001",
  "allowed_urls": ["https://app.example.com", "https://staging.example.com"]
}

An empty allowed_urls array means no domains are permitted yet — the embed will not work until at least one is added.

Update allowlist

Replaces the embed domain allowlist for a project. Pass an empty list to clear all allowed domains. Each URL is normalised to `scheme://host[:port]` — paths and query strings are stripped. Multiple domains are supported, for example to allow both production and staging environments. The embed will not work on any domain not present in this list.

Authentication

x-api-key header

Path Parameters

NameTypeDescription
project_id*string

Headers

NameTypeDescription
x-api-keystring

Request Bodyrequired

FieldTypeDescription
allowed_urlsrequired
string[]Full list of domains permitted to embed this project. Replaces the existing allowlist entirely — pass an empty list to clear it. Each entry must be a full http(s) URL; only the scheme and host are kept. Valid: `https://app.example.com`. Invalid: `*.example.com`, `example.com` (no scheme), `https://localhost` (no dot).

Responses

FieldTypeDescription
project_idrequired
stringProject Id
allowed_urlsrequired
string[]Domains currently permitted to embed this project's interview.
PUT /v1/projects/{project_id}/embed/allow-list
curl -X PUT "https://external-api.prod.insightscompany.io/v1/projects/<project_id>/embed/allow-list" \
-H "x-api-key: <api_key>" \
-H "Content-Type: application/json" \
-d '{"allowed_urls": ["https://app.example.com", "https://staging.example.com"]}'

This replaces the allowlist entirely. Pass an empty array to remove all domains.

Each URL is normalised to scheme://host[:port] — paths and query strings are stripped automatically. Wildcards are not supported.

ValidInvalid
https://app.example.com*.example.com (wildcard)
https://staging.example.com:3000example.com (no scheme)
http://app.example.comhttps://localhost (no dot in hostname)

Returns the updated { project_id, allowed_urls }.

Embed options

iframe

The simplest option — paste directly into any HTML page:

<iframe
  src="https://call.insightscompany.io/embed/<interview_id>/<project_id>"
  width="100%"
  style="max-width: 767px"
  height="667"
  allow="camera; microphone; fullscreen; display-capture; autoplay"
  sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-presentation"
  referrerpolicy="strict-origin-when-cross-origin">
</iframe>

Widget (inline)

Renders the interview inline at the script's location:

<script defer
  src="https://call.insightscompany.io/embed-widget/v1/persona-embed.js"
  data-persona-layout="inline"
  data-interview-id="<interview_id>"
  data-project-id="<project_id>">
</script>

Widget (overlay)

Opens the interview as an overlay triggered by a button. Two positions are available — center and dock-right:

<div id="persona-launch">
  <button type="button">Start interview</button>
</div>

<script defer
  src="https://call.insightscompany.io/embed-widget/v1/persona-embed.js"
  data-persona-layout="overlay"
  data-overlay-position="center"
  data-launcher-selector="#persona-launch"
  data-interview-id="<interview_id>"
  data-project-id="<project_id>">
</script>

Replace data-overlay-position="center" with "dock-right" to dock the overlay to the right edge of the screen.

React Native

WebView — renders the interview inline:

import { WebView } from 'react-native-webview';

<WebView
  source={{ uri: "https://call.insightscompany.io/embed/<interview_id>/<project_id>" }}
  style={{ flex: 1 }}
/>

Modal — opens as a full-screen modal:

import { Modal } from 'react-native';
import { WebView } from 'react-native-webview';

<Modal visible={visible} animationType="slide">
  <WebView
    source={{ uri: "https://call.insightscompany.io/embed/<interview_id>/<project_id>" }}
    style={{ flex: 1 }}
  />
</Modal>

Notes

  • The embed URL does not expire — you can cache it and reuse it.
  • The snippets field returns pre-filled code with the correct interview and project IDs already substituted.
  • Camera and microphone permissions are required; ensure your page or app requests them.
  • As interviews complete, records appear in Interviews.

On this page