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

# FAQ: Can I Embed a Hireflix Interview?

> Can I embed a Hireflix Interview inside my own app or website?

If you’re integrating Hireflix into your own product and want candidates to stay inside your app or website, **embedding via iFrame** provides a seamless experience. This is especially useful when you want full control over your user experience and don’t want candidates to navigate away from your platform.

## Step 1: Basic iFrame Embed

Use a standard HTML5 iFrame and include the Hireflix interview link. Make sure to replace the interview `ID`.

```html theme={null}
<iframe
  src="https://app.hireflix.com/INTERVIEW_ID_HERE"
  allow="camera;microphone"
></iframe>
```

<Warning>
  Always include `allow="camera;microphone"` so candidates can record video answers.
</Warning>

You can preview a [full demo](https://stackblitz.com/edit/hireflix-interview-message-passing?description=React%20%20%20TypeScript%20starter%20project\&file=src%2FApp.tsx,src%2Fstyle.css,package.json,public%2Findex.html,src%2Findex.tsx\&title=React%20Starter) using React or clone an example implementation on platforms like [Wix or Webflow](https://help.hireflix.com/article/38rql2mn3u-embeding-hireflix-in-wix).

## Step 2: Listening for Interview Events

Hireflix emits **postMessage events** from the embedded iFrame that your application can subscribe to. This lets you trigger actions such as marking an interview as completed, updating candidate stage, or automatically closing the embed.

```javascript theme={null}
window.addEventListener('message', (event) => {
  const data = event.data;
  console.log('Interview event received:', data);
});
```

**Event format:**

```json theme={null}
{
  "type": "event-type",   // e.g. "interview.loaded", "interview.finished"
  "payload": { ... },     // metadata (e.g. interviewId)
  "description": "The event description"
}
```

**Supported events:**

| Type                 | Description                                                                  |
| :------------------- | :--------------------------------------------------------------------------- |
| `interview.loaded`   | Sent when the interview loads and the first screen is displayed.             |
| `interview.finished` | Sent when the candidate finishes the interview and the final screen appears. |

Use these events to trigger updates in your app (e.g., mark interview as completed or redirect the user/show a "Thank You" message).

## Step 3: Customizing the Interview UI

Once you’ve created the interview link, you can customize its appearance by adding **query parameters** to the URL. These parameters help the embedded interview visually blend with your app.

**Supported parameters:**

| Parameter         | Description                                                                   |
| :---------------- | :---------------------------------------------------------------------------- |
| `primaryColor`    | (hex color, without `#`) sets the color of primary buttons.                   |
| `buttonRadius`    | (number) sets the curvature radius of buttons.                                |
| `backgroundColor` | (hex color, without `#`) sets the background color.                           |
| `simple`          | (`true` / `false`) removes background graphics for easier visual integration. |

**Example**

```
https://app.hireflix.com/INTERVIEW_ID_HERE
?buttonRadius=5&simple=true&primaryColor=5dbfd1&backgroundColor=ffffff
```

## Step 4: Skip the Intro Screen

You can send candidates directly to the first question by appending `/preview` to the interview link. This bypasses the intro and takes the candidate straight into the interview.

**Example:**

```
https://app.hireflix.com/INTERVIEW_ID_HERE/preview
```

## Step 5: Domain and Security Restrictions

For security reasons, Hireflix interviews can only be **embedded from trusted domains**.

* If you use a custom domain (e.g., `interview.yourdomain.com`), it can only be embedded in subdomains of the same domain (like `portal.yourdomain.com`) or within `app.hireflix.com`.
* If you attempt to embed from a different domain, the iFrame will be blocked and show a **404 – Page Not Found** error.
