# FAQ block

> An inline block of questions that opens the chat with the answer on click.

The FAQ block is an inline element: a title, a subtitle and the suggested questions as buttons. Clicking a question opens the chat window and sends that question to the assistant right away.

## Add the block

With the [widget script](/en/docs/widgets/) already on the page, add a container and the FAQ module where the block should go. The module reuses the loaded widget and opens answers in the same chat window.

```html
<div id="faq-ai-prosecaptain"></div>
<script
  src="https://widget-api.prosecaptain.com/embed-faq-ai.js"
  data-widget-token="YOUR_TOKEN"
  data-widget-id="WIDGET_ID"
  data-container="faq-ai-prosecaptain"
  data-widget-server-url="https://widget-api.prosecaptain.com"
></script>
```

## Block content

- The title and subtitle are **Widget title** and **Widget subtitle** from the app settings.
- The buttons are the **Suggested questions**. Each question can have its own prompt, the text actually sent to the AI.
- If the widget has no suggested questions, the block is not shown.

## Parameters

| Parameter | Default | Description |
|---|---|---|
| `data-widget-token` | none | Workspace token. Required. |
| `data-widget-id` | none | Widget id. |
| `data-container` | `faq-ai-prosecaptain` | The `id` of the element the block renders into. If it is missing, the block goes to the end of the page. |
| `data-theme` | `light` | `light` or `dark`. |
| `data-widget-server-url` | `https://widget-api.prosecaptain.com` | Widget server URL. |

Other content and appearance (colour, language) come from the widget settings in the app.