Allowed domain
The request Origin must match a domain allowed in the assistant settings. Browsers send it automatically.
Add the ready-made chat widget or Informio Search to your website. Build custom interfaces with the public API, allowed domains, localization and your assistant's existing data.
Simplest deployment
First allow your website domain in the assistant settings. Then replace ASSISTANT_ID with the public assistant ID and insert the code into the page. The widget loads its appearance, labels, and conversation history automatically.
<script src="https://informio.eu/widget.js" data-assistant="ASSISTANT_ID" defer></script>Place the code before the closing </body> tag. The defer attribute keeps page loading non-blocking, and the widget works on desktop and mobile.
The request Origin must match a domain allowed in the assistant settings. Browsers send it automatically.
Your random session_id preserves chat history between messages and when the client is opened again.
The assistant ID is not a secret API key. Never put secrets or AI provider credentials in the client.
Informio Search
The script renders the field, suggestions and results and calls the Informio API itself. No search backend is needed on the host website.
<div id="informio-search"></div>
<script src="https://informio.eu/search.js"
data-assistant="ASSISTANT_ID"
data-target="#informio-search" defer></script>data-target is a CSS selector for an existing container; omit it to place the field at the script's location. Container IDs must be unique. Use a separate script and container for each search field.
In React/Vue or another SPA, keep the container in a persistent layout and load the script once after creating it with document.createElement('script'). Scripts inserted through innerHTML do not execute. For components that mount and unmount frequently, use the API below for your own interface.
Color, theme, corners and language come from the assistant. Choose inline or modal results and an optional AI summary in Search. Shadow DOM isolates the UI from host styles.
Selected website/XML sources need public HTTP(S) URLs. Standalone MD and document sources are not supported. Results use the latest synchronized data.
Autocomplete makes no AI calls. One successful confirmed AI search, including its optional summary, uses one organization response.
Use this API for a custom interface. The ready-made search.js already handles all requests. Search needs no session_id or secret API key.
/api/search/{assistant}Returns appearance, language, display mode, branding and localized labels.
/api/search/{assistant}/suggest?q=wellnessText suggestions without AI, up to 6 results. The required q parameter accepts 3–300 characters.
/api/search/{assistant}/resultsThe JSON body contains q with 3–300 characters. Returns up to 24 results, an optional summary, mode and notice.
Send Accept: application/json and Content-Type: application/json for POST. Browsers send Origin automatically; the domain must be allowed. Accept-Language selects the locale when the assistant uses automatic language. Debounce suggestions by 300 ms and cancel stale requests.
const assistantId = 'ASSISTANT_ID';
const query = 'wellness';
const response = await fetch(
`https://informio.eu/api/search/${assistantId}/results`,
{
method: 'POST',
credentials: 'omit',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'Accept-Language': document.documentElement.lang || 'en',
},
body: JSON.stringify({ q: query }),
},
);
if (!response.ok) throw new Error(String(response.status));
const { results, summary, mode, notice } = await response.json();
const container = document.querySelector('#custom-search-results');
container.replaceChildren();
for (const item of results) {
const url = new URL(item.url);
if (!['https:', 'http:'].includes(url.protocol)
|| url.username || url.password) continue;
const link = document.createElement('a');
link.href = url.href;
link.textContent = item.title;
container.append(link);
}{
"results": [
{
"title": "Wellness and opening hours",
"url": "https://example.com/wellness",
"type": "page",
"excerpt": "Pool, saunas and practical information before your visit.",
"image_url": null,
"price": null,
"currency": null,
"in_stock": null
}
],
"summary": null,
"mode": "ai",
"notice": null
}results contains cards; type is page, article, product, event or profile. Image, price, currency and stock may be null. summary is text or null; mode is ai or text and notice is a localized message or null. The list is limited to 24 results without pagination.
The JavaScript example expects your own #custom-search-results container and renders links. Render excerpts, summary and notice using textContent, not innerHTML. Validate HTTP(S) URLs and load images only when image_url is present.
Configuration and suggestions share a limit of 120 requests per minute per assistant/IP. Results allow 20 per minute per assistant/IP. On 429, respect Retry-After.
AI failure or an exhausted plan can return HTTP 200 with mode: text and text results without consuming a response. If only the summary fails, mode stays ai, summary is null and the results count as one AI search.
Download OpenAPIQuick start
Replace ASSISTANT_ID with the public ID from the assistant settings. Send the same session_id throughout the conversation.
Base URL
https://informio.eu/apicurl --request POST \
--url https://informio.eu/api/widget/ASSISTANT_ID/messages \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Origin: https://example.com' \
--data '{
"session_id": "visitor-session-01JEXAMPLE1234567890",
"message": "When are you open?"
}'API reference
Stable endpoints used by the official Informio widget.
/widget/{assistant}Returns the name, appearance, labels, operator availability, and existing history for a session.
/widget/{assistant}/messagesSends a visitor question and returns an answer, products, or the current human handoff state.
/widget/{assistant}/syncLoads new operator messages, takeover state, and conversation completion without refreshing the whole interface.
/widget/{assistant}/handoffAsks the available team to take over the conversation when human handoff is enabled for the assistant.
/widget/{assistant}/page-viewAssociates a visited URL and page title with the conversation without form content or query parameters.
/widget/{assistant}/endEnds the current conversation and optionally stores a positive or negative visitor rating.
Recommended flow
The client only needs a public assistant ID, an allowed Origin, and a stable session_id.
When chat opens, retrieve its appearance, labels, and the session's existing history.
Send every question with the same session_id and include the current page on the web.
After requesting a person, regularly load new messages and the operator state.
Import the OpenAPI YAML into Postman or Insomnia, or use it to generate a client in your preferred language.
Download OpenAPIThe public contract covers chat, widget and Search. Assistant and knowledge management APIs are not public; contact info@informio.eu to discuss your needs.
Start without a payment card or API key. Default Informio AI is ready automatically, while your own OpenAI account or AI server remains optional.
FREE plan · 100 answers · no payment card