> ## Documentation Index
> Fetch the complete documentation index at: https://intervyo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed the interview widget

> Let candidates take an intervyo.ai interview without leaving your domain.

The embed widget runs an intervyo.ai interview inside your own product or job
page — your branding, your domain. Results report back to your backend over
[webhooks](/en/concepts/webhooks).

The flow has three parts: a one-time **embed token** for your account, a
snippet on the page, and a **register** call that creates the participant when
someone starts.

<Steps>
  <Step title="Generate an embed token">
    In the dashboard, go to **Developer → Embed** and generate your embed
    secret + token. The token is **account-scoped** (signed with your account's
    embed secret), not per-candidate — so you mint it once and reuse it.

    To generate it programmatically from a signed-in session instead:

    ```bash theme={null}
    curl -X POST "https://www.intervyo.ai/api/embed-config/token" \
      -H "Content-Type: application/json" \
      -d '{ "accountSlug": "your-team-slug" }'
    # → { "token": "<embed-token>" }
    ```

    <Warning>
      The embed token authorizes participant registration for your account.
      Keep the embed **secret** server-side; rotate it from the dashboard to
      invalidate issued tokens.
    </Warning>
  </Step>

  <Step title="Register the candidate">
    When a candidate starts, register them against a template (or program). This
    creates the participant and returns the interview to load:

    ```bash theme={null}
    curl -X POST "https://www.intervyo.ai/api/embed/register" \
      -H "Content-Type: application/json" \
      -d '{
        "accountSlug": "your-team-slug",
        "accountId": "<account-uuid>",
        "templateId": "ce1cd564-...",
        "name": "Ada Lovelace",
        "email": "ada@example.com",
        "token": "<embed-token>"
      }'
    ```

    Provide exactly one of `templateId` or `programId`.
  </Step>

  <Step title="Drop the snippet">
    Mount the widget on the page where the candidate takes the interview:

    ```html theme={null}
    <div id="intervyo-root"></div>
    <script async src="https://cdn.intervyo.ai/widget.js"
            data-token="EMBED_TOKEN_HERE"
            data-mount="#intervyo-root"></script>
    ```

    The widget handles mic permissions, voice setup, and end-of-call cleanup.
  </Step>

  <Step title="Receive results">
    The widget posts no scores to the browser. Listen for `session.completed` /
    `session.scored` on your [webhook](/en/concepts/webhooks) endpoint and route the
    scorecard wherever it needs to go.
  </Step>
</Steps>

<Note>
  The embed widget is in active rollout. [Get in touch](https://intervyo.ai/contact)
  for the production snippet URL and a full integration guide for your stack.
</Note>
